@lovrabet/rabetbase-cli 2.1.2-beta.3 → 2.1.3-beta.0

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
- const a6_0x3fafa7=a6_0x1491;(function(_0x52bfae,_0x79ff86){const _0xbac1e8=a6_0x1491,_0x2edc61=_0x52bfae();while(!![]){try{const _0x22beda=-parseInt(_0xbac1e8(0x10a))/0x1+parseInt(_0xbac1e8(0x122))/0x2+-parseInt(_0xbac1e8(0x106))/0x3+parseInt(_0xbac1e8(0x11b))/0x4+-parseInt(_0xbac1e8(0x105))/0x5*(parseInt(_0xbac1e8(0x115))/0x6)+-parseInt(_0xbac1e8(0x123))/0x7*(parseInt(_0xbac1e8(0x124))/0x8)+-parseInt(_0xbac1e8(0x11f))/0x9*(-parseInt(_0xbac1e8(0x116))/0xa);if(_0x22beda===_0x79ff86)break;else _0x2edc61['push'](_0x2edc61['shift']());}catch(_0x5c3a5f){_0x2edc61['push'](_0x2edc61['shift']());}}}(a6_0x443a,0xb8aa8));function a6_0x1491(_0x5b3111,_0xb71e2b){_0x5b3111=_0x5b3111-0x105;const _0x443ab3=a6_0x443a();let _0x149195=_0x443ab3[_0x5b3111];return _0x149195;}import a6_0x3bbccd from'node:fs';import a6_0x3e9842 from'node:path';import a6_0x181501 from'semver';import{getCdnConfig}from'../utils/cdn-config.js';const FALLBACK_MIN_SDK_VERSION=a6_0x3fafa7(0x11c);function isNonNumericVersion(_0x19a59d){const _0x3c16bd=a6_0x3fafa7,_0x1a8a5f=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\*$/,/^x$/];return _0x1a8a5f[_0x3c16bd(0x10c)](_0xc11139=>_0xc11139[_0x3c16bd(0x129)](_0x19a59d));}function getInstalledVersion(_0x4c47c9,_0x1f4ef3){const _0x262f33=a6_0x3fafa7;try{const _0x5d0afd=a6_0x3e9842['join'](_0x4c47c9,_0x262f33(0x114),_0x1f4ef3,_0x262f33(0x120));if(a6_0x3bbccd['existsSync'](_0x5d0afd)){const _0x1d731a=JSON[_0x262f33(0x10f)](a6_0x3bbccd[_0x262f33(0x125)](_0x5d0afd,_0x262f33(0x108)));return _0x1d731a[_0x262f33(0x127)]||null;}}catch{}return null;}async function getSdkStableVersion(){const _0x44ec32=a6_0x3fafa7;try{const _0x28d6db=await getCdnConfig();return _0x28d6db?.[_0x44ec32(0x11a)]?.[_0x44ec32(0x12a)]?.[_0x44ec32(0x110)]||null;}catch{return null;}}async function getSdkPackageName(){const _0x19266d=a6_0x3fafa7;try{const _0x15a2b8=await getCdnConfig();return _0x15a2b8?.[_0x19266d(0x11a)]?.[_0x19266d(0x12a)]?.[_0x19266d(0x10d)]||_0x19266d(0x10b);}catch{return _0x19266d(0x10b);}}function a6_0x443a(){const _0x26f962=['@lovrabet/sdk','some','packageName','minVersion','parse','stableVersion','dependencies','npm\x20install\x20','\x20\x20\x20Upgrade\x20command:\x20','node_modules','89844ERxONf','2370FCQXOq','\x20\x20\x20Stable\x20version:\x20','↪\x20SDK\x20update\x20available','log','sdk','2657556HWLHor','1.2.0','join','devDependencies','73881pJbxtq','package.json','\x1b[1m','368266oIxFvz','389585CdjYPD','144iMjPuf','readFileSync','coerce','version','\x1b[33m','test','node','5bXBWeC','2585925RibNzD','existsSync','utf-8','\x20\x20\x20Current\x20version:\x20','158924StjzMo'];a6_0x443a=function(){return _0x26f962;};return a6_0x443a();}export async function checkSdkVersion(_0x45687){const _0x57ede0=a6_0x3fafa7,_0x282d96=a6_0x3e9842[_0x57ede0(0x11d)](_0x45687,_0x57ede0(0x120)),[_0xcce6ad,_0x13928f]=await Promise['all']([getSdkStableVersion(),getSdkPackageName()]),_0x2a8af4=_0xcce6ad||FALLBACK_MIN_SDK_VERSION;if(!a6_0x3bbccd[_0x57ede0(0x107)](_0x282d96))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x2a8af4,'packageName':_0x13928f,'stableVersion':_0xcce6ad};try{const _0x865eff=JSON[_0x57ede0(0x10f)](a6_0x3bbccd[_0x57ede0(0x125)](_0x282d96,'utf8')),_0x5956cf=_0x865eff[_0x57ede0(0x111)]||{},_0x236241=_0x865eff[_0x57ede0(0x11e)]||{},_0x2369c0=_0x5956cf[_0x13928f]||_0x236241[_0x13928f];if(!_0x2369c0)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x2a8af4,'packageName':_0x13928f,'stableVersion':_0xcce6ad};let _0x3ef0ed=getInstalledVersion(_0x45687,_0x13928f);!_0x3ef0ed&&(_0x3ef0ed=_0x2369c0);if(isNonNumericVersion(_0x2369c0))return{'installed':!![],'version':_0x3ef0ed,'needsUpgrade':![],'minVersion':_0x2a8af4,'packageName':_0x13928f,'stableVersion':_0xcce6ad};const _0x3ff1cf=a6_0x181501[_0x57ede0(0x126)](_0x3ef0ed),_0x52f28e=a6_0x181501[_0x57ede0(0x126)](_0x2a8af4),_0x412e7b=_0x3ff1cf&&_0x52f28e?a6_0x181501['lt'](_0x3ff1cf,_0x52f28e):![];return{'installed':!![],'version':_0x3ef0ed,'needsUpgrade':_0x412e7b,'minVersion':_0x2a8af4,'packageName':_0x13928f,'stableVersion':_0xcce6ad};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x2a8af4,'packageName':_0x13928f,'stableVersion':_0xcce6ad};}}export function checkSdkVersionSync(_0x3de7f9){const _0x1ec8c0=a6_0x3fafa7,_0x2a90d3=a6_0x3e9842[_0x1ec8c0(0x11d)](_0x3de7f9,_0x1ec8c0(0x120)),_0x35d738=_0x1ec8c0(0x10b);if(!a6_0x3bbccd[_0x1ec8c0(0x107)](_0x2a90d3))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x35d738,'stableVersion':null};try{const _0x16cc1a=JSON[_0x1ec8c0(0x10f)](a6_0x3bbccd[_0x1ec8c0(0x125)](_0x2a90d3,'utf8')),_0x35e63c=_0x16cc1a[_0x1ec8c0(0x111)]||{},_0x526ffc=_0x16cc1a[_0x1ec8c0(0x11e)]||{},_0x3e822b=_0x35e63c[_0x35d738]||_0x526ffc[_0x35d738];if(!_0x3e822b)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x35d738,'stableVersion':null};let _0x3211dc=getInstalledVersion(_0x3de7f9,_0x35d738);!_0x3211dc&&(_0x3211dc=_0x3e822b);if(isNonNumericVersion(_0x3e822b))return{'installed':!![],'version':_0x3211dc,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x35d738,'stableVersion':null};const _0x3bddfb=a6_0x181501['coerce'](_0x3211dc),_0x54e488=_0x3bddfb?a6_0x181501['lt'](_0x3bddfb,FALLBACK_MIN_SDK_VERSION):![];return{'installed':!![],'version':_0x3211dc,'needsUpgrade':_0x54e488,'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x35d738,'stableVersion':null};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x35d738,'stableVersion':null};}}export function printSdkUpgradeWarning(_0x46ccdb){const _0x299965=a6_0x3fafa7;if(!_0x46ccdb['needsUpgrade'])return;const _0x4be07f=_0x299965(0x128),_0x25a592='\x1b[0m',_0x12dd88=_0x299965(0x121),_0x9d7db9=_0x46ccdb['packageName']||'@lovrabet/sdk',_0x353f21=_0x46ccdb['stableVersion']||_0x46ccdb[_0x299965(0x10e)],_0x427746=_0x299965(0x112)+_0x9d7db9+'@'+(_0x353f21||'latest');console[_0x299965(0x119)](),console['log'](''+_0x4be07f+_0x12dd88+_0x299965(0x118)+_0x25a592),console[_0x299965(0x119)](_0x4be07f+_0x299965(0x109)+_0x9d7db9+'@'+_0x46ccdb[_0x299965(0x127)]+_0x25a592),console[_0x299965(0x119)](_0x4be07f+_0x299965(0x117)+_0x353f21+_0x25a592),console[_0x299965(0x119)](_0x4be07f+_0x299965(0x113)+_0x427746+_0x25a592),console[_0x299965(0x119)]();}
1
+ const a169_0x15712c=a169_0x45e8;function a169_0x45e8(_0x3ff7fe,_0x27a72a){_0x3ff7fe=_0x3ff7fe-0x1c5;const _0x18872e=a169_0x1887();let _0x45e82a=_0x18872e[_0x3ff7fe];return _0x45e82a;}(function(_0x39cda7,_0x36e87c){const _0x3d350d=a169_0x45e8,_0x1d945a=_0x39cda7();while(!![]){try{const _0x1a4bcd=parseInt(_0x3d350d(0x1e1))/0x1+parseInt(_0x3d350d(0x1d2))/0x2+-parseInt(_0x3d350d(0x1c9))/0x3+-parseInt(_0x3d350d(0x1d3))/0x4+-parseInt(_0x3d350d(0x1e8))/0x5+-parseInt(_0x3d350d(0x1cd))/0x6+parseInt(_0x3d350d(0x1e6))/0x7;if(_0x1a4bcd===_0x36e87c)break;else _0x1d945a['push'](_0x1d945a['shift']());}catch(_0xa6f268){_0x1d945a['push'](_0x1d945a['shift']());}}}(a169_0x1887,0x9a59a));import a169_0x429d63 from'node:fs';import a169_0x1e1cf8 from'node:path';import a169_0x47bf60 from'semver';import{getCdnConfig}from'../utils/cdn-config.js';const FALLBACK_MIN_SDK_VERSION=a169_0x15712c(0x1dc);function isNonNumericVersion(_0x3b5b10){const _0x2eb026=a169_0x15712c,_0x1e272c=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\*$/,/^x$/];return _0x1e272c[_0x2eb026(0x1da)](_0x344c8e=>_0x344c8e[_0x2eb026(0x1e7)](_0x3b5b10));}function getInstalledVersion(_0x256674,_0x44e842){const _0x5c540c=a169_0x15712c;try{const _0x56d3f7=a169_0x1e1cf8['join'](_0x256674,_0x5c540c(0x1d6),_0x44e842,_0x5c540c(0x1d7));if(a169_0x429d63['existsSync'](_0x56d3f7)){const _0x18055c=JSON[_0x5c540c(0x1d9)](a169_0x429d63[_0x5c540c(0x1e4)](_0x56d3f7,_0x5c540c(0x1c8)));return _0x18055c[_0x5c540c(0x1e3)]||null;}}catch{}return null;}async function getSdkStableVersion(){const _0x55ef4b=a169_0x15712c;try{const _0x35eaf2=await getCdnConfig();return _0x35eaf2?.[_0x55ef4b(0x1cc)]?.['node']?.[_0x55ef4b(0x1ca)]||null;}catch{return null;}}function a169_0x1887(){const _0x113959=['some','utf8','1.2.0','join','\x1b[0m','\x20\x20\x20Current\x20version:\x20','\x20\x20\x20Upgrade\x20command:\x20','871815ObuVQO','node','version','readFileSync','coerce','10468542Czydrl','test','956845sLqNfK','@lovrabet/sdk','↪\x20SDK\x20update\x20available','npm\x20install\x20','minVersion','utf-8','1967646lHhrbe','stableVersion','log','sdk','1275678SoLIWl','all','\x1b[1m','needsUpgrade','existsSync','551766YPfXCm','3804488CMWarE','packageName','\x20\x20\x20Stable\x20version:\x20','node_modules','package.json','latest','parse'];a169_0x1887=function(){return _0x113959;};return a169_0x1887();}async function getSdkPackageName(){const _0x1ec3bd=a169_0x15712c;try{const _0x20d94f=await getCdnConfig();return _0x20d94f?.[_0x1ec3bd(0x1cc)]?.[_0x1ec3bd(0x1e2)]?.['packageName']||_0x1ec3bd(0x1e9);}catch{return'@lovrabet/sdk';}}export async function checkSdkVersion(_0x3f416c){const _0x1c4aa7=a169_0x15712c,_0x36b7ad=a169_0x1e1cf8['join'](_0x3f416c,_0x1c4aa7(0x1d7)),[_0x2dcef0,_0x347728]=await Promise[_0x1c4aa7(0x1ce)]([getSdkStableVersion(),getSdkPackageName()]),_0x3f0929=_0x2dcef0||FALLBACK_MIN_SDK_VERSION;if(!a169_0x429d63[_0x1c4aa7(0x1d1)](_0x36b7ad))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x3f0929,'packageName':_0x347728,'stableVersion':_0x2dcef0};try{const _0x28cf5f=JSON['parse'](a169_0x429d63[_0x1c4aa7(0x1e4)](_0x36b7ad,_0x1c4aa7(0x1db))),_0x593b1a=_0x28cf5f['dependencies']||{},_0x90d4f5=_0x28cf5f['devDependencies']||{},_0x4f97fd=_0x593b1a[_0x347728]||_0x90d4f5[_0x347728];if(!_0x4f97fd)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x3f0929,'packageName':_0x347728,'stableVersion':_0x2dcef0};let _0x3a6ccf=getInstalledVersion(_0x3f416c,_0x347728);!_0x3a6ccf&&(_0x3a6ccf=_0x4f97fd);if(isNonNumericVersion(_0x4f97fd))return{'installed':!![],'version':_0x3a6ccf,'needsUpgrade':![],'minVersion':_0x3f0929,'packageName':_0x347728,'stableVersion':_0x2dcef0};const _0x5030ed=a169_0x47bf60[_0x1c4aa7(0x1e5)](_0x3a6ccf),_0x517cbc=a169_0x47bf60['coerce'](_0x3f0929),_0x3416ff=_0x5030ed&&_0x517cbc?a169_0x47bf60['lt'](_0x5030ed,_0x517cbc):![];return{'installed':!![],'version':_0x3a6ccf,'needsUpgrade':_0x3416ff,'minVersion':_0x3f0929,'packageName':_0x347728,'stableVersion':_0x2dcef0};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x3f0929,'packageName':_0x347728,'stableVersion':_0x2dcef0};}}export function checkSdkVersionSync(_0x48077e){const _0x2b9200=a169_0x15712c,_0x340457=a169_0x1e1cf8[_0x2b9200(0x1dd)](_0x48077e,_0x2b9200(0x1d7)),_0x5702d2=_0x2b9200(0x1e9);if(!a169_0x429d63[_0x2b9200(0x1d1)](_0x340457))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x5702d2,'stableVersion':null};try{const _0x3cfcb0=JSON[_0x2b9200(0x1d9)](a169_0x429d63[_0x2b9200(0x1e4)](_0x340457,'utf8')),_0x2c6cc6=_0x3cfcb0['dependencies']||{},_0x61ee98=_0x3cfcb0['devDependencies']||{},_0xf3eec1=_0x2c6cc6[_0x5702d2]||_0x61ee98[_0x5702d2];if(!_0xf3eec1)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x5702d2,'stableVersion':null};let _0x32b519=getInstalledVersion(_0x48077e,_0x5702d2);!_0x32b519&&(_0x32b519=_0xf3eec1);if(isNonNumericVersion(_0xf3eec1))return{'installed':!![],'version':_0x32b519,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x5702d2,'stableVersion':null};const _0x3294c0=a169_0x47bf60['coerce'](_0x32b519),_0x4b3c33=_0x3294c0?a169_0x47bf60['lt'](_0x3294c0,FALLBACK_MIN_SDK_VERSION):![];return{'installed':!![],'version':_0x32b519,'needsUpgrade':_0x4b3c33,'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x5702d2,'stableVersion':null};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x5702d2,'stableVersion':null};}}export function printSdkUpgradeWarning(_0x5dd052){const _0x42f274=a169_0x15712c;if(!_0x5dd052[_0x42f274(0x1d0)])return;const _0x4f76ce='\x1b[33m',_0x477876=_0x42f274(0x1de),_0x48d830=_0x42f274(0x1cf),_0x27f43c=_0x5dd052[_0x42f274(0x1d4)]||'@lovrabet/sdk',_0x378ba6=_0x5dd052['stableVersion']||_0x5dd052[_0x42f274(0x1c7)],_0x46ef67=_0x42f274(0x1c6)+_0x27f43c+'@'+(_0x378ba6||_0x42f274(0x1d8));console[_0x42f274(0x1cb)](),console[_0x42f274(0x1cb)](''+_0x4f76ce+_0x48d830+_0x42f274(0x1c5)+_0x477876),console['log'](_0x4f76ce+_0x42f274(0x1df)+_0x27f43c+'@'+_0x5dd052['version']+_0x477876),console['log'](_0x4f76ce+_0x42f274(0x1d5)+_0x378ba6+_0x477876),console[_0x42f274(0x1cb)](_0x4f76ce+_0x42f274(0x1e0)+_0x46ef67+_0x477876),console['log']();}
@@ -1 +1 @@
1
- (function(_0x368567,_0xc8c663){const _0x392ca7=a16_0x277c,_0x12aa3e=_0x368567();while(!![]){try{const _0x47a055=parseInt(_0x392ca7(0x19b))/0x1*(parseInt(_0x392ca7(0x1a0))/0x2)+parseInt(_0x392ca7(0x195))/0x3+-parseInt(_0x392ca7(0x1a5))/0x4+-parseInt(_0x392ca7(0x196))/0x5+parseInt(_0x392ca7(0x1a1))/0x6*(parseInt(_0x392ca7(0x1a6))/0x7)+-parseInt(_0x392ca7(0x192))/0x8*(-parseInt(_0x392ca7(0x18d))/0x9)+parseInt(_0x392ca7(0x18b))/0xa*(-parseInt(_0x392ca7(0x1a4))/0xb);if(_0x47a055===_0xc8c663)break;else _0x12aa3e['push'](_0x12aa3e['shift']());}catch(_0x4672a9){_0x12aa3e['push'](_0x12aa3e['shift']());}}}(a16_0x2bd9,0x532cd));import{readFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{fileURLToPath}from'node:url';function a16_0x277c(_0x4f93cd,_0x5609f6){_0x4f93cd=_0x4f93cd-0x18a;const _0x2bd9fe=a16_0x2bd9();let _0x277c3f=_0x2bd9fe[_0x4f93cd];return _0x277c3f;}import a16_0x23cd47 from'semver';import{getCdnConfig}from'../utils/cdn-config.js';function a16_0x2bd9(){const _0x3c0a6c=['../..','\x1b[33m','log','6tseZPj','6gsEnFp','npm\x20install\x20-g\x20','utf-8','22QGKELa','1186852TOlwzD','2535883veiblp','\x1b[1m','↪\x20New\x20version\x20available','2421700cYfTlu','needsUpgrade','144288rEkplz','currentVersion','@latest','\x20\x20\x20Upgrade\x20command:\x20','test','272IKrvRJ','\x1b[0m','version','102747Kuxxnb','2218665PgaXcE','1.0.0','\x20\x20\x20Current\x20CLI\x20version:\x20','stableVersion','\x20\x20\x20Stable\x20version:\x20','207955EhTBhl','some'];a16_0x2bd9=function(){return _0x3c0a6c;};return a16_0x2bd9();}import{NPM_PACKAGE_NAME}from'../constant/cli.js';function getCurrentCliVersion(){const _0x24d1f1=a16_0x277c;try{const _0x1a59c4=fileURLToPath(import.meta.url),_0x3a08d5=resolve(dirname(_0x1a59c4),_0x24d1f1(0x19d)),_0x44ba73=resolve(_0x3a08d5,'package.json'),_0x5ea7e7=JSON['parse'](readFileSync(_0x44ba73,_0x24d1f1(0x1a3)));return _0x5ea7e7[_0x24d1f1(0x194)]||_0x24d1f1(0x197);}catch{return'1.0.0';}}function isNonNumericVersion(_0xa5e2b9){const _0x18cfa2=a16_0x277c,_0x4f8442=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\^/,/^~/,/^>/,/^</,/^\*/,/^x$/];return _0x4f8442[_0x18cfa2(0x19c)](_0xe65ad6=>_0xe65ad6[_0x18cfa2(0x191)](_0xa5e2b9));}export async function checkCliVersion(){const _0x1767ad=a16_0x277c,_0x537c10=getCurrentCliVersion(),_0x5abedf=await getCdnConfig(),_0x379a64=_0x5abedf?.['cli']?.[_0x1767ad(0x199)]||null;let _0xd42b2=![];if(_0x379a64)try{const _0x181685=a16_0x23cd47['coerce'](_0x537c10),_0x289aca=a16_0x23cd47['coerce'](_0x379a64);_0x181685&&_0x289aca&&(_0xd42b2=a16_0x23cd47['lt'](_0x181685,_0x289aca));}catch{_0xd42b2=![];}return{'currentVersion':_0x537c10,'stableVersion':_0x379a64,'needsUpgrade':_0xd42b2,'isPreRelease':![]};}export function printCliUpgradeWarning(_0x2d9ac2){const _0x17d552=a16_0x277c;if(!_0x2d9ac2[_0x17d552(0x18c)])return;const _0x3ac1f6=_0x17d552(0x19e),_0x5bd44b=_0x17d552(0x193),_0x235b5d=_0x17d552(0x1a7),_0x59cc63=_0x17d552(0x1a2)+NPM_PACKAGE_NAME+_0x17d552(0x18f);console['log'](),console[_0x17d552(0x19f)](''+_0x3ac1f6+_0x235b5d+_0x17d552(0x18a)+_0x5bd44b),console[_0x17d552(0x19f)](_0x3ac1f6+_0x17d552(0x198)+_0x2d9ac2[_0x17d552(0x18e)]+_0x5bd44b),console[_0x17d552(0x19f)](_0x3ac1f6+_0x17d552(0x19a)+_0x2d9ac2[_0x17d552(0x199)]+_0x5bd44b),console[_0x17d552(0x19f)](_0x3ac1f6+_0x17d552(0x190)+_0x59cc63+_0x5bd44b),console['log']();}
1
+ (function(_0x3fdad0,_0x1fa2ce){const _0xad3466=a170_0x1c23,_0xb07206=_0x3fdad0();while(!![]){try{const _0x18a04b=parseInt(_0xad3466(0x1f2))/0x1*(parseInt(_0xad3466(0x202))/0x2)+parseInt(_0xad3466(0x213))/0x3+-parseInt(_0xad3466(0x1fc))/0x4*(parseInt(_0xad3466(0x208))/0x5)+parseInt(_0xad3466(0x210))/0x6+-parseInt(_0xad3466(0x1fa))/0x7+-parseInt(_0xad3466(0x20c))/0x8*(-parseInt(_0xad3466(0x200))/0x9)+-parseInt(_0xad3466(0x1f3))/0xa;if(_0x18a04b===_0x1fa2ce)break;else _0xb07206['push'](_0xb07206['shift']());}catch(_0x5aea82){_0xb07206['push'](_0xb07206['shift']());}}}(a170_0x8565,0xec824));import{readFileSync}from'node:fs';import{resolve,dirname}from'node:path';function a170_0x8565(){const _0x347f8b=['version','96MAkzJz','currentVersion','stableVersion','\x1b[1m','\x20\x20\x20Minimum\x20required:\x20','\x20\x20\x20Upgrade\x20command:\x20','1547165pFBIZh','package.json','parse','\x1b[0m','1761824TjCulp','1.0.0','minimumVersion','Current\x20version:\x20','2660760CJsMBZ','\x1b[33m','\x20\x20\x20Recommended\x20stable:\x20','3029034afpKqT','Upgrade\x20command:\x20','filter','join','latest','utf-8','needsUpgrade','30185jJzsoq','12342640rQrjpz','coerce','upgradeMessage','\x20\x20\x20','npm\x20install\x20-g\x20','\x20\x20\x20Current\x20CLI\x20version:\x20','../..','3644228qDOkFp','minimumVersionMessage','8aHwsKC','Minimum\x20required:\x20','log','belowMinimum','18zoFfXx'];a170_0x8565=function(){return _0x347f8b;};return a170_0x8565();}import{fileURLToPath}from'node:url';import a170_0x526f1f from'semver';import{getCliVersionPolicy}from'../utils/cli-version-policy.js';import{NPM_PACKAGE_NAME}from'../constant/cli.js';import{CliErrors}from'../errors.js';export function getCliUpgradeCommand(_0x314773){const _0x37894e=a170_0x1c23,_0x94937c=_0x314773[_0x37894e(0x204)]||_0x37894e(0x217);return _0x37894e(0x1f7)+NPM_PACKAGE_NAME+'@'+_0x94937c;}function a170_0x1c23(_0xc6d26e,_0x575026){_0xc6d26e=_0xc6d26e-0x1f2;const _0x85657b=a170_0x8565();let _0x1c23cf=_0x85657b[_0xc6d26e];return _0x1c23cf;}function getCurrentCliVersion(){const _0x3b7d37=a170_0x1c23;try{const _0x35b323=fileURLToPath(import.meta.url),_0x372f06=resolve(dirname(_0x35b323),_0x3b7d37(0x1f9)),_0x1f758a=resolve(_0x372f06,_0x3b7d37(0x209)),_0xa8dc73=JSON[_0x3b7d37(0x20a)](readFileSync(_0x1f758a,_0x3b7d37(0x218)));return _0xa8dc73[_0x3b7d37(0x201)]||_0x3b7d37(0x20d);}catch{return _0x3b7d37(0x20d);}}export async function checkCliVersion(){const _0x27e759=a170_0x1c23,_0x159d23=getCurrentCliVersion(),_0x328864=await getCliVersionPolicy(),_0x39982c=_0x328864?.['stableVersion']||null,_0x339c6d=_0x328864?.[_0x27e759(0x20e)]||null;let _0x10fc39=![],_0x23f1e8=![];const _0x44dc67=a170_0x526f1f['coerce'](_0x159d23);if(_0x44dc67&&_0x39982c)try{const _0x4f7d5f=a170_0x526f1f[_0x27e759(0x1f4)](_0x39982c);if(_0x4f7d5f)_0x10fc39=a170_0x526f1f['lt'](_0x44dc67,_0x4f7d5f);}catch{}if(_0x44dc67&&_0x339c6d)try{const _0x4d49dc=a170_0x526f1f[_0x27e759(0x1f4)](_0x339c6d);if(_0x4d49dc)_0x23f1e8=a170_0x526f1f['lt'](_0x44dc67,_0x4d49dc);}catch{}return _0x23f1e8&&(_0x10fc39=!![]),{'currentVersion':_0x159d23,'stableVersion':_0x39982c,'minimumVersion':_0x339c6d,'needsUpgrade':_0x10fc39,'belowMinimum':_0x23f1e8,'isPreRelease':![],'upgradeMessage':_0x328864?.[_0x27e759(0x1f5)],'minimumVersionMessage':_0x328864?.[_0x27e759(0x1fb)]};}export function printCliUpgradeWarning(_0x3a5384){const _0x34cd84=a170_0x1c23;if(!_0x3a5384[_0x34cd84(0x219)]&&!_0x3a5384[_0x34cd84(0x1ff)])return;const _0x516450='\x1b[31m',_0xa94f91=_0x34cd84(0x211),_0x4d119d=_0x34cd84(0x20b),_0x2c1d9a=_0x34cd84(0x205),_0x569067=getCliUpgradeCommand(_0x3a5384);console[_0x34cd84(0x1fe)](),_0x3a5384[_0x34cd84(0x1ff)]?(console[_0x34cd84(0x1fe)](''+_0x516450+_0x2c1d9a+'↪\x20Critical\x20CLI\x20upgrade\x20required'+_0x4d119d),console[_0x34cd84(0x1fe)](_0x516450+_0x34cd84(0x1f8)+_0x3a5384['currentVersion']+_0x4d119d),_0x3a5384[_0x34cd84(0x20e)]&&console[_0x34cd84(0x1fe)](_0x516450+_0x34cd84(0x206)+_0x3a5384['minimumVersion']+_0x4d119d),_0x3a5384['stableVersion']&&_0x3a5384[_0x34cd84(0x204)]!==_0x3a5384[_0x34cd84(0x20e)]&&console[_0x34cd84(0x1fe)](_0x516450+_0x34cd84(0x212)+_0x3a5384[_0x34cd84(0x204)]+_0x4d119d),_0x3a5384[_0x34cd84(0x1fb)]&&console[_0x34cd84(0x1fe)](_0x516450+'\x20\x20\x20'+_0x3a5384[_0x34cd84(0x1fb)]+_0x4d119d),console['log'](_0x516450+'\x20\x20\x20Upgrade\x20command:\x20'+_0x569067+_0x4d119d)):(console[_0x34cd84(0x1fe)](''+_0xa94f91+_0x2c1d9a+'↪\x20New\x20version\x20available'+_0x4d119d),console['log'](_0xa94f91+_0x34cd84(0x1f8)+_0x3a5384[_0x34cd84(0x203)]+_0x4d119d),console['log'](_0xa94f91+'\x20\x20\x20Stable\x20version:\x20'+_0x3a5384['stableVersion']+_0x4d119d),_0x3a5384[_0x34cd84(0x1f5)]&&console[_0x34cd84(0x1fe)](_0xa94f91+_0x34cd84(0x1f6)+_0x3a5384[_0x34cd84(0x1f5)]+_0x4d119d),console['log'](_0xa94f91+_0x34cd84(0x207)+_0x569067+_0x4d119d)),console[_0x34cd84(0x1fe)]();}export function assertCliVersionSupported(_0x12c76e){const _0x495bc4=a170_0x1c23;if(!_0x12c76e[_0x495bc4(0x1ff)])return;const _0x29275b=[_0x12c76e[_0x495bc4(0x1fb)],_0x495bc4(0x20f)+_0x12c76e[_0x495bc4(0x203)],_0x12c76e[_0x495bc4(0x20e)]?_0x495bc4(0x1fd)+_0x12c76e[_0x495bc4(0x20e)]:null,_0x495bc4(0x214)+getCliUpgradeCommand(_0x12c76e)][_0x495bc4(0x215)](Boolean)[_0x495bc4(0x216)]('\x0a');throw CliErrors['validation']('Current\x20CLI\x20version\x20is\x20below\x20the\x20minimum\x20supported\x20version.',_0x29275b);}
@@ -0,0 +1 @@
1
+ (function(_0x2a913d,_0x30d8af){const _0xb6ede5=a171_0xa7e3,_0x2dc54e=_0x2a913d();while(!![]){try{const _0x17aab5=-parseInt(_0xb6ede5(0xd0))/0x1*(-parseInt(_0xb6ede5(0xe1))/0x2)+-parseInt(_0xb6ede5(0xdb))/0x3+-parseInt(_0xb6ede5(0xd5))/0x4*(-parseInt(_0xb6ede5(0xdd))/0x5)+parseInt(_0xb6ede5(0xe7))/0x6+-parseInt(_0xb6ede5(0xd9))/0x7+parseInt(_0xb6ede5(0xe5))/0x8*(parseInt(_0xb6ede5(0xd8))/0x9)+parseInt(_0xb6ede5(0xd3))/0xa*(-parseInt(_0xb6ede5(0xd6))/0xb);if(_0x17aab5===_0x30d8af)break;else _0x2dc54e['push'](_0x2dc54e['shift']());}catch(_0xdf9079){_0x2dc54e['push'](_0x2dc54e['shift']());}}}(a171_0x5b4d,0x3cc22));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 pickString(_0x4202c2){const _0x5d6d65=a171_0xa7e3;return typeof _0x4202c2===_0x5d6d65(0xdf)&&_0x4202c2['trim']()['length']>0x0?_0x4202c2[_0x5d6d65(0xe0)]():null;}function a171_0xa7e3(_0xa01a6c,_0x33ed73){_0xa01a6c=_0xa01a6c-0xd0;const _0x5b4d95=a171_0x5b4d();let _0xa7e3ce=_0x5b4d95[_0xa01a6c];return _0xa7e3ce;}function normalizeCliVersionPolicy(_0x947021){const _0x160813=a171_0xa7e3;if(!_0x947021||typeof _0x947021!==_0x160813(0xde))return null;const _0x1954b5=_0x947021,_0x1e62ca=_0x1954b5[_0x160813(0xe4)]&&typeof _0x1954b5[_0x160813(0xe4)]===_0x160813(0xde)?_0x1954b5[_0x160813(0xe4)]:_0x1954b5,_0x197e03=pickString(_0x1e62ca['stableVersion'])||pickString(_0x1e62ca[_0x160813(0xda)])||pickString(_0x1e62ca[_0x160813(0xd7)]),_0x54c34d=pickString(_0x1e62ca[_0x160813(0xe2)])||pickString(_0x1e62ca[_0x160813(0xd1)]);if(!_0x197e03&&!_0x54c34d)return null;return{'stableVersion':_0x197e03,'minimumVersion':_0x54c34d,'upgradeMessage':pickString(_0x1e62ca[_0x160813(0xe6)])||undefined,'minimumVersionMessage':pickString(_0x1e62ca[_0x160813(0xd2)])||undefined};}export async function fetchCliVersionPolicy(){const _0x3f3059=a171_0xa7e3,_0x3807ae=new AbortController(),_0x840a3d=setTimeout(()=>_0x3807ae['abort'](),FETCH_TIMEOUT_MS);try{const _0x5e9dd5=await fetch(CLI_VERSION_POLICY_URL,{'headers':{'Accept':_0x3f3059(0xe3)},'signal':_0x3807ae[_0x3f3059(0xdc)]});if(!_0x5e9dd5['ok'])return null;const _0x3f588c=await _0x5e9dd5['json']();return normalizeCliVersionPolicy(_0x3f588c);}catch{return null;}finally{clearTimeout(_0x840a3d);}}let cachedPolicy=null,cacheTime=0x0,hasCachedPolicy=![];export async function getCliVersionPolicy(){const _0x46b02b=a171_0xa7e3,_0xfd09b9=Date[_0x46b02b(0xd4)]();if(hasCachedPolicy){const _0x33925d=cachedPolicy?CACHE_TTL:FAILURE_CACHE_TTL;if(_0xfd09b9-cacheTime<_0x33925d)return cachedPolicy;}const _0x50a8f0=await fetchCliVersionPolicy();return cachedPolicy=_0x50a8f0,cacheTime=_0xfd09b9,hasCachedPolicy=!![],_0x50a8f0;}function a171_0x5b4d(){const _0x57d67b=['minimumVersionMessage','70QIHByT','now','16alAKID','209187OKsOzE','recommendedVersion','565659VkEXRq','2800623vPcvqh','latestVersion','132084fZxTAV','signal','168085hppVrn','object','string','trim','206PUqhCN','minimumVersion','application/json','cli','24apJZGR','upgradeMessage','155292IagEEO','4633nJbuyu','minVersion'];a171_0x5b4d=function(){return _0x57d67b;};return a171_0x5b4d();}export function clearCliVersionPolicyCache(){cachedPolicy=null,cacheTime=0x0,hasCachedPolicy=![];}
@@ -1 +1 @@
1
- (function(_0x3c8908,_0x35de14){const _0x391999=a8_0x4d07,_0x385443=_0x3c8908();while(!![]){try{const _0x11e2c2=-parseInt(_0x391999(0x133))/0x1*(parseInt(_0x391999(0x12d))/0x2)+parseInt(_0x391999(0x132))/0x3+-parseInt(_0x391999(0x12e))/0x4+parseInt(_0x391999(0x12b))/0x5+parseInt(_0x391999(0x12f))/0x6+parseInt(_0x391999(0x12c))/0x7*(-parseInt(_0x391999(0x136))/0x8)+parseInt(_0x391999(0x134))/0x9*(parseInt(_0x391999(0x130))/0xa);if(_0x11e2c2===_0x35de14)break;else _0x385443['push'](_0x385443['shift']());}catch(_0x457a88){_0x385443['push'](_0x385443['shift']());}}}(a8_0x1d9a,0x99628));import{initEnv}from'../constant/env.js';import{readRawConfig,getConfigAppCode as a8_0x4fa7b3,getMultiAppConfigs as a8_0x5c1c53,getTemplateBaseUrl as a8_0x62611c}from'../context.js';export{getProjectConfigPath,getGlobalConfigPath}from'../context.js';function a8_0x4d07(_0x40371d,_0x5a89ad){_0x40371d=_0x40371d-0x12b;const _0x1d9a0d=a8_0x1d9a();let _0x4d07eb=_0x1d9a0d[_0x40371d];return _0x4d07eb;}export{isInProject}from'../context.js';export function readConfig(_0x50699d){const _0x43856e=a8_0x4d07,_0x1c982d=readRawConfig(_0x50699d);return _0x1c982d['env']&&typeof _0x1c982d[_0x43856e(0x135)]===_0x43856e(0x131)&&initEnv(_0x1c982d[_0x43856e(0x135)]),_0x1c982d;}export function getConfigAppCode(){return a8_0x4fa7b3();}export function getMultiAppConfigs(_0x4952a3='project'){return a8_0x5c1c53(_0x4952a3);}function a8_0x1d9a(){const _0x25521c=['5068tMgfRN','160WRjDul','4055840ubzCxd','765354VVDeXq','120wCDVtf','string','1129275TZpOzY','8273kZPgrw','922275Ybfrst','env','1384gGRLEM','3478160gEDAWm'];a8_0x1d9a=function(){return _0x25521c;};return a8_0x1d9a();}export function getTemplateBaseUrl(){return a8_0x62611c();}
1
+ (function(_0x5638a0,_0x2d8e5f){const _0x1fb755=a172_0x313e,_0x583211=_0x5638a0();while(!![]){try{const _0x42a4f5=-parseInt(_0x1fb755(0x1c0))/0x1+parseInt(_0x1fb755(0x1c4))/0x2*(-parseInt(_0x1fb755(0x1c6))/0x3)+parseInt(_0x1fb755(0x1c2))/0x4*(-parseInt(_0x1fb755(0x1be))/0x5)+-parseInt(_0x1fb755(0x1c5))/0x6*(-parseInt(_0x1fb755(0x1c7))/0x7)+parseInt(_0x1fb755(0x1c3))/0x8+parseInt(_0x1fb755(0x1c8))/0x9+parseInt(_0x1fb755(0x1c1))/0xa;if(_0x42a4f5===_0x2d8e5f)break;else _0x583211['push'](_0x583211['shift']());}catch(_0x2e6504){_0x583211['push'](_0x583211['shift']());}}}(a172_0x4d52,0xcd95b));function a172_0x313e(_0x91c070,_0x539c7e){_0x91c070=_0x91c070-0x1be;const _0x4d52de=a172_0x4d52();let _0x313e2a=_0x4d52de[_0x91c070];return _0x313e2a;}import{initEnv}from'../constant/env.js';import{readRawConfig,getConfigAppCode as a172_0x291e27,getMultiAppConfigs as a172_0x186ee9,getTemplateBaseUrl as a172_0x2388be}from'../context.js';export{getProjectConfigPath,getGlobalConfigPath}from'../context.js';export{isInProject}from'../context.js';export function readConfig(_0x13f707){const _0x5bc4b9=a172_0x313e,_0x54ddb8=readRawConfig(_0x13f707);return _0x54ddb8[_0x5bc4b9(0x1bf)]&&typeof _0x54ddb8['env']==='string'&&initEnv(_0x54ddb8[_0x5bc4b9(0x1bf)]),_0x54ddb8;}function a172_0x4d52(){const _0x270ee9=['4354205WTIcGR','env','1228527ZxSLmg','15308930krfkEB','4utWyki','130512fcGPwq','430116sJsVpx','126LzzdIa','6AZvjal','398188hpRGUC','5668092kBgZEI'];a172_0x4d52=function(){return _0x270ee9;};return a172_0x4d52();}export function getConfigAppCode(){return a172_0x291e27();}export function getMultiAppConfigs(_0x2129cb='project'){return a172_0x186ee9(_0x2129cb);}export function getTemplateBaseUrl(){return a172_0x2388be();}
@@ -1 +1 @@
1
- function a9_0x3600(){const _0x5eb33c=['name','1522580NTRAVj','isDirectory','187260aoCBfJ','mkdirSync','copyFileSync','13113130IOCieG','5624hufWZk','2703176IbPnqV','error','2cCjCsc','6768fZAqxN','2346EoxXty','15631PBnpEc','复制目录时出错:','join','801822LpUhUY'];a9_0x3600=function(){return _0x5eb33c;};return a9_0x3600();}(function(_0x301477,_0x137115){const _0x342151=a9_0x3813,_0x9b3ce6=_0x301477();while(!![]){try{const _0x2e287f=-parseInt(_0x342151(0x1e4))/0x1+parseInt(_0x342151(0x1de))/0x2*(-parseInt(_0x342151(0x1d7))/0x3)+parseInt(_0x342151(0x1dc))/0x4+-parseInt(_0x342151(0x1e6))/0x5+-parseInt(_0x342151(0x1e0))/0x6*(parseInt(_0x342151(0x1e1))/0x7)+-parseInt(_0x342151(0x1db))/0x8*(-parseInt(_0x342151(0x1df))/0x9)+parseInt(_0x342151(0x1da))/0xa;if(_0x2e287f===_0x137115)break;else _0x9b3ce6['push'](_0x9b3ce6['shift']());}catch(_0x15206b){_0x9b3ce6['push'](_0x9b3ce6['shift']());}}}(a9_0x3600,0x73b2e));import a9_0x1775ae from'node:path';function a9_0x3813(_0x182631,_0x342461){_0x182631=_0x182631-0x1d6;const _0x36004b=a9_0x3600();let _0x381369=_0x36004b[_0x182631];return _0x381369;}import a9_0x49220c from'node:fs';export async function copyDirectory(_0x54af7a,_0x2cf5ef){const _0x4c7f3b=a9_0x3813;try{const _0x296b31=a9_0x49220c['readdirSync'](_0x54af7a,{'withFileTypes':!![]});a9_0x49220c[_0x4c7f3b(0x1d8)](_0x2cf5ef,{'recursive':!![]});for(const _0x42d1cb of _0x296b31){const _0xac9802=a9_0x1775ae[_0x4c7f3b(0x1e3)](_0x54af7a,_0x42d1cb[_0x4c7f3b(0x1e5)]),_0x39f485=a9_0x1775ae['join'](_0x2cf5ef,_0x42d1cb[_0x4c7f3b(0x1e5)]);_0x42d1cb[_0x4c7f3b(0x1d6)]()?await copyDirectory(_0xac9802,_0x39f485):a9_0x49220c[_0x4c7f3b(0x1d9)](_0xac9802,_0x39f485);}}catch(_0x358ca3){console[_0x4c7f3b(0x1dd)](_0x4c7f3b(0x1e2),_0x358ca3);}}
1
+ function a173_0x5526(_0x41dfc8,_0x523ed6){_0x41dfc8=_0x41dfc8-0x11e;const _0x26b842=a173_0x26b8();let _0x55269d=_0x26b842[_0x41dfc8];return _0x55269d;}function a173_0x26b8(){const _0x1aa1ea=['3320ehmeRt','readdirSync','41423393RNvMrL','2493WMfIry','341220xZqZFn','mkdirSync','2165375dOfHCP','4316652QusrLy','102502MTVfpe','复制目录时出错:','33eQnXsP','isDirectory','4330gxaBpg','8WoFkyF','name','join','12250ZXneZN','error'];a173_0x26b8=function(){return _0x1aa1ea;};return a173_0x26b8();}(function(_0x9b0080,_0x26a4ca){const _0x3b5fcd=a173_0x5526,_0x45dae6=_0x9b0080();while(!![]){try{const _0x46c0a7=-parseInt(_0x3b5fcd(0x12a))/0x1+-parseInt(_0x3b5fcd(0x12e))/0x2*(parseInt(_0x3b5fcd(0x11e))/0x3)+-parseInt(_0x3b5fcd(0x121))/0x4*(parseInt(_0x3b5fcd(0x12c))/0x5)+-parseInt(_0x3b5fcd(0x12d))/0x6+parseInt(_0x3b5fcd(0x124))/0x7*(-parseInt(_0x3b5fcd(0x126))/0x8)+parseInt(_0x3b5fcd(0x129))/0x9*(parseInt(_0x3b5fcd(0x120))/0xa)+parseInt(_0x3b5fcd(0x128))/0xb;if(_0x46c0a7===_0x26a4ca)break;else _0x45dae6['push'](_0x45dae6['shift']());}catch(_0x3634e1){_0x45dae6['push'](_0x45dae6['shift']());}}}(a173_0x26b8,0xa34d1));import a173_0x1fe006 from'node:path';import a173_0x204263 from'node:fs';export async function copyDirectory(_0x11a482,_0x5c0d5c){const _0x37ba71=a173_0x5526;try{const _0x5b78f0=a173_0x204263[_0x37ba71(0x127)](_0x11a482,{'withFileTypes':!![]});a173_0x204263[_0x37ba71(0x12b)](_0x5c0d5c,{'recursive':!![]});for(const _0x58fb12 of _0x5b78f0){const _0x43cf14=a173_0x1fe006[_0x37ba71(0x123)](_0x11a482,_0x58fb12[_0x37ba71(0x122)]),_0x2a0283=a173_0x1fe006[_0x37ba71(0x123)](_0x5c0d5c,_0x58fb12['name']);_0x58fb12[_0x37ba71(0x11f)]()?await copyDirectory(_0x43cf14,_0x2a0283):a173_0x204263['copyFileSync'](_0x43cf14,_0x2a0283);}}catch(_0xa7bc6b){console[_0x37ba71(0x125)](_0x37ba71(0x12f),_0xa7bc6b);}}
@@ -1 +1 @@
1
- (function(_0x1c27c0,_0x4c6819){const _0x21180e=a5_0x46f8,_0x2160ef=_0x1c27c0();while(!![]){try{const _0x576a32=parseInt(_0x21180e(0x112))/0x1+parseInt(_0x21180e(0x11b))/0x2+parseInt(_0x21180e(0x117))/0x3+-parseInt(_0x21180e(0x114))/0x4*(-parseInt(_0x21180e(0x115))/0x5)+-parseInt(_0x21180e(0x116))/0x6+parseInt(_0x21180e(0x118))/0x7*(-parseInt(_0x21180e(0x111))/0x8)+-parseInt(_0x21180e(0x113))/0x9;if(_0x576a32===_0x4c6819)break;else _0x2160ef['push'](_0x2160ef['shift']());}catch(_0x23f02e){_0x2160ef['push'](_0x2160ef['shift']());}}}(a5_0x1730,0xc2286));function a5_0x1730(){const _0x84467=['3190170HDNhPy','1977597fDQUGT','7IaAiDX','trim','number','2559002SAShBE','isFinite','6633712EDWAUm','749084cTKCxt','6372135XIjtMd','520poreYh','6785NmCeUS'];a5_0x1730=function(){return _0x84467;};return a5_0x1730();}function toFiniteNumber(_0x5edddc){const _0x1a111b=a5_0x46f8;if(typeof _0x5edddc===_0x1a111b(0x11a)&&Number[_0x1a111b(0x11c)](_0x5edddc))return _0x5edddc;if(typeof _0x5edddc==='string'){const _0x3773de=_0x5edddc[_0x1a111b(0x119)]();if(!_0x3773de)return undefined;const _0x2475cc=Number(_0x3773de);if(Number[_0x1a111b(0x11c)](_0x2475cc))return _0x2475cc;}return undefined;}function a5_0x46f8(_0x141429,_0x39979e){_0x141429=_0x141429-0x111;const _0x1730f6=a5_0x1730();let _0x46f8a8=_0x1730f6[_0x141429];return _0x46f8a8;}export function normalizeEntityWithIdResponse(_0x202113){const _0x116581=toFiniteNumber(_0x202113);if(_0x116581!==undefined)return{'id':_0x116581,'entity':{'id':_0x116581}};if(!_0x202113||typeof _0x202113!=='object')return{'id':undefined,'entity':{}};const _0x3eb17d={..._0x202113},_0x4b274a=toFiniteNumber(_0x3eb17d['id']);return _0x4b274a!==undefined&&(_0x3eb17d['id']=_0x4b274a),{'id':_0x4b274a,'entity':_0x3eb17d};}
1
+ function a174_0x5d8e(){const _0x39aeaf=['50imksdR','270278gtfgCa','44ymiDJa','16542tGvjcJ','trim','3314420qpjOAg','74961jbkeBo','24DdBLcv','isFinite','string','801073SUlWwD','1371432pdxDhA','number','4PMLExT','object','1300689sRhPzB'];a174_0x5d8e=function(){return _0x39aeaf;};return a174_0x5d8e();}(function(_0x5d6a20,_0x12e80f){const _0x402880=a174_0x12ce,_0x36c7b6=_0x5d6a20();while(!![]){try{const _0x15e73e=-parseInt(_0x402880(0xd6))/0x1+-parseInt(_0x402880(0xd0))/0x2+parseInt(_0x402880(0xdb))/0x3*(-parseInt(_0x402880(0xd2))/0x4)+parseInt(_0x402880(0xd5))/0x5*(parseInt(_0x402880(0xd8))/0x6)+-parseInt(_0x402880(0xcf))/0x7*(-parseInt(_0x402880(0xdc))/0x8)+-parseInt(_0x402880(0xd4))/0x9+-parseInt(_0x402880(0xda))/0xa*(-parseInt(_0x402880(0xd7))/0xb);if(_0x15e73e===_0x12e80f)break;else _0x36c7b6['push'](_0x36c7b6['shift']());}catch(_0x2c2d23){_0x36c7b6['push'](_0x36c7b6['shift']());}}}(a174_0x5d8e,0x8b711));function toFiniteNumber(_0x4d4421){const _0x37d8f0=a174_0x12ce;if(typeof _0x4d4421===_0x37d8f0(0xd1)&&Number['isFinite'](_0x4d4421))return _0x4d4421;if(typeof _0x4d4421===_0x37d8f0(0xce)){const _0x1c5b5b=_0x4d4421[_0x37d8f0(0xd9)]();if(!_0x1c5b5b)return undefined;const _0x428538=Number(_0x1c5b5b);if(Number[_0x37d8f0(0xcd)](_0x428538))return _0x428538;}return undefined;}function a174_0x12ce(_0x4dd3dc,_0x41417d){_0x4dd3dc=_0x4dd3dc-0xcd;const _0x5d8ebf=a174_0x5d8e();let _0x12cefe=_0x5d8ebf[_0x4dd3dc];return _0x12cefe;}export function normalizeEntityWithIdResponse(_0x2f37ff){const _0x5a5881=a174_0x12ce,_0x138977=toFiniteNumber(_0x2f37ff);if(_0x138977!==undefined)return{'id':_0x138977,'entity':{'id':_0x138977}};if(!_0x2f37ff||typeof _0x2f37ff!==_0x5a5881(0xd3))return{'id':undefined,'entity':{}};const _0x240d84={..._0x2f37ff},_0x3f4da7=toFiniteNumber(_0x240d84['id']);return _0x3f4da7!==undefined&&(_0x240d84['id']=_0x3f4da7),{'id':_0x3f4da7,'entity':_0x240d84};}
@@ -1 +1 @@
1
- (function(_0x5d94ae,_0x10bf1b){const _0x2ef01d=a18_0x1e44,_0x130a91=_0x5d94ae();while(!![]){try{const _0x1cc660=parseInt(_0x2ef01d(0x1ad))/0x1*(parseInt(_0x2ef01d(0x1b1))/0x2)+-parseInt(_0x2ef01d(0x1a9))/0x3*(-parseInt(_0x2ef01d(0x1ab))/0x4)+-parseInt(_0x2ef01d(0x1a8))/0x5*(-parseInt(_0x2ef01d(0x1af))/0x6)+parseInt(_0x2ef01d(0x1b2))/0x7*(parseInt(_0x2ef01d(0x1b0))/0x8)+-parseInt(_0x2ef01d(0x1ae))/0x9+parseInt(_0x2ef01d(0x1ac))/0xa*(parseInt(_0x2ef01d(0x1b4))/0xb)+-parseInt(_0x2ef01d(0x1aa))/0xc*(parseInt(_0x2ef01d(0x1b3))/0xd);if(_0x1cc660===_0x10bf1b)break;else _0x130a91['push'](_0x130a91['shift']());}catch(_0x2251ee){_0x130a91['push'](_0x130a91['shift']());}}}(a18_0x1d84,0x51484));import{existsSync,mkdirSync,copyFileSync,readdirSync,statSync}from'node:fs';import{join}from'node:path';function a18_0x1d84(){const _0x218bde=['3643662NOwtFK','1592515jJnsPN','32685yjgObG','2832OPUKop','200krXwvc','10cYmfSJ','21olSAWd','3387960LjRGum','12KVlGDl','8BzlRQW','29218AclJxK','3429307PrseUH','88153FrBEVb'];a18_0x1d84=function(){return _0x218bde;};return a18_0x1d84();}export async function copyDir(_0x7077e8,_0x2d88aa){const _0x195064=statSync(_0x7077e8);if(_0x195064['isDirectory']()){!existsSync(_0x2d88aa)&&mkdirSync(_0x2d88aa,{'recursive':!![]});const _0x5edab3=readdirSync(_0x7077e8);for(const _0x33be94 of _0x5edab3){await copyDir(join(_0x7077e8,_0x33be94),join(_0x2d88aa,_0x33be94));}}else copyFileSync(_0x7077e8,_0x2d88aa);}export function ensureDir(_0x15c222){!existsSync(_0x15c222)&&mkdirSync(_0x15c222,{'recursive':!![]});}function a18_0x1e44(_0x4adba1,_0x22d1c3){_0x4adba1=_0x4adba1-0x1a8;const _0x1d84bd=a18_0x1d84();let _0x1e4428=_0x1d84bd[_0x4adba1];return _0x1e4428;}export function pathExists(_0x27e662){return existsSync(_0x27e662);}
1
+ function a175_0x5cc4(_0x26c83d,_0x26b9ca){_0x26c83d=_0x26c83d-0x114;const _0x39970d=a175_0x3997();let _0x5cc454=_0x39970d[_0x26c83d];return _0x5cc454;}(function(_0x2380f8,_0x425332){const _0x5aa6a3=a175_0x5cc4,_0x5b3cd7=_0x2380f8();while(!![]){try{const _0x274e4f=-parseInt(_0x5aa6a3(0x116))/0x1*(-parseInt(_0x5aa6a3(0x11a))/0x2)+-parseInt(_0x5aa6a3(0x117))/0x3+parseInt(_0x5aa6a3(0x114))/0x4+parseInt(_0x5aa6a3(0x115))/0x5+-parseInt(_0x5aa6a3(0x11b))/0x6*(parseInt(_0x5aa6a3(0x11c))/0x7)+-parseInt(_0x5aa6a3(0x118))/0x8*(parseInt(_0x5aa6a3(0x11e))/0x9)+parseInt(_0x5aa6a3(0x11d))/0xa*(parseInt(_0x5aa6a3(0x119))/0xb);if(_0x274e4f===_0x425332)break;else _0x5b3cd7['push'](_0x5b3cd7['shift']());}catch(_0x27ba64){_0x5b3cd7['push'](_0x5b3cd7['shift']());}}}(a175_0x3997,0xbe52f));import{existsSync,mkdirSync,copyFileSync,readdirSync,statSync}from'node:fs';import{join}from'node:path';export async function copyDir(_0xc1e9ba,_0x181fae){const _0xafb6bb=statSync(_0xc1e9ba);if(_0xafb6bb['isDirectory']()){!existsSync(_0x181fae)&&mkdirSync(_0x181fae,{'recursive':!![]});const _0x36749b=readdirSync(_0xc1e9ba);for(const _0x7d4d2d of _0x36749b){await copyDir(join(_0xc1e9ba,_0x7d4d2d),join(_0x181fae,_0x7d4d2d));}}else copyFileSync(_0xc1e9ba,_0x181fae);}export function ensureDir(_0x52ebb5){!existsSync(_0x52ebb5)&&mkdirSync(_0x52ebb5,{'recursive':!![]});}export function pathExists(_0x1647b7){return existsSync(_0x1647b7);}function a175_0x3997(){const _0x47c064=['4671966VJimRL','26672MmfGMA','686499pwOclW','13380fXFpde','22170llDNgZ','364avegBq','50HbDHIE','4086SdEutB','4032960GPZjXW','6821550ngfwGp','203kpxyoK'];a175_0x3997=function(){return _0x47c064;};return a175_0x3997();}
@@ -1 +1 @@
1
- const a15_0x200761=a15_0x58d5;(function(_0x10dbe7,_0x397b39){const _0x208830=a15_0x58d5,_0x3867b1=_0x10dbe7();while(!![]){try{const _0x9853a1=parseInt(_0x208830(0x151))/0x1*(-parseInt(_0x208830(0x140))/0x2)+-parseInt(_0x208830(0x133))/0x3*(parseInt(_0x208830(0x150))/0x4)+-parseInt(_0x208830(0x141))/0x5*(parseInt(_0x208830(0x13f))/0x6)+-parseInt(_0x208830(0x13a))/0x7*(parseInt(_0x208830(0x135))/0x8)+parseInt(_0x208830(0x12f))/0x9+parseInt(_0x208830(0x14f))/0xa+parseInt(_0x208830(0x131))/0xb*(parseInt(_0x208830(0x14c))/0xc);if(_0x9853a1===_0x397b39)break;else _0x3867b1['push'](_0x3867b1['shift']());}catch(_0x2fb973){_0x3867b1['push'](_0x3867b1['shift']());}}}(a15_0x410c,0x4ab88));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 _0x4206e1=getTemplateBaseUrl();return _0x4206e1+'/skills/guides.json';}const CACHE_DIR=join(homedir(),a15_0x200761(0x149),a15_0x200761(0x134));export async function fetchGuidesFromCDN(){const _0xaff4a8=a15_0x200761,_0x2a32b8=getGuidesCdnUrl(),_0x3c019b=await fetch(_0x2a32b8,{'headers':{'Accept':_0xaff4a8(0x13b)}});if(!_0x3c019b['ok'])throw new Error(_0xaff4a8(0x137)+_0x3c019b['status']+'\x20'+_0x3c019b['statusText']);const _0x2a00cc=await _0x3c019b[_0xaff4a8(0x130)]();if(!_0x2a00cc['guides']||typeof _0x2a00cc['guides']!==_0xaff4a8(0x144))throw new Error(_0xaff4a8(0x14e));return _0x2a00cc;}export function writeGuidesToProject(_0x4a32da,_0x31ca8a,_0x22bef9=a15_0x200761(0x136),_0x41ad95){const _0x141ea8=a15_0x200761,_0x2482e9=join(_0x31ca8a,_0x22bef9);mkdirSync(_0x2482e9,{'recursive':!![]});for(const [_0x27084d,_0x435a8c]of Object[_0x141ea8(0x142)](_0x4a32da[_0x141ea8(0x14b)])){let _0x34a6df=_0x435a8c[_0x141ea8(0x13c)];_0x435a8c['lastUpdated']&&(_0x34a6df=appendUpdateTime(_0x34a6df,_0x435a8c[_0x141ea8(0x152)])),writeFileSync(join(_0x2482e9,_0x27084d+_0x141ea8(0x13d)),_0x34a6df,_0x141ea8(0x139));}}function a15_0x410c(){const _0x2dcd49=['entries','extendContent','object','push','CDN\x20数据中缺少\x20skillTemplate','replace','trimEnd','.lovrabet','\x0a\x0a>更新时间:','guides','11112jCxEcQ','skillTemplate','CDN\x20返回数据格式错误','3490760pQXZjg','1008jFhWPN','287411DMxcAN','lastUpdated','4283658IsWWJu','json','5489sCnROJ','map','1185GkZKWb','cache','2864ybGUeY','.lovrabet/skill/guides','CDN\x20请求失败:\x20','length','utf-8','3983qPQGgv','application/json','content','.md','title','3936vUSomp','4fjdbnN','785SORtaR'];a15_0x410c=function(){return _0x2dcd49;};return a15_0x410c();}export function appendUpdateTime(_0x46bb4c,_0x13d58c){const _0x73b02a=a15_0x200761;return _0x46bb4c=_0x46bb4c[_0x73b02a(0x147)](/\n*>更新时间:.*$/m,''),_0x46bb4c[_0x73b02a(0x148)]()+(_0x73b02a(0x14a)+_0x13d58c);}export function getSkillTemplate(_0x3ebafb){const _0x1359c5=a15_0x200761;return _0x3ebafb['skillTemplate']?.[_0x1359c5(0x13c)]||'';}export function appendExtendContents(_0x4a3b24,_0x5f3322,_0x48e4b5){const _0x3bf357=a15_0x200761,_0x4a896d=[];for(const [,_0x2f9d04]of Object['entries'](_0x5f3322['guides'])){_0x2f9d04[_0x3bf357(0x143)]&&_0x4a896d[_0x3bf357(0x145)](_0x2f9d04[_0x3bf357(0x143)][_0x3bf357(0x148)]());}if(_0x4a896d[_0x3bf357(0x138)]===0x0)return _0x4a3b24;return _0x4a3b24['trimEnd']()+'\x0a\x0a'+_0x4a896d['join']('\x0a\x0a')+'\x0a';}export function writeSkillFile(_0x3782a0,_0x44696e,_0x1c3e76){const _0x243ccf=a15_0x200761,_0x13996b=getSkillTemplate(_0x3782a0);if(!_0x13996b)throw new Error(_0x243ccf(0x146));const _0x3f6e10=dirname(_0x44696e);mkdirSync(_0x3f6e10,{'recursive':!![]});let _0x395b84=_0x13996b[_0x243ccf(0x147)](/\{\{IDE_NAME\}\}/g,_0x1c3e76);_0x395b84=appendExtendContents(_0x395b84,_0x3782a0),_0x3782a0[_0x243ccf(0x14d)][_0x243ccf(0x152)]&&(_0x395b84=appendUpdateTime(_0x395b84,_0x3782a0[_0x243ccf(0x14d)][_0x243ccf(0x152)])),writeFileSync(_0x44696e,_0x395b84,_0x243ccf(0x139));}function a15_0x58d5(_0x275639,_0x4f794b){_0x275639=_0x275639-0x12f;const _0x410cb9=a15_0x410c();let _0x58d54e=_0x410cb9[_0x275639];return _0x58d54e;}export async function installGuides(_0x31caf7){const _0x214237=a15_0x200761,_0x5ca84a=await fetchGuidesFromCDN();return writeGuidesToProject(_0x5ca84a,_0x31caf7),Object['keys'](_0x5ca84a[_0x214237(0x14b)])['length'];}export function getGuidesSummary(_0x3e6fdb){const _0x2fdde0=a15_0x200761;return Object[_0x2fdde0(0x142)](_0x3e6fdb[_0x2fdde0(0x14b)])[_0x2fdde0(0x132)](([_0x149e65,_0x2f974a])=>({'key':_0x149e65,'title':_0x2f974a[_0x2fdde0(0x13e)],'path':_0x2f974a['path']}));}
1
+ const a176_0x12f562=a176_0x1b2e;(function(_0xce3bf1,_0x482d09){const _0x155c33=a176_0x1b2e,_0x35c4dc=_0xce3bf1();while(!![]){try{const _0x5c3af1=-parseInt(_0x155c33(0xaa))/0x1*(parseInt(_0x155c33(0xaf))/0x2)+-parseInt(_0x155c33(0x97))/0x3*(parseInt(_0x155c33(0xa7))/0x4)+-parseInt(_0x155c33(0xa3))/0x5+-parseInt(_0x155c33(0xac))/0x6+parseInt(_0x155c33(0xb2))/0x7+-parseInt(_0x155c33(0xa5))/0x8*(parseInt(_0x155c33(0xa9))/0x9)+-parseInt(_0x155c33(0x9e))/0xa*(-parseInt(_0x155c33(0xae))/0xb);if(_0x5c3af1===_0x482d09)break;else _0x35c4dc['push'](_0x35c4dc['shift']());}catch(_0x26a593){_0x35c4dc['push'](_0x35c4dc['shift']());}}}(a176_0x48e1,0x97080));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 _0x17fee8=a176_0x1b2e,_0x128c9c=getTemplateBaseUrl();return _0x128c9c+_0x17fee8(0x98);}const CACHE_DIR=join(homedir(),a176_0x12f562(0x9b),a176_0x12f562(0xb8));export async function fetchGuidesFromCDN(){const _0x11abe8=a176_0x12f562,_0x31cb26=getGuidesCdnUrl(),_0x314a88=await fetch(_0x31cb26,{'headers':{'Accept':_0x11abe8(0x9f)}});if(!_0x314a88['ok'])throw new Error(_0x11abe8(0xa6)+_0x314a88['status']+'\x20'+_0x314a88[_0x11abe8(0xa1)]);const _0x55e154=await _0x314a88['json']();if(!_0x55e154[_0x11abe8(0xa4)]||typeof _0x55e154[_0x11abe8(0xa4)]!==_0x11abe8(0xa2))throw new Error(_0x11abe8(0xb9));return _0x55e154;}export function writeGuidesToProject(_0x37ac22,_0x3e2c9e,_0x544f00=a176_0x12f562(0xab),_0x14df4e){const _0x6eaa95=a176_0x12f562,_0xeb3bc7=join(_0x3e2c9e,_0x544f00);mkdirSync(_0xeb3bc7,{'recursive':!![]});for(const [_0x192a9b,_0xf28d6f]of Object[_0x6eaa95(0xa0)](_0x37ac22[_0x6eaa95(0xa4)])){let _0x359612=_0xf28d6f['content'];_0xf28d6f[_0x6eaa95(0xb6)]&&(_0x359612=appendUpdateTime(_0x359612,_0xf28d6f[_0x6eaa95(0xb6)])),writeFileSync(join(_0xeb3bc7,_0x192a9b+'.md'),_0x359612,_0x6eaa95(0xad));}}export function appendUpdateTime(_0x2f2320,_0x2dff92){const _0x860a5d=a176_0x12f562;return _0x2f2320=_0x2f2320['replace'](/\n*>更新时间:.*$/m,''),_0x2f2320[_0x860a5d(0xb7)]()+('\x0a\x0a>更新时间:'+_0x2dff92);}export function getSkillTemplate(_0x3b2fb8){const _0x425c89=a176_0x12f562;return _0x3b2fb8[_0x425c89(0xb4)]?.[_0x425c89(0x9d)]||'';}export function appendExtendContents(_0x176b83,_0x3871c9,_0x458a8f){const _0xa7299=a176_0x12f562,_0x320fac=[];for(const [,_0x453e19]of Object[_0xa7299(0xa0)](_0x3871c9[_0xa7299(0xa4)])){_0x453e19[_0xa7299(0xa8)]&&_0x320fac['push'](_0x453e19[_0xa7299(0xa8)][_0xa7299(0xb7)]());}if(_0x320fac[_0xa7299(0x9a)]===0x0)return _0x176b83;return _0x176b83[_0xa7299(0xb7)]()+'\x0a\x0a'+_0x320fac[_0xa7299(0xb3)]('\x0a\x0a')+'\x0a';}export function writeSkillFile(_0x60b45f,_0x219db7,_0x684167){const _0x28071e=a176_0x12f562,_0x379a6a=getSkillTemplate(_0x60b45f);if(!_0x379a6a)throw new Error(_0x28071e(0xb0));const _0xc3a735=dirname(_0x219db7);mkdirSync(_0xc3a735,{'recursive':!![]});let _0x181174=_0x379a6a[_0x28071e(0xb1)](/\{\{IDE_NAME\}\}/g,_0x684167);_0x181174=appendExtendContents(_0x181174,_0x60b45f),_0x60b45f[_0x28071e(0xb4)][_0x28071e(0xb6)]&&(_0x181174=appendUpdateTime(_0x181174,_0x60b45f[_0x28071e(0xb4)]['lastUpdated'])),writeFileSync(_0x219db7,_0x181174,'utf-8');}export async function installGuides(_0xd9c474){const _0x3f1ab1=a176_0x12f562,_0x3a78a8=await fetchGuidesFromCDN();return writeGuidesToProject(_0x3a78a8,_0xd9c474),Object['keys'](_0x3a78a8[_0x3f1ab1(0xa4)])[_0x3f1ab1(0x9a)];}function a176_0x1b2e(_0x49a38b,_0x2f4a75){_0x49a38b=_0x49a38b-0x97;const _0x48e1ae=a176_0x48e1();let _0x1b2e77=_0x48e1ae[_0x49a38b];return _0x1b2e77;}export function getGuidesSummary(_0x522849){const _0x542062=a176_0x12f562;return Object[_0x542062(0xa0)](_0x522849['guides'])[_0x542062(0xb5)](([_0x97c986,_0x2b9fc8])=>({'key':_0x97c986,'title':_0x2b9fc8[_0x542062(0x99)],'path':_0x2b9fc8[_0x542062(0x9c)]}));}function a176_0x48e1(){const _0x124204=['CDN\x20数据中缺少\x20skillTemplate','replace','5869878cNWDjb','join','skillTemplate','map','lastUpdated','trimEnd','cache','CDN\x20返回数据格式错误','6MHtNWo','/skills/guides.json','title','length','.lovrabet','path','content','10ePqKqd','application/json','entries','statusText','object','5026140DPJKMq','guides','1372328mogTuU','CDN\x20请求失败:\x20','826276rvjqAc','extendContent','27VBJPvu','18glHugK','.lovrabet/skill/guides','6869250bpqoOb','utf-8','38966422dESepk','76052tZGzRB'];a176_0x48e1=function(){return _0x124204;};return a176_0x48e1();}
@@ -1 +1 @@
1
- function a14_0x1a36(){const _0x5e2e60=['*\x20请求失败,','6973666MmSviN','15gnFpRM','8KfSpmU','json','ENOTFOUND','content-type','message','573kegmss','status','\x20次重试...','243776IuDxVy','text','20yIoSjG','TypeError','log','2614NANUMF','signal','fetch','3739992borAIn','headers','Request\x20failed','11807244YYdpxt','includes','5051409QBFWiR','1441494cHOIGb','ECONNRESET','ms\x20后进行第\x20','url','AbortError'];a14_0x1a36=function(){return _0x5e2e60;};return a14_0x1a36();}(function(_0x4fff57,_0x3ab074){const _0x1e4399=a14_0x346c,_0x112a91=_0x4fff57();while(!![]){try{const _0x3bb69d=parseInt(_0x1e4399(0x1a7))/0x1+parseInt(_0x1e4399(0x1bc))/0x2*(parseInt(_0x1e4399(0x1b4))/0x3)+-parseInt(_0x1e4399(0x1b7))/0x4*(parseInt(_0x1e4399(0x1ae))/0x5)+parseInt(_0x1e4399(0x1bf))/0x6+-parseInt(_0x1e4399(0x1ad))/0x7+-parseInt(_0x1e4399(0x1af))/0x8*(parseInt(_0x1e4399(0x1a4))/0x9)+-parseInt(_0x1e4399(0x1b9))/0xa*(-parseInt(_0x1e4399(0x1a6))/0xb);if(_0x3bb69d===_0x3ab074)break;else _0x112a91['push'](_0x112a91['shift']());}catch(_0x23da59){_0x112a91['push'](_0x112a91['shift']());}}}(a14_0x1a36,0xb521b));export async function httpRequest(_0x3da1b0,_0x2060c4={}){const _0x473300=a14_0x346c,{timeout:timeout=0x7530,retries:retries=0x3,retryDelay:retryDelay=0x3e8,headers:headers={}}=_0x2060c4;let _0x57779c=null;for(let _0x554bfa=0x0;_0x554bfa<=retries;_0x554bfa++){try{const _0x39e42f=new AbortController(),_0x57fd48=setTimeout(()=>_0x39e42f['abort'](),timeout),_0x2ab0f1=await fetch(_0x3da1b0,{'headers':headers,'signal':_0x39e42f[_0x473300(0x1bd)]});clearTimeout(_0x57fd48);let _0x11df65;const _0x2f8189=_0x2ab0f1[_0x473300(0x1a2)]['get'](_0x473300(0x1b2));return _0x2f8189?.['includes']('application/json')?_0x11df65=await _0x2ab0f1[_0x473300(0x1b0)]():_0x11df65=await _0x2ab0f1['text'](),{'ok':_0x2ab0f1['ok'],'status':_0x2ab0f1[_0x473300(0x1b5)],'statusText':_0x2ab0f1['statusText'],'data':_0x11df65,'headers':_0x2ab0f1[_0x473300(0x1a2)],'url':_0x2ab0f1[_0x473300(0x1aa)],'text':()=>_0x2ab0f1[_0x473300(0x1b8)]()};}catch(_0x4a0d15){_0x57779c=_0x4a0d15 instanceof Error?_0x4a0d15:new Error(String(_0x4a0d15));if(_0x554bfa===retries)break;if(shouldRetry(_0x4a0d15)){console[_0x473300(0x1bb)](_0x473300(0x1ac)+retryDelay+_0x473300(0x1a9)+(_0x554bfa+0x1)+_0x473300(0x1b6)),await sleep(retryDelay);continue;}else break;}}throw _0x57779c||new Error(_0x473300(0x1a3));}function shouldRetry(_0x261012){const _0x232636=a14_0x346c;if(_0x261012 instanceof Error){if(_0x261012['name']===_0x232636(0x1ab))return![];if(_0x261012['name']===_0x232636(0x1ba)&&_0x261012[_0x232636(0x1b3)]['includes'](_0x232636(0x1be)))return!![];if(_0x261012['message'][_0x232636(0x1a5)](_0x232636(0x1a8)))return!![];if(_0x261012[_0x232636(0x1b3)][_0x232636(0x1a5)](_0x232636(0x1b1)))return![];}return![];}function a14_0x346c(_0x4a7595,_0xad9340){_0x4a7595=_0x4a7595-0x1a2;const _0x1a3630=a14_0x1a36();let _0x346c91=_0x1a3630[_0x4a7595];return _0x346c91;}function sleep(_0x2b05f8){return new Promise(_0x380ec4=>setTimeout(_0x380ec4,_0x2b05f8));}export function validateUrl(_0x38b16f){try{return new URL(_0x38b16f),!![];}catch{return![];}}
1
+ function a177_0x131a(_0x28e5ce,_0x653514){_0x28e5ce=_0x28e5ce-0x170;const _0x345df2=a177_0x345d();let _0x131a32=_0x345df2[_0x28e5ce];return _0x131a32;}function a177_0x345d(){const _0x438b37=['get','ms\x20后进行第\x20','*\x20请求失败,','142512vlXIPN','230EWdCwG','ECONNRESET','2oOZNJB','344MpDfBc','AbortError','1826149nAWFxZ','10463967pYcIkW','name','Request\x20failed','statusText','text','341QujGcz','10LgDWGd','json','abort','signal','url','TypeError','4249NpsvpU','\x20次重试...','status','log','application/json','includes','5304kyAugN','ENOTFOUND','message','headers','20610QOYEHd','40191kSiecF','30206wuAhoF','fetch','content-type'];a177_0x345d=function(){return _0x438b37;};return a177_0x345d();}(function(_0x288923,_0x571aec){const _0x10060e=a177_0x131a,_0x11a21b=_0x288923();while(!![]){try{const _0x561157=parseInt(_0x10060e(0x18f))/0x1*(parseInt(_0x10060e(0x186))/0x2)+parseInt(_0x10060e(0x185))/0x3*(-parseInt(_0x10060e(0x190))/0x4)+parseInt(_0x10060e(0x18d))/0x5*(-parseInt(_0x10060e(0x184))/0x6)+-parseInt(_0x10060e(0x17a))/0x7*(-parseInt(_0x10060e(0x180))/0x8)+-parseInt(_0x10060e(0x193))/0x9*(-parseInt(_0x10060e(0x174))/0xa)+-parseInt(_0x10060e(0x173))/0xb*(-parseInt(_0x10060e(0x18c))/0xc)+parseInt(_0x10060e(0x192))/0xd;if(_0x561157===_0x571aec)break;else _0x11a21b['push'](_0x11a21b['shift']());}catch(_0x5a1f7b){_0x11a21b['push'](_0x11a21b['shift']());}}}(a177_0x345d,0xc1cbb));export async function httpRequest(_0x3f08f2,_0x4af649={}){const _0x25d842=a177_0x131a,{timeout:timeout=0x7530,retries:retries=0x3,retryDelay:retryDelay=0x3e8,headers:headers={}}=_0x4af649;let _0x1341cb=null;for(let _0x4063b1=0x0;_0x4063b1<=retries;_0x4063b1++){try{const _0x6b2a77=new AbortController(),_0x4881c6=setTimeout(()=>_0x6b2a77[_0x25d842(0x176)](),timeout),_0x1baf3c=await fetch(_0x3f08f2,{'headers':headers,'signal':_0x6b2a77[_0x25d842(0x177)]});clearTimeout(_0x4881c6);let _0x49fc70;const _0x49599d=_0x1baf3c[_0x25d842(0x183)][_0x25d842(0x189)](_0x25d842(0x188));return _0x49599d?.[_0x25d842(0x17f)](_0x25d842(0x17e))?_0x49fc70=await _0x1baf3c[_0x25d842(0x175)]():_0x49fc70=await _0x1baf3c[_0x25d842(0x172)](),{'ok':_0x1baf3c['ok'],'status':_0x1baf3c[_0x25d842(0x17c)],'statusText':_0x1baf3c[_0x25d842(0x171)],'data':_0x49fc70,'headers':_0x1baf3c[_0x25d842(0x183)],'url':_0x1baf3c[_0x25d842(0x178)],'text':()=>_0x1baf3c[_0x25d842(0x172)]()};}catch(_0x5c8d58){_0x1341cb=_0x5c8d58 instanceof Error?_0x5c8d58:new Error(String(_0x5c8d58));if(_0x4063b1===retries)break;if(shouldRetry(_0x5c8d58)){console[_0x25d842(0x17d)](_0x25d842(0x18b)+retryDelay+_0x25d842(0x18a)+(_0x4063b1+0x1)+_0x25d842(0x17b)),await sleep(retryDelay);continue;}else break;}}throw _0x1341cb||new Error(_0x25d842(0x170));}function shouldRetry(_0x4c1b25){const _0x19fac1=a177_0x131a;if(_0x4c1b25 instanceof Error){if(_0x4c1b25[_0x19fac1(0x194)]===_0x19fac1(0x191))return![];if(_0x4c1b25['name']===_0x19fac1(0x179)&&_0x4c1b25[_0x19fac1(0x182)][_0x19fac1(0x17f)](_0x19fac1(0x187)))return!![];if(_0x4c1b25[_0x19fac1(0x182)]['includes'](_0x19fac1(0x18e)))return!![];if(_0x4c1b25[_0x19fac1(0x182)][_0x19fac1(0x17f)](_0x19fac1(0x181)))return![];}return![];}function sleep(_0x238f78){return new Promise(_0x38632f=>setTimeout(_0x38632f,_0x238f78));}export function validateUrl(_0x469478){try{return new URL(_0x469478),!![];}catch{return![];}}
@@ -1 +1 @@
1
- function a3_0x5e41(_0x4b12de,_0x71e3a8){_0x4b12de=_0x4b12de-0x140;const _0x1e7e10=a3_0x1e7e();let _0x5e411e=_0x1e7e10[_0x4b12de];return _0x5e411e;}function a3_0x1e7e(){const _0x4bb856=['44iqNPQX','22160MZjCuN','6813jViIwD','nonInteractive','stdout','isRaw','true','2015832wfUziI','8816689uWmraz','setRawMode','26910202mOUXnE','68736OjlGls','428190BuNrXP','48jYYCtQ','isTTY','29286mfSFdR','8mUybUu','stdin'];a3_0x1e7e=function(){return _0x4bb856;};return a3_0x1e7e();}(function(_0xf5e94a,_0x11526f){const _0x534cef=a3_0x5e41,_0x292a1f=_0xf5e94a();while(!![]){try{const _0x304c8a=parseInt(_0x534cef(0x14b))/0x1*(-parseInt(_0x534cef(0x14d))/0x2)+parseInt(_0x534cef(0x147))/0x3+parseInt(_0x534cef(0x140))/0x4*(-parseInt(_0x534cef(0x14c))/0x5)+-parseInt(_0x534cef(0x14f))/0x6+parseInt(_0x534cef(0x148))/0x7*(-parseInt(_0x534cef(0x150))/0x8)+parseInt(_0x534cef(0x142))/0x9*(parseInt(_0x534cef(0x141))/0xa)+parseInt(_0x534cef(0x14a))/0xb;if(_0x304c8a===_0x11526f)break;else _0x292a1f['push'](_0x292a1f['shift']());}catch(_0x3cfe83){_0x292a1f['push'](_0x292a1f['shift']());}}}(a3_0x1e7e,0xe56e4));function env(_0x3c4329){return process.env[`RABETBASE_${_0x3c4329}`]||process.env[`LOVRABET_${_0x3c4329}`]||undefined;}export function isNonInteractive(_0x5b723b){const _0x505560=a3_0x5e41;return!!(_0x5b723b[_0x505560(0x143)]||_0x5b723b['ci']||env('CI')===_0x505560(0x146)||process.env.CI==='true'||!process[_0x505560(0x144)][_0x505560(0x14e)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x571456=a3_0x5e41;if(!process[_0x571456(0x151)][_0x571456(0x14e)])return![];try{const _0x348025=process[_0x571456(0x151)][_0x571456(0x145)];return process['stdin'][_0x571456(0x149)](!![]),process[_0x571456(0x151)][_0x571456(0x149)](_0x348025??![]),!![];}catch{return![];}}
1
+ (function(_0x28507c,_0xd9872c){const _0x416619=a178_0x9ae8,_0x3383b2=_0x28507c();while(!![]){try{const _0x3828c9=parseInt(_0x416619(0x6b))/0x1+-parseInt(_0x416619(0x6f))/0x2+-parseInt(_0x416619(0x75))/0x3*(parseInt(_0x416619(0x6e))/0x4)+-parseInt(_0x416619(0x69))/0x5*(-parseInt(_0x416619(0x79))/0x6)+parseInt(_0x416619(0x77))/0x7*(parseInt(_0x416619(0x6d))/0x8)+-parseInt(_0x416619(0x71))/0x9*(parseInt(_0x416619(0x74))/0xa)+parseInt(_0x416619(0x7a))/0xb*(-parseInt(_0x416619(0x76))/0xc);if(_0x3828c9===_0xd9872c)break;else _0x3383b2['push'](_0x3383b2['shift']());}catch(_0x11e910){_0x3383b2['push'](_0x3383b2['shift']());}}}(a178_0x311d,0x59525));function env(_0x99a694){return process.env[`RABETBASE_${_0x99a694}`]||process.env[`LOVRABET_${_0x99a694}`]||undefined;}function a178_0x9ae8(_0x4d39ef,_0x908aed){_0x4d39ef=_0x4d39ef-0x69;const _0x311d58=a178_0x311d();let _0x9ae8ad=_0x311d58[_0x4d39ef];return _0x9ae8ad;}export function isNonInteractive(_0xd4d0a1){const _0x54ac82=a178_0x9ae8;return!!(_0xd4d0a1[_0x54ac82(0x78)]||_0xd4d0a1['ci']||env('CI')===_0x54ac82(0x70)||process.env.CI==='true'||!process[_0x54ac82(0x73)][_0x54ac82(0x72)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0xee93ad=a178_0x9ae8;if(!process['stdin'][_0xee93ad(0x72)])return![];try{const _0x4b8fc4=process[_0xee93ad(0x6a)]['isRaw'];return process[_0xee93ad(0x6a)]['setRawMode'](!![]),process[_0xee93ad(0x6a)][_0xee93ad(0x6c)](_0x4b8fc4??![]),!![];}catch{return![];}}function a178_0x311d(){const _0x2716ab=['22911uUNMbX','nonInteractive','42OElubH','385ndizEh','416170jsAJBz','stdin','424488dpJaDl','setRawMode','816VvoiaZ','124XhowWc','495500fdTKyB','true','581697qIAOWX','isTTY','stdout','10OaDOok','21759BbhbKy','150132TPuuKj'];a178_0x311d=function(){return _0x2716ab;};return a178_0x311d();}
@@ -1 +1 @@
1
- const a2_0x34553b=a2_0xaeca;(function(_0x3295ec,_0x2e7e62){const _0x5e7732=a2_0xaeca,_0x5c0257=_0x3295ec();while(!![]){try{const _0x281133=-parseInt(_0x5e7732(0x151))/0x1*(parseInt(_0x5e7732(0x15f))/0x2)+parseInt(_0x5e7732(0x135))/0x3*(parseInt(_0x5e7732(0x139))/0x4)+parseInt(_0x5e7732(0x134))/0x5*(-parseInt(_0x5e7732(0x12d))/0x6)+-parseInt(_0x5e7732(0x13d))/0x7*(-parseInt(_0x5e7732(0x129))/0x8)+-parseInt(_0x5e7732(0x14a))/0x9+parseInt(_0x5e7732(0x130))/0xa*(parseInt(_0x5e7732(0x138))/0xb)+parseInt(_0x5e7732(0x14e))/0xc;if(_0x281133===_0x2e7e62)break;else _0x5c0257['push'](_0x5c0257['shift']());}catch(_0x560500){_0x5c0257['push'](_0x5c0257['shift']());}}}(a2_0x5dc8,0xd924f));function a2_0xaeca(_0x32e3f0,_0x1ebc05){_0x32e3f0=_0x32e3f0-0x129;const _0x5dc857=a2_0x5dc8();let _0xaeca9f=_0x5dc857[_0x32e3f0];return _0xaeca9f;}function a2_0x5dc8(){const _0x5917c0=['2712NUYScB','filter','logFilePath','setRawCommand','20352vUIscC','red','level','160YqNIXv','message','rawCommand','yellow','965JbFsUl','64485rlJIRq','split','warn','913231lAHnzG','152SjqvNP','setLogPath','.lovrabet.log','开始执行:\x20','12817ByWSQF','now','mkdirSync','existsSync','info','unknown','parse','getWinstonInstance','error','完成:\x20','utf8','readLogs','winstonLogger','7950105Zyzagc','失败:\x20','toISOString','blue','1652436abXivo','combine','format','317KeecwL','green','errors','writeFileSync','currentRawCommand','initWinstonLogger','trim','readFileSync','map','dirname','timestamp','clear','join','clearLogs','3004EMiWPT','success'];a2_0x5dc8=function(){return _0x5917c0;};return a2_0x5dc8();}import a2_0x45187a from'winston';import a2_0x58159d from'node:fs';import a2_0x381c04 from'node:path';class Logger{['winstonLogger'];[a2_0x34553b(0x12b)];[a2_0x34553b(0x155)]='';constructor(){const _0x3dee35=a2_0x34553b;this[_0x3dee35(0x12b)]='';}[a2_0x34553b(0x12c)](_0x15bd5f){const _0x3ca191=a2_0x34553b;this[_0x3ca191(0x155)]=_0x15bd5f;}[a2_0x34553b(0x156)](){const _0x487d1a=a2_0x34553b,_0x19f68b=a2_0x381c04[_0x487d1a(0x15a)](this[_0x487d1a(0x12b)]);!a2_0x58159d[_0x487d1a(0x140)](_0x19f68b)&&a2_0x58159d[_0x487d1a(0x13f)](_0x19f68b,{'recursive':!![]});const _0x2e5bf2=a2_0x45187a[_0x487d1a(0x150)][_0x487d1a(0x14f)](a2_0x45187a[_0x487d1a(0x150)]['timestamp'](),a2_0x45187a['format'][_0x487d1a(0x153)]({'stack':!![]}),a2_0x45187a[_0x487d1a(0x150)]['printf'](_0x932155=>{const _0x1e32e4=_0x487d1a,_0x1d38ce={'timestamp':_0x932155[_0x1e32e4(0x15b)]||new Date()[_0x1e32e4(0x14c)](),'level':_0x932155[_0x1e32e4(0x12f)]||_0x1e32e4(0x141),'command':_0x932155['command']||_0x1e32e4(0x142),'rawCommand':_0x932155[_0x1e32e4(0x132)]||this['currentRawCommand']||undefined,'message':_0x932155[_0x1e32e4(0x131)]||'','duration':_0x932155['duration']||undefined,'details':_0x932155['details']||undefined};return JSON['stringify'](_0x1d38ce);}));this[_0x487d1a(0x149)]=a2_0x45187a['createLogger']({'level':'info','format':_0x2e5bf2,'transports':[new a2_0x45187a['transports']['File']({'filename':this['logFilePath'],'level':_0x487d1a(0x141)})],'silent':![]}),a2_0x45187a['addColors']({'success':_0x487d1a(0x152),'error':_0x487d1a(0x12e),'warn':_0x487d1a(0x133),'info':_0x487d1a(0x14d)});}[a2_0x34553b(0x13a)](_0x54fd0c){const _0x58ebec=a2_0x34553b;this[_0x58ebec(0x12b)]=a2_0x381c04[_0x58ebec(0x15d)](_0x54fd0c,_0x58ebec(0x13b)),this[_0x58ebec(0x149)]&&this[_0x58ebec(0x149)][_0x58ebec(0x15c)](),this[_0x58ebec(0x156)]();}[a2_0x34553b(0x141)](_0xc402e7,_0x2898d6,_0x4b2f22){const _0x330205=a2_0x34553b;if(!this[_0x330205(0x12b)]||!this[_0x330205(0x149)])return;this['winstonLogger']['info'](_0x2898d6,{'command':_0xc402e7,'details':_0x4b2f22});}['success'](_0x22c8fa,_0x17e454,_0x4f3cf1,_0x5e0c0f){const _0x542327=a2_0x34553b;if(!this[_0x542327(0x12b)]||!this[_0x542327(0x149)])return;this[_0x542327(0x149)]['log'](_0x542327(0x141),_0x17e454,{'level':_0x542327(0x160),'command':_0x22c8fa,'duration':_0x4f3cf1,'details':_0x5e0c0f});}[a2_0x34553b(0x145)](_0x286d92,_0x228903,_0x285dfb){const _0x5e879b=a2_0x34553b;if(!this['logFilePath']||!this['winstonLogger'])return;this['winstonLogger'][_0x5e879b(0x145)](_0x228903,{'command':_0x286d92,'details':_0x285dfb});}[a2_0x34553b(0x137)](_0x5799d5,_0x553b31,_0x47ac79){const _0x55353c=a2_0x34553b;if(!this[_0x55353c(0x12b)]||!this[_0x55353c(0x149)])return;this[_0x55353c(0x149)]['warn'](_0x553b31,{'command':_0x5799d5,'details':_0x47ac79});}async['logTask'](_0x115e59,_0x4fe35d,_0x18effe){const _0x113723=a2_0x34553b,_0xd7bacf=Date['now']();this[_0x113723(0x141)](_0x115e59,_0x113723(0x13c)+_0x4fe35d);try{const _0x178071=await _0x18effe(),_0x292f24=Date[_0x113723(0x13e)]()-_0xd7bacf;return this[_0x113723(0x160)](_0x115e59,_0x113723(0x146)+_0x4fe35d,_0x292f24),_0x178071;}catch(_0x258cd8){const _0x289b71=Date[_0x113723(0x13e)]()-_0xd7bacf;this[_0x113723(0x145)](_0x115e59,_0x113723(0x14b)+_0x4fe35d,{'error':_0x258cd8 instanceof Error?_0x258cd8[_0x113723(0x131)]:String(_0x258cd8),'duration':_0x289b71});throw _0x258cd8;}}[a2_0x34553b(0x148)](){const _0xf93de7=a2_0x34553b;try{if(!a2_0x58159d[_0xf93de7(0x140)](this[_0xf93de7(0x12b)]))return[];const _0x5a9818=a2_0x58159d[_0xf93de7(0x158)](this[_0xf93de7(0x12b)],_0xf93de7(0x147));return _0x5a9818[_0xf93de7(0x136)]('\x0a')[_0xf93de7(0x12a)](_0x4131c8=>_0x4131c8[_0xf93de7(0x157)]())[_0xf93de7(0x159)](_0x305fce=>JSON[_0xf93de7(0x143)](_0x305fce));}catch(_0x39ca63){return console['warn']('Failed\x20to\x20read\x20logs:',_0x39ca63),[];}}[a2_0x34553b(0x15e)](){const _0x1687a2=a2_0x34553b;try{a2_0x58159d[_0x1687a2(0x140)](this[_0x1687a2(0x12b)])&&a2_0x58159d[_0x1687a2(0x154)](this['logFilePath'],'',_0x1687a2(0x147));}catch(_0x2a577d){console[_0x1687a2(0x137)]('Failed\x20to\x20clear\x20logs:',_0x2a577d);}}[a2_0x34553b(0x144)](){const _0x578c03=a2_0x34553b;return this[_0x578c03(0x149)];}}export const logger=new Logger();
1
+ const a179_0x4ece68=a179_0x2a10;(function(_0x2e53b2,_0x2d2ed5){const _0x5b7c32=a179_0x2a10,_0x23b9b1=_0x2e53b2();while(!![]){try{const _0x53532e=-parseInt(_0x5b7c32(0xf0))/0x1+-parseInt(_0x5b7c32(0x10d))/0x2+parseInt(_0x5b7c32(0x123))/0x3+parseInt(_0x5b7c32(0xf3))/0x4+parseInt(_0x5b7c32(0x11c))/0x5*(-parseInt(_0x5b7c32(0x111))/0x6)+-parseInt(_0x5b7c32(0x107))/0x7*(parseInt(_0x5b7c32(0xed))/0x8)+parseInt(_0x5b7c32(0x105))/0x9*(parseInt(_0x5b7c32(0xf8))/0xa);if(_0x53532e===_0x2d2ed5)break;else _0x23b9b1['push'](_0x23b9b1['shift']());}catch(_0x56ac1b){_0x23b9b1['push'](_0x23b9b1['shift']());}}}(a179_0x2958,0x4ac17));function a179_0x2958(){const _0xe5f5e1=['parse','logTask','112318HJjugr','writeFileSync','initWinstonLogger','626568WiUbvj','log','unknown','dirname','Failed\x20to\x20clear\x20logs:','14880230cSgLSS','timestamp','winstonLogger','.lovrabet.log','trim','logFilePath','完成:\x20','success','warn','format','now','info','red','9jZCuBV','getWinstonInstance','35xcNvOn','clear','details','readLogs','error','readFileSync','661158SgOqAw','message','开始执行:\x20','command','42ruXlNg','filter','map','mkdirSync','stringify','transports','File','yellow','currentRawCommand','duration','errors','342575JfTHWa','existsSync','clearLogs','Failed\x20to\x20read\x20logs:','split','green','level','529698sfPXwd','948048cruxAU'];a179_0x2958=function(){return _0xe5f5e1;};return a179_0x2958();}import a179_0x7b02d8 from'winston';function a179_0x2a10(_0x257e27,_0x1e3b74){_0x257e27=_0x257e27-0xed;const _0x29583b=a179_0x2958();let _0x2a10f1=_0x29583b[_0x257e27];return _0x2a10f1;}import a179_0x5058db from'node:fs';import a179_0x20a797 from'node:path';class Logger{[a179_0x4ece68(0xfa)];[a179_0x4ece68(0xfd)];['currentRawCommand']='';constructor(){const _0x487fea=a179_0x4ece68;this[_0x487fea(0xfd)]='';}['setRawCommand'](_0x16011f){const _0x5f0e29=a179_0x4ece68;this[_0x5f0e29(0x119)]=_0x16011f;}['initWinstonLogger'](){const _0xab1f1b=a179_0x4ece68,_0x1347cd=a179_0x20a797[_0xab1f1b(0xf6)](this[_0xab1f1b(0xfd)]);!a179_0x5058db['existsSync'](_0x1347cd)&&a179_0x5058db[_0xab1f1b(0x114)](_0x1347cd,{'recursive':!![]});const _0x47cd5c=a179_0x7b02d8[_0xab1f1b(0x101)]['combine'](a179_0x7b02d8[_0xab1f1b(0x101)][_0xab1f1b(0xf9)](),a179_0x7b02d8['format'][_0xab1f1b(0x11b)]({'stack':!![]}),a179_0x7b02d8[_0xab1f1b(0x101)]['printf'](_0x5d93fe=>{const _0x2ef7fe=_0xab1f1b,_0x3d8801={'timestamp':_0x5d93fe[_0x2ef7fe(0xf9)]||new Date()['toISOString'](),'level':_0x5d93fe[_0x2ef7fe(0x122)]||_0x2ef7fe(0x103),'command':_0x5d93fe[_0x2ef7fe(0x110)]||_0x2ef7fe(0xf5),'rawCommand':_0x5d93fe['rawCommand']||this['currentRawCommand']||undefined,'message':_0x5d93fe[_0x2ef7fe(0x10e)]||'','duration':_0x5d93fe[_0x2ef7fe(0x11a)]||undefined,'details':_0x5d93fe[_0x2ef7fe(0x109)]||undefined};return JSON[_0x2ef7fe(0x115)](_0x3d8801);}));this[_0xab1f1b(0xfa)]=a179_0x7b02d8['createLogger']({'level':_0xab1f1b(0x103),'format':_0x47cd5c,'transports':[new a179_0x7b02d8[(_0xab1f1b(0x116))][(_0xab1f1b(0x117))]({'filename':this['logFilePath'],'level':_0xab1f1b(0x103)})],'silent':![]}),a179_0x7b02d8['addColors']({'success':_0xab1f1b(0x121),'error':_0xab1f1b(0x104),'warn':_0xab1f1b(0x118),'info':'blue'});}['setLogPath'](_0xa111da){const _0x105c38=a179_0x4ece68;this['logFilePath']=a179_0x20a797['join'](_0xa111da,_0x105c38(0xfb)),this[_0x105c38(0xfa)]&&this[_0x105c38(0xfa)][_0x105c38(0x108)](),this[_0x105c38(0xf2)]();}['info'](_0x192aea,_0x3c4b9c,_0x3d8296){const _0x2ffa4d=a179_0x4ece68;if(!this[_0x2ffa4d(0xfd)]||!this[_0x2ffa4d(0xfa)])return;this[_0x2ffa4d(0xfa)][_0x2ffa4d(0x103)](_0x3c4b9c,{'command':_0x192aea,'details':_0x3d8296});}[a179_0x4ece68(0xff)](_0x13e5a6,_0x527cf7,_0x2127de,_0x4a5df9){const _0x267b26=a179_0x4ece68;if(!this['logFilePath']||!this[_0x267b26(0xfa)])return;this[_0x267b26(0xfa)][_0x267b26(0xf4)](_0x267b26(0x103),_0x527cf7,{'level':'success','command':_0x13e5a6,'duration':_0x2127de,'details':_0x4a5df9});}['error'](_0x11a242,_0x18eede,_0x1dfc97){const _0x58516d=a179_0x4ece68;if(!this[_0x58516d(0xfd)]||!this['winstonLogger'])return;this[_0x58516d(0xfa)]['error'](_0x18eede,{'command':_0x11a242,'details':_0x1dfc97});}[a179_0x4ece68(0x100)](_0xd7efa7,_0x58bcea,_0x247acb){const _0x16acc1=a179_0x4ece68;if(!this[_0x16acc1(0xfd)]||!this[_0x16acc1(0xfa)])return;this[_0x16acc1(0xfa)][_0x16acc1(0x100)](_0x58bcea,{'command':_0xd7efa7,'details':_0x247acb});}async[a179_0x4ece68(0xef)](_0x235e53,_0x32271d,_0x5f74ba){const _0x5be4e6=a179_0x4ece68,_0x167462=Date['now']();this['info'](_0x235e53,_0x5be4e6(0x10f)+_0x32271d);try{const _0x297933=await _0x5f74ba(),_0x2f40e5=Date[_0x5be4e6(0x102)]()-_0x167462;return this[_0x5be4e6(0xff)](_0x235e53,_0x5be4e6(0xfe)+_0x32271d,_0x2f40e5),_0x297933;}catch(_0x3b97bd){const _0x17348d=Date[_0x5be4e6(0x102)]()-_0x167462;this[_0x5be4e6(0x10b)](_0x235e53,'失败:\x20'+_0x32271d,{'error':_0x3b97bd instanceof Error?_0x3b97bd[_0x5be4e6(0x10e)]:String(_0x3b97bd),'duration':_0x17348d});throw _0x3b97bd;}}[a179_0x4ece68(0x10a)](){const _0x2b312a=a179_0x4ece68;try{if(!a179_0x5058db[_0x2b312a(0x11d)](this[_0x2b312a(0xfd)]))return[];const _0x469f38=a179_0x5058db[_0x2b312a(0x10c)](this[_0x2b312a(0xfd)],'utf8');return _0x469f38[_0x2b312a(0x120)]('\x0a')[_0x2b312a(0x112)](_0x517c93=>_0x517c93[_0x2b312a(0xfc)]())[_0x2b312a(0x113)](_0x373137=>JSON[_0x2b312a(0xee)](_0x373137));}catch(_0x22d7b3){return console[_0x2b312a(0x100)](_0x2b312a(0x11f),_0x22d7b3),[];}}[a179_0x4ece68(0x11e)](){const _0x5c1fcb=a179_0x4ece68;try{a179_0x5058db[_0x5c1fcb(0x11d)](this[_0x5c1fcb(0xfd)])&&a179_0x5058db[_0x5c1fcb(0xf1)](this[_0x5c1fcb(0xfd)],'','utf8');}catch(_0x4dc6a3){console['warn'](_0x5c1fcb(0xf7),_0x4dc6a3);}}[a179_0x4ece68(0x106)](){const _0x40826c=a179_0x4ece68;return this[_0x40826c(0xfa)];}}export const logger=new Logger();
@@ -1 +1 @@
1
- function a17_0x333b(){const _0x3f77d6=['64uBdxhA','25703793dsLmPt','win32','225402FoIXjA','1053977BoOPXC','platform','6279580KuVwca','203DQunmM','.cmd','121104ugbsOO','1641456hFEbvP','686160pWulgH'];a17_0x333b=function(){return _0x3f77d6;};return a17_0x333b();}const a17_0x391434=a17_0x4b21;(function(_0x51478f,_0x49f9d7){const _0x21e470=a17_0x4b21,_0x3e8d69=_0x51478f();while(!![]){try{const _0x2b4b2e=-parseInt(_0x21e470(0x118))/0x1+parseInt(_0x21e470(0x112))/0x2+-parseInt(_0x21e470(0x117))/0x3*(parseInt(_0x21e470(0x114))/0x4)+-parseInt(_0x21e470(0x11a))/0x5+parseInt(_0x21e470(0x111))/0x6*(parseInt(_0x21e470(0x11b))/0x7)+-parseInt(_0x21e470(0x113))/0x8+parseInt(_0x21e470(0x115))/0x9;if(_0x2b4b2e===_0x49f9d7)break;else _0x3e8d69['push'](_0x3e8d69['shift']());}catch(_0x5c76cf){_0x3e8d69['push'](_0x3e8d69['shift']());}}}(a17_0x333b,0xa22aa));export const isWindows=process[a17_0x391434(0x119)]===a17_0x391434(0x116);function a17_0x4b21(_0x578d90,_0x475753){_0x578d90=_0x578d90-0x111;const _0x333b05=a17_0x333b();let _0x4b2130=_0x333b05[_0x578d90];return _0x4b2130;}export function resolveNpmBin(_0x22ba4d){const _0x1e9259=a17_0x391434;return isWindows?_0x22ba4d+_0x1e9259(0x11c):_0x22ba4d;}
1
+ function a180_0x1df7(_0x33cff3,_0x34a8c4){_0x33cff3=_0x33cff3-0xfd;const _0x26eac9=a180_0x26ea();let _0x1df79e=_0x26eac9[_0x33cff3];return _0x1df79e;}const a180_0x49f64b=a180_0x1df7;(function(_0x484b2c,_0x498fb2){const _0xecf441=a180_0x1df7,_0x526925=_0x484b2c();while(!![]){try{const _0x1ab197=-parseInt(_0xecf441(0xff))/0x1+-parseInt(_0xecf441(0x103))/0x2*(-parseInt(_0xecf441(0x106))/0x3)+-parseInt(_0xecf441(0x102))/0x4*(parseInt(_0xecf441(0x109))/0x5)+-parseInt(_0xecf441(0x101))/0x6*(-parseInt(_0xecf441(0x104))/0x7)+-parseInt(_0xecf441(0x10b))/0x8*(parseInt(_0xecf441(0x107))/0x9)+-parseInt(_0xecf441(0x108))/0xa+parseInt(_0xecf441(0x100))/0xb*(parseInt(_0xecf441(0x105))/0xc);if(_0x1ab197===_0x498fb2)break;else _0x526925['push'](_0x526925['shift']());}catch(_0x11de67){_0x526925['push'](_0x526925['shift']());}}}(a180_0x26ea,0xf209b));function a180_0x26ea(){const _0x3848da=['win32','.cmd','1532348bMNrOw','22xHVAwx','24aYKoPC','4rGemiy','2YyFqeI','2815673tnOKXa','26666940KJGjIs','1890408OoNVQm','516573MfQWzy','7080540swsNRT','8936400uYYzMM','platform','232jSIhxs'];a180_0x26ea=function(){return _0x3848da;};return a180_0x26ea();}export const isWindows=process[a180_0x49f64b(0x10a)]===a180_0x49f64b(0xfd);export function resolveNpmBin(_0x201fa7){const _0x103fbd=a180_0x49f64b;return isWindows?_0x201fa7+_0x103fbd(0xfe):_0x201fa7;}
@@ -1 +1 @@
1
- const a19_0x1ebfb5=a19_0x1dfe;(function(_0x38b5ea,_0x42ae89){const _0x408ba9=a19_0x1dfe,_0x5ac3ee=_0x38b5ea();while(!![]){try{const _0x14a186=parseInt(_0x408ba9(0x1f4))/0x1*(parseInt(_0x408ba9(0x1ee))/0x2)+-parseInt(_0x408ba9(0x1fb))/0x3*(-parseInt(_0x408ba9(0x1fc))/0x4)+parseInt(_0x408ba9(0x1f9))/0x5+parseInt(_0x408ba9(0x1f7))/0x6+-parseInt(_0x408ba9(0x1f3))/0x7*(parseInt(_0x408ba9(0x1f8))/0x8)+-parseInt(_0x408ba9(0x1ed))/0x9+-parseInt(_0x408ba9(0x1ec))/0xa*(parseInt(_0x408ba9(0x1f2))/0xb);if(_0x14a186===_0x42ae89)break;else _0x5ac3ee['push'](_0x5ac3ee['shift']());}catch(_0xa040a3){_0x5ac3ee['push'](_0x5ac3ee['shift']());}}}(a19_0x1b8f,0x26138));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';function a19_0x1dfe(_0x30fc67,_0x23fdbf){_0x30fc67=_0x30fc67-0x1ec;const _0x1b8fea=a19_0x1b8f();let _0x1dfe57=_0x1b8fea[_0x30fc67];return _0x1dfe57;}import{appendUpdateTime}from'../utils/guides-cdn.js';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function getRulesCdnUrl(){const _0x572110=a19_0x1dfe,_0x42b708=getTemplateBaseUrl();return _0x42b708+_0x572110(0x1ef);}const LOCAL_TEMPLATE_PATH=resolve(__dirname,a19_0x1ebfb5(0x1f1));export async function fetchRulesFromCDN(){const _0x27458b=a19_0x1ebfb5,_0x41ec7b=getRulesCdnUrl(),_0x2bc0c9=await fetch(_0x41ec7b,{'headers':{'Accept':'application/json'}});if(!_0x2bc0c9['ok'])throw new Error(_0x27458b(0x1fa)+_0x2bc0c9[_0x27458b(0x1f0)]+'\x20'+_0x2bc0c9['statusText']);const _0x59a001=await _0x2bc0c9['json']();if(!_0x59a001[_0x27458b(0x1f6)]||typeof _0x59a001[_0x27458b(0x1f6)]!=='string')throw new Error('CDN\x20返回数据格式错误');return _0x59a001;}export async function getRulesContent(){try{const _0x1c8215=await fetchRulesFromCDN();return _0x1c8215['content'];}catch{return readLocalTemplate();}}export function readLocalTemplate(){if(existsSync(LOCAL_TEMPLATE_PATH))return readFileSync(LOCAL_TEMPLATE_PATH,'utf-8');throw new Error('本地模板文件不存在:\x20'+LOCAL_TEMPLATE_PATH);}export async function writeRulesFile(_0x505ecb){const _0x36c236=a19_0x1ebfb5,_0x26eef0=await fetchRulesFromCDN()['catch'](()=>null);let _0x4096e9;_0x26eef0?(_0x4096e9=_0x26eef0[_0x36c236(0x1f6)],_0x26eef0[_0x36c236(0x1f5)]&&(_0x4096e9=appendUpdateTime(_0x4096e9,_0x26eef0['lastUpdated']))):_0x4096e9=readLocalTemplate();const _0x5f3437=dirname(_0x505ecb);!existsSync(_0x5f3437)&&mkdirSync(_0x5f3437,{'recursive':!![]}),writeFileSync(_0x505ecb,_0x4096e9,'utf-8');}function a19_0x1b8f(){const _0x397e00=['661236xyUykW','104EpOvFJ','1132100ZJmaKy','CDN\x20请求失败:\x20','213vUsqpl','2060MFwoOp','1570uBNswn','2395323pZrHSd','51844TTQuuZ','/rules/rules.json','status','../../templates/rules/lovrabet_rules.mdc.tpl','4609XjnDKs','77819SCWKeK','10ehuDYU','lastUpdated','content'];a19_0x1b8f=function(){return _0x397e00;};return a19_0x1b8f();}export async function copyRulesToCursor(_0x50551b){const _0x4caa86=join(_0x50551b,'.cursor/rules'),_0x3473cc=join(_0x4caa86,'lovrabet_rules.mdc');if(existsSync(_0x3473cc))return![];return await writeRulesFile(_0x3473cc),!![];}export async function copyRulesToAgentsMd(_0x18f232){const _0x205636=join(_0x18f232,'agents.md');if(existsSync(_0x205636))return![];return await writeRulesFile(_0x205636),!![];}
1
+ const a181_0x19abb2=a181_0x1c1b;(function(_0x429f0a,_0x10a437){const _0x8453b3=a181_0x1c1b,_0x785d04=_0x429f0a();while(!![]){try{const _0x22948c=parseInt(_0x8453b3(0x75))/0x1+parseInt(_0x8453b3(0x77))/0x2*(parseInt(_0x8453b3(0x71))/0x3)+-parseInt(_0x8453b3(0x7b))/0x4+-parseInt(_0x8453b3(0x79))/0x5+parseInt(_0x8453b3(0x81))/0x6*(-parseInt(_0x8453b3(0x7c))/0x7)+-parseInt(_0x8453b3(0x83))/0x8*(parseInt(_0x8453b3(0x82))/0x9)+parseInt(_0x8453b3(0x6f))/0xa;if(_0x22948c===_0x10a437)break;else _0x785d04['push'](_0x785d04['shift']());}catch(_0x4cb5ff){_0x785d04['push'](_0x785d04['shift']());}}}(a181_0xd950,0xa7958));import{existsSync,mkdirSync,readFileSync,writeFileSync}from'node:fs';function a181_0xd950(){const _0x504641=['420WsHcOS','1629ndbOmC','50640dWmiDN','status','lastUpdated','CDN\x20返回数据格式错误','39965470kfSgFU','utf-8','74247TKbvoM','.cursor/rules','statusText','json','57638CLMFNw','content','10YXPQRl','/rules/rules.json','4503065hTXHbD','lovrabet_rules.mdc','1036612jLUnpK','118601WcrIcY','catch','agents.md','../../templates/rules/lovrabet_rules.mdc.tpl','本地模板文件不存在:\x20'];a181_0xd950=function(){return _0x504641;};return a181_0xd950();}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 _0x37cbea=a181_0x1c1b,_0x1a333b=getTemplateBaseUrl();return _0x1a333b+_0x37cbea(0x78);}const LOCAL_TEMPLATE_PATH=resolve(__dirname,a181_0x19abb2(0x7f));function a181_0x1c1b(_0x165a30,_0x557548){_0x165a30=_0x165a30-0x6f;const _0xd95025=a181_0xd950();let _0x1c1b03=_0xd95025[_0x165a30];return _0x1c1b03;}export async function fetchRulesFromCDN(){const _0x45a830=a181_0x19abb2,_0x4755a4=getRulesCdnUrl(),_0xc58cd8=await fetch(_0x4755a4,{'headers':{'Accept':'application/json'}});if(!_0xc58cd8['ok'])throw new Error('CDN\x20请求失败:\x20'+_0xc58cd8[_0x45a830(0x84)]+'\x20'+_0xc58cd8[_0x45a830(0x73)]);const _0x181f54=await _0xc58cd8[_0x45a830(0x74)]();if(!_0x181f54[_0x45a830(0x76)]||typeof _0x181f54['content']!=='string')throw new Error(_0x45a830(0x86));return _0x181f54;}export async function getRulesContent(){try{const _0xc79496=await fetchRulesFromCDN();return _0xc79496['content'];}catch{return readLocalTemplate();}}export function readLocalTemplate(){const _0x8b2f09=a181_0x19abb2;if(existsSync(LOCAL_TEMPLATE_PATH))return readFileSync(LOCAL_TEMPLATE_PATH,_0x8b2f09(0x70));throw new Error(_0x8b2f09(0x80)+LOCAL_TEMPLATE_PATH);}export async function writeRulesFile(_0x1e8491){const _0x35420d=a181_0x19abb2,_0x2cade6=await fetchRulesFromCDN()[_0x35420d(0x7d)](()=>null);let _0x579765;_0x2cade6?(_0x579765=_0x2cade6['content'],_0x2cade6[_0x35420d(0x85)]&&(_0x579765=appendUpdateTime(_0x579765,_0x2cade6['lastUpdated']))):_0x579765=readLocalTemplate();const _0x1ba4ca=dirname(_0x1e8491);!existsSync(_0x1ba4ca)&&mkdirSync(_0x1ba4ca,{'recursive':!![]}),writeFileSync(_0x1e8491,_0x579765,_0x35420d(0x70));}export async function copyRulesToCursor(_0xe5b547){const _0x2b2071=a181_0x19abb2,_0x4d7546=join(_0xe5b547,_0x2b2071(0x72)),_0x3fabfa=join(_0x4d7546,_0x2b2071(0x7a));if(existsSync(_0x3fabfa))return![];return await writeRulesFile(_0x3fabfa),!![];}export async function copyRulesToAgentsMd(_0x5ca0f1){const _0x256098=a181_0x19abb2,_0x1236ad=join(_0x5ca0f1,_0x256098(0x7e));if(existsSync(_0x1236ad))return![];return await writeRulesFile(_0x1236ad),!![];}
@@ -1 +1 @@
1
- export function sleep(_0x196b58){return new Promise(_0x59a00b=>setTimeout(_0x59a00b,_0x196b58));}
1
+ export function sleep(_0x3410d6){return new Promise(_0x1f4d55=>setTimeout(_0x1f4d55,_0x3410d6));}
@@ -1 +1 @@
1
- function a7_0x5a6e(_0x2980fc,_0xd81cff){_0x2980fc=_0x2980fc-0xa0;const _0x11d132=a7_0x11d1();let _0x5a6e19=_0x11d132[_0x2980fc];return _0x5a6e19;}function a7_0x11d1(){const _0x41bf79=['pad','replaceContent','endsWith','4244051UGInvq','.tpl','name:\x20\x22','3WPNlkm','error','.scss','padStart','join','name','info','toISOString','promises','readFile','datasetCode:\x20\x22','push','formatLocalTimestamp','template','10333310APqRao','toDisplayTitle','YourModel','toComponentName','getFullYear','.ts','isDirectory','6613264EPtjLQ','\x20},','5674584zPVECD','slice','.css','replaceApiContent','processFile','processDirectory','999384nqgVMu','getMonth','9MjXWkS','replace','getMinutes','datasetCode','split','pop','api','12822997sttKXO','copyFile','mkdir','5rVagCm','getSeconds','模板内容替换失败','tableName','readdir','582770yCjbvO','getDate','3gIfNMH','utf8','alias','now','charAt','toLowerCase','.md','.jsx','LOVRABET'];a7_0x11d1=function(){return _0x41bf79;};return a7_0x11d1();}const a7_0x35fbdd=a7_0x5a6e;(function(_0x54c93e,_0x14b4ec){const _0x5a119d=a7_0x5a6e,_0xced29c=_0x54c93e();while(!![]){try{const _0x13a97f=-parseInt(_0x5a119d(0xbc))/0x1*(-parseInt(_0x5a119d(0xab))/0x2)+parseInt(_0x5a119d(0xad))/0x3*(parseInt(_0x5a119d(0xd9))/0x4)+parseInt(_0x5a119d(0xa6))/0x5*(-parseInt(_0x5a119d(0xd3))/0x6)+-parseInt(_0x5a119d(0xb9))/0x7+parseInt(_0x5a119d(0xd1))/0x8+parseInt(_0x5a119d(0xdb))/0x9*(-parseInt(_0x5a119d(0xca))/0xa)+parseInt(_0x5a119d(0xa3))/0xb;if(_0x13a97f===_0x14b4ec)break;else _0xced29c['push'](_0xced29c['shift']());}catch(_0x2ac9b3){_0xced29c['push'](_0xced29c['shift']());}}}(a7_0x11d1,0x81a36));import a7_0x53f399 from'node:fs';import a7_0x2aa8a5 from'node:path';import{logger}from'../utils/logger.js';import{getCliVersion}from'../utils/version.js';const CLI_VERSION=getCliVersion();export class TemplateReplacer{static[a7_0x35fbdd(0xb6)](_0x53a29b){const _0x48a631=a7_0x35fbdd;return String(_0x53a29b)[_0x48a631(0xbf)](0x2,'0');}static[a7_0x35fbdd(0xc8)](_0x52fefd){const _0xb6745c=a7_0x35fbdd,_0x3339bd=_0x52fefd[_0xb6745c(0xce)](),_0x42903a=this['pad'](_0x52fefd[_0xb6745c(0xda)]()+0x1),_0xeab321=this[_0xb6745c(0xb6)](_0x52fefd[_0xb6745c(0xac)]()),_0x2daf66=this[_0xb6745c(0xb6)](_0x52fefd['getHours']()),_0x548fcd=this[_0xb6745c(0xb6)](_0x52fefd[_0xb6745c(0xdd)]()),_0xfc6df7=this[_0xb6745c(0xb6)](_0x52fefd[_0xb6745c(0xa7)]());return{'createdAt':_0x3339bd+'-'+_0x42903a+'-'+_0xeab321+'\x20'+_0x2daf66+':'+_0x548fcd+':'+_0xfc6df7,'createdDate':_0x3339bd+'-'+_0x42903a+'-'+_0xeab321,'createdTime':_0x2daf66+':'+_0x548fcd+':'+_0xfc6df7};}static[a7_0x35fbdd(0xcd)](_0x5d4914){const _0x225fe9=a7_0x35fbdd,_0x5770ab=_0x5d4914[_0x225fe9(0xa0)]('/')[_0x225fe9(0xa1)]()||_0x5d4914;return _0x5770ab['split']('-')['map'](_0x639f90=>_0x639f90[_0x225fe9(0xb1)](0x0)['toUpperCase']()+_0x639f90[_0x225fe9(0xd4)](0x1)['toLowerCase']())[_0x225fe9(0xc0)]('');}static[a7_0x35fbdd(0xcb)](_0xc60b29){const _0x160e32=a7_0x35fbdd,_0x1dce06=_0xc60b29[_0x160e32(0xa0)]('/')['pop']()||_0xc60b29;return _0x1dce06[_0x160e32(0xa0)]('-')['map'](_0x53761d=>_0x53761d[_0x160e32(0xb1)](0x0)['toUpperCase']()+_0x53761d[_0x160e32(0xd4)](0x1)[_0x160e32(0xb2)]())[_0x160e32(0xc0)]('\x20');}static[a7_0x35fbdd(0xb7)](_0x66108c,_0x24b019,_0xb42a88){const _0x1c93f3=a7_0x35fbdd,_0xe18e72=this[_0x1c93f3(0xcd)](_0x24b019),_0x43addc=this[_0x1c93f3(0xcb)](_0x24b019),{createdAt:_0x5cd6dc,createdDate:_0xab50f1,createdTime:_0x4659e8}=this[_0x1c93f3(0xc8)](new Date());let _0x276232=_0x66108c[_0x1c93f3(0xdc)](/\{CliVersion\}/g,CLI_VERSION)[_0x1c93f3(0xdc)](/\{ComponentName\}/g,_0xe18e72)[_0x1c93f3(0xdc)](/\{DisplayTitle\}/g,_0x43addc)['replace'](/\{PageName\}/g,_0x24b019)['replace'](/\{TemplateName\}/g,_0xb42a88)[_0x1c93f3(0xdc)](/\{CreatedAt\}/g,_0x5cd6dc)[_0x1c93f3(0xdc)](/\{CreatedDate\}/g,_0xab50f1)[_0x1c93f3(0xdc)](/\{CreatedTime\}/g,_0x4659e8);return _0x276232;}static[a7_0x35fbdd(0xd6)](_0x2aac46,_0x166d40,_0x9c32b1,_0x1f6634,_0x210b28,_0x4f8502,_0x461113,_0x58f3f4){const _0xe8a899=a7_0x35fbdd,_0x1a00cc=new Date(),_0x53fa25=_0x1a00cc[_0xe8a899(0xc3)](),_0x57a951=_0x9c32b1['map'](_0x146548=>{const _0x1031ac=_0xe8a899,_0x66c72b=[_0x1031ac(0xc6)+_0x146548[_0x1031ac(0xde)]+'\x22','tableName:\x20\x22'+_0x146548[_0x1031ac(0xa9)]+'\x22',_0x1031ac(0xbb)+_0x146548[_0x1031ac(0xc1)]+'\x22'];return _0x146548['alias']&&_0x66c72b[_0x1031ac(0xc7)]('alias:\x20\x22'+_0x146548['alias']+'\x22'),'\x0a\x20\x20\x20\x20{\x20'+_0x66c72b[_0x1031ac(0xc0)](',\x20')+_0x1031ac(0xd2);})['join'](''),_0x40df58=_0x1f6634||_0x9c32b1[0x0]?.[_0xe8a899(0xaf)]||_0xe8a899(0xcc);let _0x28d46f=_0x2aac46[_0xe8a899(0xdc)](/\{AppCode\}/g,_0x166d40)['replace'](/\{ModelConfigs\}/g,_0x57a951)['replace'](/\{ExampleModelName\}/g,_0x40df58)[_0xe8a899(0xdc)](/\{ApiFileName\}/g,_0x210b28||_0xe8a899(0xa2))[_0xe8a899(0xdc)](/\{ConfigName\}/g,_0x4f8502||'default')[_0xe8a899(0xdc)](/\{ClientConfigParam\}/g,_0x461113||'')[_0xe8a899(0xdc)](/\{VarPrefix\}/g,_0x58f3f4||_0xe8a899(0xb5))['replace'](/\{CreatedAt\}/g,_0x53fa25);return _0x28d46f;}static async['processTemplate'](_0x4b34bc,_0x73422c,_0x101a9b,_0x11afbc,_0x3cdaeb=!![]){const _0xf461c2=a7_0x35fbdd,_0x488fd5=Date['now']();try{_0x3cdaeb&&logger[_0xf461c2(0xc2)](_0xf461c2(0xc9),'开始处理模板内容替换',{'templatePath':_0x4b34bc,'targetPath':_0x73422c,'pageName':_0x101a9b,'templateName':_0x11afbc});await a7_0x53f399[_0xf461c2(0xc4)][_0xf461c2(0xa5)](_0x73422c,{'recursive':!![]}),await this[_0xf461c2(0xd8)](_0x4b34bc,_0x73422c,_0x101a9b,_0x11afbc);if(_0x3cdaeb){const _0x4bf84b=Date[_0xf461c2(0xb0)]()-_0x488fd5;logger['success'](_0xf461c2(0xc9),'模板内容替换完成',_0x4bf84b,{'pageName':_0x101a9b,'templateName':_0x11afbc});}}catch(_0x1cd8a7){if(_0x3cdaeb){const _0x44bda3=Date[_0xf461c2(0xb0)]()-_0x488fd5;logger[_0xf461c2(0xbd)](_0xf461c2(0xc9),_0xf461c2(0xa8),{'templatePath':_0x4b34bc,'targetPath':_0x73422c,'pageName':_0x101a9b,'templateName':_0x11afbc,'error':_0x1cd8a7 instanceof Error?_0x1cd8a7['message']:String(_0x1cd8a7),'duration':_0x44bda3});}throw _0x1cd8a7;}}static async[a7_0x35fbdd(0xd8)](_0x494708,_0x2f5d29,_0x5a7d61,_0x3c4fb2){const _0x4b67ee=a7_0x35fbdd,_0x28b52d=await a7_0x53f399[_0x4b67ee(0xc4)][_0x4b67ee(0xaa)](_0x494708,{'withFileTypes':!![]});for(const _0x129c1d of _0x28b52d){const _0xb261e0=a7_0x2aa8a5['join'](_0x494708,_0x129c1d['name']);let _0x38bec3=a7_0x2aa8a5['join'](_0x2f5d29,_0x129c1d[_0x4b67ee(0xc1)]);_0x129c1d['name'][_0x4b67ee(0xb8)](_0x4b67ee(0xba))&&(_0x38bec3=a7_0x2aa8a5[_0x4b67ee(0xc0)](_0x2f5d29,_0x129c1d['name'][_0x4b67ee(0xdc)](/\.tpl$/,'')));if(_0x129c1d[_0x4b67ee(0xd0)]())await a7_0x53f399[_0x4b67ee(0xc4)][_0x4b67ee(0xa5)](_0x38bec3,{'recursive':!![]}),await this[_0x4b67ee(0xd8)](_0xb261e0,_0x38bec3,_0x5a7d61,_0x3c4fb2);else _0x129c1d['isFile']()&&await this[_0x4b67ee(0xd7)](_0xb261e0,_0x38bec3,_0x5a7d61,_0x3c4fb2);}}static async[a7_0x35fbdd(0xd7)](_0x127f28,_0x35acc3,_0x4d2607,_0xe2f5f1){const _0x351dae=a7_0x35fbdd,_0x14d322=a7_0x2aa8a5['extname'](_0x127f28)[_0x351dae(0xb2)]();_0x127f28['endsWith'](_0x351dae(0xba))&&(_0x35acc3=_0x35acc3[_0x351dae(0xdc)](/\.tpl$/,''));const _0x4199b8=['.tsx',_0x351dae(0xcf),_0x351dae(0xb4),'.js','.json',_0x351dae(0xb3),_0x351dae(0xd5),_0x351dae(0xbe),_0x351dae(0xba)];if(_0x4199b8['includes'](_0x14d322)||_0x127f28[_0x351dae(0xb8)]('.tpl')){const _0x1257ad=await a7_0x53f399['promises'][_0x351dae(0xc5)](_0x127f28,'utf8'),_0x48f484=this[_0x351dae(0xb7)](_0x1257ad,_0x4d2607,_0xe2f5f1);await a7_0x53f399[_0x351dae(0xc4)]['writeFile'](_0x35acc3,_0x48f484,_0x351dae(0xae));}else await a7_0x53f399[_0x351dae(0xc4)][_0x351dae(0xa4)](_0x127f28,_0x35acc3);}}
1
+ const a183_0x3ebe23=a183_0x3a65;(function(_0xbb62e6,_0x173078){const _0x54c39f=a183_0x3a65,_0x25c191=_0xbb62e6();while(!![]){try{const _0x26e714=-parseInt(_0x54c39f(0x1f3))/0x1+parseInt(_0x54c39f(0x1cc))/0x2*(parseInt(_0x54c39f(0x1e6))/0x3)+-parseInt(_0x54c39f(0x1dc))/0x4+-parseInt(_0x54c39f(0x1e8))/0x5*(-parseInt(_0x54c39f(0x1cf))/0x6)+-parseInt(_0x54c39f(0x1c9))/0x7+-parseInt(_0x54c39f(0x1fd))/0x8+parseInt(_0x54c39f(0x200))/0x9;if(_0x26e714===_0x173078)break;else _0x25c191['push'](_0x25c191['shift']());}catch(_0x5cbc5e){_0x25c191['push'](_0x25c191['shift']());}}}(a183_0x4c2d,0x8a4c1));import a183_0x3d5f6a from'node:fs';import a183_0x5486f7 from'node:path';import{logger}from'../utils/logger.js';import{getCliVersion}from'../utils/version.js';function a183_0x3a65(_0x44c02c,_0x1f4652){_0x44c02c=_0x44c02c-0x1c1;const _0x4c2da3=a183_0x4c2d();let _0x3a65db=_0x4c2da3[_0x44c02c];return _0x3a65db;}const CLI_VERSION=getCliVersion();function a183_0x4c2d(){const _0x36d1ad=['error','readdir','pad','processDirectory','alias','join','\x0a\x20\x20\x20\x20{\x20','promises','isFile','3259251vtmskm','pop','2358835KiYcwz','endsWith','tableName:\x20\x22','map','split','charAt','readFile','copyFile','YourModel','processFile','info','715783vOMnAM','slice','formatLocalTimestamp','.scss','datasetCode','.tpl','.json','LOVRABET','utf8','name:\x20\x22','8309760pyIiQp','mkdir','success','17117208nDMIko','default','now','toISOString','isDirectory','getMonth','.js','name','message','.ts','toUpperCase','.tsx','4585959SapAkO','toDisplayTitle','模板内容替换完成','2NsWEFG','datasetCode:\x20\x22','toComponentName','6ZNcSiZ','\x20},','getDate','api','push','tableName','.jsx','replace','template','replaceApiContent','padStart','extname','toLowerCase','1935964oRqmcD'];a183_0x4c2d=function(){return _0x36d1ad;};return a183_0x4c2d();}export class TemplateReplacer{static[a183_0x3ebe23(0x1df)](_0x3922a4){const _0x4c363f=a183_0x3ebe23;return String(_0x3922a4)[_0x4c363f(0x1d9)](0x2,'0');}static[a183_0x3ebe23(0x1f5)](_0x51e083){const _0x4be70f=a183_0x3ebe23,_0x3740e2=_0x51e083['getFullYear'](),_0x588dd3=this[_0x4be70f(0x1df)](_0x51e083[_0x4be70f(0x1c2)]()+0x1),_0x4b3fd8=this[_0x4be70f(0x1df)](_0x51e083[_0x4be70f(0x1d1)]()),_0x35eb13=this['pad'](_0x51e083['getHours']()),_0x1130f9=this[_0x4be70f(0x1df)](_0x51e083['getMinutes']()),_0x128c7c=this[_0x4be70f(0x1df)](_0x51e083['getSeconds']());return{'createdAt':_0x3740e2+'-'+_0x588dd3+'-'+_0x4b3fd8+'\x20'+_0x35eb13+':'+_0x1130f9+':'+_0x128c7c,'createdDate':_0x3740e2+'-'+_0x588dd3+'-'+_0x4b3fd8,'createdTime':_0x35eb13+':'+_0x1130f9+':'+_0x128c7c};}static[a183_0x3ebe23(0x1ce)](_0x24fd4f){const _0x214f8b=a183_0x3ebe23,_0x30180a=_0x24fd4f[_0x214f8b(0x1ec)]('/')['pop']()||_0x24fd4f;return _0x30180a[_0x214f8b(0x1ec)]('-')[_0x214f8b(0x1eb)](_0x2bb183=>_0x2bb183[_0x214f8b(0x1ed)](0x0)[_0x214f8b(0x1c7)]()+_0x2bb183[_0x214f8b(0x1f4)](0x1)[_0x214f8b(0x1db)]())[_0x214f8b(0x1e2)]('');}static[a183_0x3ebe23(0x1ca)](_0x1b5d34){const _0x2d2d29=a183_0x3ebe23,_0x25ff45=_0x1b5d34[_0x2d2d29(0x1ec)]('/')[_0x2d2d29(0x1e7)]()||_0x1b5d34;return _0x25ff45[_0x2d2d29(0x1ec)]('-')['map'](_0x6ea75=>_0x6ea75[_0x2d2d29(0x1ed)](0x0)[_0x2d2d29(0x1c7)]()+_0x6ea75[_0x2d2d29(0x1f4)](0x1)[_0x2d2d29(0x1db)]())[_0x2d2d29(0x1e2)]('\x20');}static['replaceContent'](_0x1aabb7,_0x26bb56,_0xcc9d2a){const _0x440796=a183_0x3ebe23,_0x13d3c0=this['toComponentName'](_0x26bb56),_0x310713=this[_0x440796(0x1ca)](_0x26bb56),{createdAt:_0x36d43c,createdDate:_0x51f422,createdTime:_0x1fa7ed}=this[_0x440796(0x1f5)](new Date());let _0x56c0b5=_0x1aabb7['replace'](/\{CliVersion\}/g,CLI_VERSION)[_0x440796(0x1d6)](/\{ComponentName\}/g,_0x13d3c0)[_0x440796(0x1d6)](/\{DisplayTitle\}/g,_0x310713)[_0x440796(0x1d6)](/\{PageName\}/g,_0x26bb56)[_0x440796(0x1d6)](/\{TemplateName\}/g,_0xcc9d2a)['replace'](/\{CreatedAt\}/g,_0x36d43c)['replace'](/\{CreatedDate\}/g,_0x51f422)[_0x440796(0x1d6)](/\{CreatedTime\}/g,_0x1fa7ed);return _0x56c0b5;}static[a183_0x3ebe23(0x1d8)](_0x4ae4d2,_0xc74843,_0xb188aa,_0x464d04,_0x49c9b7,_0x1cb81b,_0x39ea72,_0x423d56){const _0x1327cc=a183_0x3ebe23,_0x4c75b0=new Date(),_0x59c722=_0x4c75b0[_0x1327cc(0x203)](),_0x540804=_0xb188aa[_0x1327cc(0x1eb)](_0x5c912a=>{const _0x267fa1=_0x1327cc,_0x40c3c4=[_0x267fa1(0x1cd)+_0x5c912a[_0x267fa1(0x1f7)]+'\x22',_0x267fa1(0x1ea)+_0x5c912a[_0x267fa1(0x1d4)]+'\x22',_0x267fa1(0x1fc)+_0x5c912a[_0x267fa1(0x1c4)]+'\x22'];return _0x5c912a[_0x267fa1(0x1e1)]&&_0x40c3c4[_0x267fa1(0x1d3)]('alias:\x20\x22'+_0x5c912a['alias']+'\x22'),_0x267fa1(0x1e3)+_0x40c3c4[_0x267fa1(0x1e2)](',\x20')+_0x267fa1(0x1d0);})[_0x1327cc(0x1e2)](''),_0x407338=_0x464d04||_0xb188aa[0x0]?.['alias']||_0x1327cc(0x1f0);let _0x48e892=_0x4ae4d2['replace'](/\{AppCode\}/g,_0xc74843)[_0x1327cc(0x1d6)](/\{ModelConfigs\}/g,_0x540804)[_0x1327cc(0x1d6)](/\{ExampleModelName\}/g,_0x407338)['replace'](/\{ApiFileName\}/g,_0x49c9b7||_0x1327cc(0x1d2))['replace'](/\{ConfigName\}/g,_0x1cb81b||_0x1327cc(0x201))[_0x1327cc(0x1d6)](/\{ClientConfigParam\}/g,_0x39ea72||'')[_0x1327cc(0x1d6)](/\{VarPrefix\}/g,_0x423d56||_0x1327cc(0x1fa))['replace'](/\{CreatedAt\}/g,_0x59c722);return _0x48e892;}static async['processTemplate'](_0x1be00c,_0x140580,_0x58806b,_0x29a9e3,_0xf9e8d0=!![]){const _0xf41970=a183_0x3ebe23,_0x321114=Date[_0xf41970(0x202)]();try{_0xf9e8d0&&logger[_0xf41970(0x1f2)]('template','开始处理模板内容替换',{'templatePath':_0x1be00c,'targetPath':_0x140580,'pageName':_0x58806b,'templateName':_0x29a9e3});await a183_0x3d5f6a[_0xf41970(0x1e4)]['mkdir'](_0x140580,{'recursive':!![]}),await this['processDirectory'](_0x1be00c,_0x140580,_0x58806b,_0x29a9e3);if(_0xf9e8d0){const _0x4b2588=Date[_0xf41970(0x202)]()-_0x321114;logger[_0xf41970(0x1ff)](_0xf41970(0x1d7),_0xf41970(0x1cb),_0x4b2588,{'pageName':_0x58806b,'templateName':_0x29a9e3});}}catch(_0x53a94c){if(_0xf9e8d0){const _0x8f8c1e=Date[_0xf41970(0x202)]()-_0x321114;logger[_0xf41970(0x1dd)](_0xf41970(0x1d7),'模板内容替换失败',{'templatePath':_0x1be00c,'targetPath':_0x140580,'pageName':_0x58806b,'templateName':_0x29a9e3,'error':_0x53a94c instanceof Error?_0x53a94c[_0xf41970(0x1c5)]:String(_0x53a94c),'duration':_0x8f8c1e});}throw _0x53a94c;}}static async[a183_0x3ebe23(0x1e0)](_0x5f356b,_0x590f37,_0xe58d0b,_0x5f3705){const _0x50468d=a183_0x3ebe23,_0x4fa2d1=await a183_0x3d5f6a[_0x50468d(0x1e4)][_0x50468d(0x1de)](_0x5f356b,{'withFileTypes':!![]});for(const _0x4a9f3a of _0x4fa2d1){const _0x558ba8=a183_0x5486f7[_0x50468d(0x1e2)](_0x5f356b,_0x4a9f3a[_0x50468d(0x1c4)]);let _0xdae673=a183_0x5486f7[_0x50468d(0x1e2)](_0x590f37,_0x4a9f3a['name']);_0x4a9f3a['name'][_0x50468d(0x1e9)](_0x50468d(0x1f8))&&(_0xdae673=a183_0x5486f7[_0x50468d(0x1e2)](_0x590f37,_0x4a9f3a[_0x50468d(0x1c4)][_0x50468d(0x1d6)](/\.tpl$/,'')));if(_0x4a9f3a[_0x50468d(0x1c1)]())await a183_0x3d5f6a[_0x50468d(0x1e4)][_0x50468d(0x1fe)](_0xdae673,{'recursive':!![]}),await this[_0x50468d(0x1e0)](_0x558ba8,_0xdae673,_0xe58d0b,_0x5f3705);else _0x4a9f3a[_0x50468d(0x1e5)]()&&await this[_0x50468d(0x1f1)](_0x558ba8,_0xdae673,_0xe58d0b,_0x5f3705);}}static async['processFile'](_0x150bad,_0x43f4d3,_0x108f75,_0x13a2bc){const _0x186262=a183_0x3ebe23,_0x368279=a183_0x5486f7[_0x186262(0x1da)](_0x150bad)[_0x186262(0x1db)]();_0x150bad['endsWith']('.tpl')&&(_0x43f4d3=_0x43f4d3[_0x186262(0x1d6)](/\.tpl$/,''));const _0x5be395=[_0x186262(0x1c8),_0x186262(0x1c6),_0x186262(0x1d5),_0x186262(0x1c3),_0x186262(0x1f9),'.md','.css',_0x186262(0x1f6),_0x186262(0x1f8)];if(_0x5be395['includes'](_0x368279)||_0x150bad['endsWith'](_0x186262(0x1f8))){const _0x1ddd65=await a183_0x3d5f6a['promises'][_0x186262(0x1ee)](_0x150bad,_0x186262(0x1fb)),_0x3fe3a8=this['replaceContent'](_0x1ddd65,_0x108f75,_0x13a2bc);await a183_0x3d5f6a[_0x186262(0x1e4)]['writeFile'](_0x43f4d3,_0x3fe3a8,_0x186262(0x1fb));}else await a183_0x3d5f6a['promises'][_0x186262(0x1ef)](_0x150bad,_0x43f4d3);}}
@@ -1 +1 @@
1
- function a11_0x3555(_0x43ece5,_0x1f0954){_0x43ece5=_0x43ece5-0x77;var _0xc8cc4e=a11_0xc8cc();var _0x3555d6=_0xc8cc4e[_0x43ece5];return _0x3555d6;}function a11_0xc8cc(){var _0x1309cc=['10101fwSkqk','2ZRYNwd','810517LpcXIG','1026390ComVrE','2142XjYjzb','3594fgOmvc','11576ARPYnN','828ZFdvkF','3899VeCmFN','3060550yhvvbV','10685180PCPvMH'];a11_0xc8cc=function(){return _0x1309cc;};return a11_0xc8cc();}(function(_0xb5f41c,_0x1f090b){var _0x26f945=a11_0x3555,_0x2d6caa=_0xb5f41c();while(!![]){try{var _0x1f6239=parseInt(_0x26f945(0x7e))/0x1*(parseInt(_0x26f945(0x7d))/0x2)+-parseInt(_0x26f945(0x7c))/0x3*(parseInt(_0x26f945(0x78))/0x4)+-parseInt(_0x26f945(0x7f))/0x5+parseInt(_0x26f945(0x81))/0x6*(parseInt(_0x26f945(0x79))/0x7)+-parseInt(_0x26f945(0x77))/0x8*(parseInt(_0x26f945(0x80))/0x9)+-parseInt(_0x26f945(0x7a))/0xa+parseInt(_0x26f945(0x7b))/0xb;if(_0x1f6239===_0x1f090b)break;else _0x2d6caa['push'](_0x2d6caa['shift']());}catch(_0x3b02db){_0x2d6caa['push'](_0x2d6caa['shift']());}}}(a11_0xc8cc,0x896a4));import{VERSION}from'../generated/build-info.js';export function getCliVersion(){return VERSION;}
1
+ (function(_0x146494,_0x1c945c){var _0x225a92=a184_0x4f72,_0x1a18f3=_0x146494();while(!![]){try{var _0xde3398=-parseInt(_0x225a92(0x115))/0x1*(parseInt(_0x225a92(0x11b))/0x2)+parseInt(_0x225a92(0x119))/0x3*(parseInt(_0x225a92(0x113))/0x4)+-parseInt(_0x225a92(0x117))/0x5*(-parseInt(_0x225a92(0x111))/0x6)+-parseInt(_0x225a92(0x112))/0x7+-parseInt(_0x225a92(0x116))/0x8*(-parseInt(_0x225a92(0x11c))/0x9)+parseInt(_0x225a92(0x114))/0xa+-parseInt(_0x225a92(0x11a))/0xb*(parseInt(_0x225a92(0x118))/0xc);if(_0xde3398===_0x1c945c)break;else _0x1a18f3['push'](_0x1a18f3['shift']());}catch(_0x4a94fb){_0x1a18f3['push'](_0x1a18f3['shift']());}}}(a184_0x2976,0xdb6bb));import{VERSION}from'../generated/build-info.js';export function getCliVersion(){return VERSION;}function a184_0x4f72(_0x1cf399,_0x5d0d83){_0x1cf399=_0x1cf399-0x111;var _0x2976fc=a184_0x2976();var _0x4f72ae=_0x2976fc[_0x1cf399];return _0x4f72ae;}function a184_0x2976(){var _0x12ef47=['9OIHYQv','10316268QeMWFZ','9063628FkvCuR','28kPFUjA','3702890tJlRBR','1maZsbi','13452656CWcZam','5IGNZYU','4584fPPvKm','466287GvIldA','61369cvDZvU','1069046BhAWGu'];a184_0x2976=function(){return _0x12ef47;};return a184_0x2976();}
@@ -1 +1 @@
1
- function a10_0x429b(){var _0x32fbcd=['777COOrCH','735915IVKIxW','30288tzYXwe','10734KAosyE','1376658DfkCeI','2150190aUsOxI','519678dDVARu','13442920EFECOu','4iwjECn','16blEEXw'];a10_0x429b=function(){return _0x32fbcd;};return a10_0x429b();}function a10_0x1dd6(_0x1afa66,_0x2401f4){_0x1afa66=_0x1afa66-0x137;var _0x429bed=a10_0x429b();var _0x1dd642=_0x429bed[_0x1afa66];return _0x1dd642;}(function(_0x2db039,_0x32ae1e){var _0x12621d=a10_0x1dd6,_0x269267=_0x2db039();while(!![]){try{var _0x1b74f9=-parseInt(_0x12621d(0x13c))/0x1+parseInt(_0x12621d(0x13e))/0x2*(-parseInt(_0x12621d(0x137))/0x3)+-parseInt(_0x12621d(0x138))/0x4+parseInt(_0x12621d(0x13b))/0x5+parseInt(_0x12621d(0x139))/0x6*(parseInt(_0x12621d(0x140))/0x7)+parseInt(_0x12621d(0x13f))/0x8*(-parseInt(_0x12621d(0x13a))/0x9)+parseInt(_0x12621d(0x13d))/0xa;if(_0x1b74f9===_0x32ae1e)break;else _0x269267['push'](_0x269267['shift']());}catch(_0x26fa74){_0x269267['push'](_0x269267['shift']());}}}(a10_0x429b,0x9e7a5));import{setActiveCookie,clearActiveCookie}from'../core/api-client.js';export async function withActiveCookie(_0x51af6d,_0x3811f2){setActiveCookie(_0x51af6d);try{return await _0x3811f2();}finally{clearActiveCookie();}}
1
+ (function(_0x447957,_0x54f561){var _0x5410fb=a185_0x1d77,_0x15e110=_0x447957();while(!![]){try{var _0x2a9eff=-parseInt(_0x5410fb(0xa6))/0x1+-parseInt(_0x5410fb(0xa7))/0x2*(-parseInt(_0x5410fb(0xa5))/0x3)+-parseInt(_0x5410fb(0xa9))/0x4*(-parseInt(_0x5410fb(0xa4))/0x5)+-parseInt(_0x5410fb(0xa8))/0x6+-parseInt(_0x5410fb(0xab))/0x7*(-parseInt(_0x5410fb(0xad))/0x8)+-parseInt(_0x5410fb(0xac))/0x9*(-parseInt(_0x5410fb(0xae))/0xa)+-parseInt(_0x5410fb(0xaa))/0xb;if(_0x2a9eff===_0x54f561)break;else _0x15e110['push'](_0x15e110['shift']());}catch(_0x3d8869){_0x15e110['push'](_0x15e110['shift']());}}}(a185_0xd4c5,0xe06a1));import{setActiveCookie,clearActiveCookie}from'../core/api-client.js';export async function withActiveCookie(_0x93b636,_0x2dfb98){setActiveCookie(_0x93b636);try{return await _0x2dfb98();}finally{clearActiveCookie();}}function a185_0x1d77(_0x35cad3,_0x48a609){_0x35cad3=_0x35cad3-0xa4;var _0xd4c566=a185_0xd4c5();var _0x1d774a=_0xd4c566[_0x35cad3];return _0x1d774a;}function a185_0xd4c5(){var _0xb2f172=['45451wcOigk','2439jOxwVO','168YBSJjd','45170lqzOIa','7630405MiEbkH','21LTomEa','1223896JoxBqp','270148llUibt','363492ZRcRbY','4VJIhPx','17912180jfAyDd'];a185_0xd4c5=function(){return _0xb2f172;};return a185_0xd4c5();}
@@ -1 +1 @@
1
- (function(_0x2048e6,_0x317669){var _0x5c12c8=a4_0xdcfe,_0x3339f8=_0x2048e6();while(!![]){try{var _0x505955=-parseInt(_0x5c12c8(0xb6))/0x1+-parseInt(_0x5c12c8(0xba))/0x2*(-parseInt(_0x5c12c8(0xbb))/0x3)+-parseInt(_0x5c12c8(0xb4))/0x4+-parseInt(_0x5c12c8(0xb9))/0x5+parseInt(_0x5c12c8(0xb5))/0x6*(parseInt(_0x5c12c8(0xbc))/0x7)+parseInt(_0x5c12c8(0xb7))/0x8+-parseInt(_0x5c12c8(0xb8))/0x9;if(_0x505955===_0x317669)break;else _0x3339f8['push'](_0x3339f8['shift']());}catch(_0x3803bb){_0x3339f8['push'](_0x3339f8['shift']());}}}(a4_0x66e6,0x5ed8c));export function writeCliSideChannelLine(_0xf3d8d8){var _0x11e119=a4_0xdcfe;process['stderr'][_0x11e119(0xbd)](_0xf3d8d8+'\x0a');}function a4_0xdcfe(_0x2ac79b,_0x331fe3){_0x2ac79b=_0x2ac79b-0xb4;var _0x66e690=a4_0x66e6();var _0xdcfef2=_0x66e690[_0x2ac79b];return _0xdcfef2;}function a4_0x66e6(){var _0x14f9e0=['6beczvN','189511gQEQym','3736688GfrBuR','996759hQDMKR','1593870VxmKGU','118548VvTzWd','15IPpmwu','3499503pxfcRl','write','1023428eOUXVL'];a4_0x66e6=function(){return _0x14f9e0;};return a4_0x66e6();}
1
+ function a186_0x3f96(_0x4b6f2b,_0x324867){_0x4b6f2b=_0x4b6f2b-0x1b1;var _0x9e389=a186_0x9e38();var _0x3f9639=_0x9e389[_0x4b6f2b];return _0x3f9639;}function a186_0x9e38(){var _0x5fe3f9=['9BWdeUI','write','105526nZFFda','149772QmhVAI','10pnQOHY','514328ESfLHI','950684OAVjje','203ZZVcoT','205372UIsvVm','7271671GDixxW','10cPxUIP','2702049BsgrZz'];a186_0x9e38=function(){return _0x5fe3f9;};return a186_0x9e38();}(function(_0x1af44c,_0x2439e4){var _0x5f5668=a186_0x3f96,_0x2e9d36=_0x1af44c();while(!![]){try{var _0xa7a8e8=-parseInt(_0x5f5668(0x1bb))/0x1+parseInt(_0x5f5668(0x1b3))/0x2+-parseInt(_0x5f5668(0x1b8))/0x3+parseInt(_0x5f5668(0x1b5))/0x4*(-parseInt(_0x5f5668(0x1b1))/0x5)+-parseInt(_0x5f5668(0x1bc))/0x6*(-parseInt(_0x5f5668(0x1b4))/0x7)+parseInt(_0x5f5668(0x1b2))/0x8*(-parseInt(_0x5f5668(0x1b9))/0x9)+-parseInt(_0x5f5668(0x1b7))/0xa*(-parseInt(_0x5f5668(0x1b6))/0xb);if(_0xa7a8e8===_0x2439e4)break;else _0x2e9d36['push'](_0x2e9d36['shift']());}catch(_0x490b8e){_0x2e9d36['push'](_0x2e9d36['shift']());}}}(a186_0x9e38,0xa7c0b));export function writeCliSideChannelLine(_0x302467){var _0x29a7c2=a186_0x3f96;process['stderr'][_0x29a7c2(0x1ba)](_0x302467+'\x0a');}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lovrabet/rabetbase-cli",
3
- "version": "2.1.2-beta.3",
3
+ "version": "2.1.3-beta.0",
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_0x41d1fb=a68_0x57ce;function a68_0x57ce(_0x29eee7,_0x5ddd45){_0x29eee7=_0x29eee7-0x1a9;const _0x41c72d=a68_0x41c7();let _0x57cef6=_0x41c72d[_0x29eee7];return _0x57cef6;}(function(_0x20e601,_0x44431b){const _0xa57168=a68_0x57ce,_0x406515=_0x20e601();while(!![]){try{const _0x58df2b=-parseInt(_0xa57168(0x1fa))/0x1*(parseInt(_0xa57168(0x1c2))/0x2)+parseInt(_0xa57168(0x1da))/0x3*(-parseInt(_0xa57168(0x1bf))/0x4)+parseInt(_0xa57168(0x1f8))/0x5*(parseInt(_0xa57168(0x1d9))/0x6)+-parseInt(_0xa57168(0x1b2))/0x7+parseInt(_0xa57168(0x1e6))/0x8*(-parseInt(_0xa57168(0x1ca))/0x9)+parseInt(_0xa57168(0x1de))/0xa*(-parseInt(_0xa57168(0x1e3))/0xb)+parseInt(_0xa57168(0x1be))/0xc;if(_0x58df2b===_0x44431b)break;else _0x406515['push'](_0x406515['shift']());}catch(_0x340fe2){_0x406515['push'](_0x406515['shift']());}}}(a68_0x41c7,0xbf810));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':a68_0x41d1fb(0x1f2),'command':a68_0x41d1fb(0x1b0),'description':a68_0x41d1fb(0x1d0),'risk':'write','flags':[{'name':'type','type':'string','required':!![],'enum':[a68_0x41d1fb(0x1cc),a68_0x41d1fb(0x1f3),a68_0x41d1fb(0x1f4)],'description':'Script\x20type'},{'name':a68_0x41d1fb(0x1cd),'type':a68_0x41d1fb(0x1e8),'required':!![],'description':a68_0x41d1fb(0x1b8)},{'name':a68_0x41d1fb(0x1f7),'type':a68_0x41d1fb(0x1e8),'description':a68_0x41d1fb(0x1e0)},{'name':a68_0x41d1fb(0x1aa),'type':'string','description':'Dataset\x20alias\x20from\x20api.ts\x20(HOOK\x20only,\x20preferred)'},{'name':a68_0x41d1fb(0x1ea),'type':a68_0x41d1fb(0x1e8),'description':a68_0x41d1fb(0x1e4)},{'name':a68_0x41d1fb(0x1b7),'type':a68_0x41d1fb(0x1e8),'description':'Operation\x20type\x20(HOOK\x20only)'},{'name':a68_0x41d1fb(0x1fc),'type':a68_0x41d1fb(0x1e8),'description':a68_0x41d1fb(0x1db),'enum':[a68_0x41d1fb(0x1e2),'after']}],async 'validate'(_0x1919cd){const _0x1a401b=a68_0x41d1fb,_0x58a4ae=_0x1919cd['str'](_0x1a401b(0x1cd));if(!isValidBffFunctionName(_0x58a4ae))throw CliErrors['validation'](_0x1a401b(0x1e5)+_0x58a4ae+'\x22.\x20Must\x20be\x20a\x20valid\x20JS\x20identifier\x20(e.g.\x20createOrder,\x20beforeFilter).');},async 'execute'(_0xcd63f5){const _0x5e0eb8=a68_0x41d1fb,_0x47062e=loadBffProjectConfig(_0xcd63f5[_0x5e0eb8(0x1b5)]),_0x461bd4=_0xcd63f5['str'](_0x5e0eb8(0x1ad)),_0x4d4893=_0xcd63f5['str'](_0x5e0eb8(0x1cd)),_0x306640=_0xcd63f5[_0x5e0eb8(0x1d7)](_0x5e0eb8(0x1f7))||undefined,_0x585171=_0x461bd4===_0x5e0eb8(0x1f4)?await resolveHookOptions(_0x47062e,_0xcd63f5):undefined,_0x1c7cf2=buildFilePath(_0x47062e,_0x461bd4,_0x4d4893,_0x585171);if(await fileExists(_0x1c7cf2))throw CliErrors['validation'](_0x5e0eb8(0x1c6)+_0x1c7cf2);await mkdir(dirname(_0x1c7cf2),{'recursive':!![]});const _0x1c23d1=generateTemplate(_0x461bd4,_0x4d4893,_0xcd63f5[_0x5e0eb8(0x1b5)],_0x306640,_0x585171);await writeFile(_0x1c7cf2,_0x1c23d1,_0x5e0eb8(0x1df));const _0x6225c7={'type':_0x461bd4,'name':_0x4d4893,'path':_0x1c7cf2};if(_0x306640)_0x6225c7[_0x5e0eb8(0x1f7)]=_0x306640;if(_0x585171){if(_0x585171[_0x5e0eb8(0x1aa)])_0x6225c7['alias']=_0x585171[_0x5e0eb8(0x1aa)];_0x6225c7['datasetCode']=_0x585171['datasetCode'],_0x6225c7[_0x5e0eb8(0x1bc)]=_0x585171['operationType'],_0x6225c7['functionNode']=_0x585171[_0x5e0eb8(0x1f5)];}return{'ok':!![],'data':_0x6225c7,'message':_0x5e0eb8(0x1f6)+_0x461bd4+'\x20function:\x20'+_0x4d4893};}};async function resolveHookOptions(_0x172ec3,_0x2ba824){const _0x3cf123=a68_0x41d1fb,_0x25cacd=loadAliasMap(_0x2ba824[_0x3cf123(0x1e9)],undefined,resolveApiFilePath(_0x2ba824['apiDir'],_0x2ba824[_0x3cf123(0x1b5)])),_0x4a1899=_0x25cacd['length']>0x0;let _0x10937e,_0x24528f,_0x31c313;const _0x48448f=_0x2ba824[_0x3cf123(0x1d7)](_0x3cf123(0x1aa)),_0x22c41d=_0x2ba824[_0x3cf123(0x1d7)](_0x3cf123(0x1ea));if(_0x48448f){const _0x17dd6c=resolveAlias(_0x2ba824[_0x3cf123(0x1e9)],_0x48448f,undefined,resolveApiFilePath(_0x2ba824[_0x3cf123(0x1e9)],_0x2ba824[_0x3cf123(0x1b5)]));if(!_0x17dd6c){const _0x2812be=_0x4a1899?'Available\x20aliases:\x20'+_0x25cacd['map'](_0x37a59b=>_0x37a59b[_0x3cf123(0x1aa)])[_0x3cf123(0x1d8)](',\x20'):_0x3cf123(0x1f1)+CLI_BIN_NAME+_0x3cf123(0x1ba);throw CliErrors[_0x3cf123(0x1c8)](_0x3cf123(0x200)+_0x48448f+_0x3cf123(0x1c0)+_0x2812be);}_0x10937e=_0x48448f,_0x24528f=_0x17dd6c;}else{if(_0x22c41d){_0x24528f=_0x22c41d;const _0x6334ff=_0x25cacd['find'](_0x2b3075=>_0x2b3075[_0x3cf123(0x1ed)]===_0x22c41d);_0x10937e=_0x6334ff?.['alias'];}else{if(_0x2ba824[_0x3cf123(0x1fd)])throw CliErrors[_0x3cf123(0x1c8)](_0x3cf123(0x201));else{if(_0x4a1899){const _0x3f5fc4=_0x25cacd[_0x3cf123(0x1eb)](_0x1a4d30=>_0x1a4d30[_0x3cf123(0x1aa)]+'\x20('+_0x1a4d30[_0x3cf123(0x1b4)]+')'),_0x2ec0ae=await promptSelect('Select\x20dataset:',_0x3f5fc4),_0x40fd84=_0x25cacd[_0x2ec0ae];if(!_0x40fd84)throw CliErrors[_0x3cf123(0x1c8)](_0x3cf123(0x1bb));_0x10937e=_0x40fd84[_0x3cf123(0x1aa)],_0x24528f=_0x40fd84['datasetCode'];}else{const _0x571753=await listDatasets(_0x2ba824[_0x3cf123(0x1b5)]);if(_0x571753['length']===0x0)throw CliErrors[_0x3cf123(0x1c8)](_0x3cf123(0x1a9));const _0x508f03=_0x571753[_0x3cf123(0x1eb)](_0x59e1be=>_0x59e1be[_0x3cf123(0x1cd)]+'\x20('+_0x59e1be[_0x3cf123(0x1e1)]+')'),_0x57fefc=await promptSelect(_0x3cf123(0x1c4),_0x508f03),_0x3dea67=_0x571753[_0x57fefc];if(!_0x3dea67)throw CliErrors['validation'](_0x3cf123(0x1bb));_0x24528f=_0x3dea67['code'],_0x10937e=undefined;}}}}const _0x3677f1=await listDatasets(_0x2ba824[_0x3cf123(0x1b5)]),_0x4f8899=_0x3677f1[_0x3cf123(0x1ec)](_0x5a73ec=>_0x5a73ec['code']===_0x24528f);if(!_0x4f8899)throw CliErrors[_0x3cf123(0x1c8)]('Dataset\x20not\x20found\x20for\x20code\x20\x22'+_0x24528f+_0x3cf123(0x1b6)+(_0x10937e?'The\x20api.ts\x20may\x20be\x20stale\x20—\x20run\x20`'+CLI_BIN_NAME+'\x20api\x20pull`\x20to\x20refresh.':''));_0x31c313=_0x4f8899['id'];const _0x455ef6=_0x10937e??_0x24528f,_0x7037ad=await listBffDatasetOperations(_0x2ba824[_0x3cf123(0x1b5)],_0x31c313),_0x26b0f2=_0x7037ad?Object['keys'](_0x7037ad):[];if(_0x26b0f2['length']===0x0)throw CliErrors['validation'](_0x3cf123(0x1d2)+_0x455ef6+'.');let _0x402307;const _0x437679=_0x2ba824[_0x3cf123(0x1d7)](_0x3cf123(0x1b7));if(_0x437679){if(!_0x26b0f2[_0x3cf123(0x1b3)](_0x437679))throw CliErrors[_0x3cf123(0x1c8)](_0x3cf123(0x1dc)+_0x437679+_0x3cf123(0x1d5)+_0x455ef6+'.\x20'+(_0x3cf123(0x1cb)+_0x26b0f2['join'](',\x20')));_0x402307=_0x437679;}else{if(_0x2ba824[_0x3cf123(0x1fd)])throw CliErrors[_0x3cf123(0x1c8)](_0x3cf123(0x1ce));const _0x265207=await promptSelect(_0x3cf123(0x1fe),_0x26b0f2);_0x402307=_0x26b0f2[_0x265207]??_0x26b0f2[0x0];}let _0xf77eb2=normalizeHookFunctionNode(_0x2ba824[_0x3cf123(0x1d7)](_0x3cf123(0x1fc)));if(!_0xf77eb2){if(_0x2ba824[_0x3cf123(0x1d7)](_0x3cf123(0x1fc)))throw CliErrors[_0x3cf123(0x1c8)]('--function-node\x20must\x20be\x20\x27before\x27\x20or\x20\x27after\x27.');if(_0x2ba824[_0x3cf123(0x1fd)])throw CliErrors[_0x3cf123(0x1c8)](_0x3cf123(0x1c5));const _0x12d26a=await promptSelect(_0x3cf123(0x1b9),[_0x3cf123(0x1e2),_0x3cf123(0x1ac)]);_0xf77eb2=['before',_0x3cf123(0x1ac)][_0x12d26a]??_0x3cf123(0x1e2);}return{'alias':_0x10937e,'datasetCode':_0x24528f,'datasetId':_0x31c313,'operationType':_0x402307,'functionNode':_0xf77eb2};}async function promptSelect(_0x59528d,_0x1b22fb){const _0x3b0c65=a68_0x41d1fb;if(_0x1b22fb[_0x3b0c65(0x1c3)]===0x1)return 0x0;for(const [_0x2111ee,_0x58095c]of _0x1b22fb[_0x3b0c65(0x1dd)]()){process[_0x3b0c65(0x1d6)][_0x3b0c65(0x1ee)]('\x20\x20'+(_0x2111ee+0x1)+'.\x20'+_0x58095c+'\x0a');}const _0x18fa29=createInterface({'input':process[_0x3b0c65(0x1d1)],'output':process[_0x3b0c65(0x1d6)]});while(!![]){const _0x5575a2=await new Promise(_0x2210e1=>{_0x18fa29['question'](_0x59528d+'\x20',_0x2210e1);}),_0x5a8de9=Number[_0x3b0c65(0x1c7)](_0x5575a2[_0x3b0c65(0x1d4)](),0xa);if(Number[_0x3b0c65(0x1fb)](_0x5a8de9)&&_0x5a8de9>=0x1&&_0x5a8de9<=_0x1b22fb[_0x3b0c65(0x1c3)])return _0x18fa29[_0x3b0c65(0x1f9)](),_0x5a8de9-0x1;process['stderr'][_0x3b0c65(0x1ee)](_0x3b0c65(0x1ae)+_0x1b22fb[_0x3b0c65(0x1c3)]+'.\x0a');}}function a68_0x41c7(){const _0x142c40=['function-node','nonInteractive','Select\x20operation\x20type:','.js','Alias\x20\x22','--alias\x20or\x20--datasetcode\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','No\x20datasets\x20found\x20for\x20this\x20app.','alias','scriptsRootDir','after','type','\x20\x20Enter\x20a\x20number\x20between\x201\x20and\x20','TODO:\x20add\x20script\x20description','new','\x0a\x20*\x20[接口路径]\x20POST\x20/api/','8439025djfiCk','includes','tableName','appCode','\x22.\x20','operation-type','Function\x20name\x20(valid\x20JS\x20identifier)','Select\x20trigger\x20node:','\x20api\x20pull`\x20first,\x20or\x20use\x20--datasetcode\x20instead.','Invalid\x20dataset\x20selection.','operationType','(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a','38837448jfnRyN','4NZtGyB','\x22\x20not\x20found.\x20','\x0a\x20*\x20[触发节点]\x20','32YWZkJy','length','Select\x20dataset:','--function-node\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','File\x20already\x20exists:\x20','parseInt','validation','\x0a\x20*\x20[脚本类型]\x20COMMON\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/COMMON/','128466qjZZvz','Available:\x20','COMMON','name','--operation-type\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','HOOK\x20requires\x20hookOptions\x20for\x20template\x20generation.','Scaffold\x20a\x20new\x20BFF\x20function\x20from\x20template','stdin','No\x20operation\x20types\x20found\x20for\x20dataset\x20','\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','trim','\x22\x20not\x20found\x20for\x20dataset\x20','stderr','str','join','12rbtvap','146979sMFGiM','Trigger\x20node\x20(HOOK\x20only)','Operation\x20type\x20\x22','entries','90tCmwuy','utf8','Script\x20description','code','before','1309132yqZdYY','Dataset\x20code\x20(HOOK\x20only,\x20fallback\x20when\x20alias\x20unavailable)','Invalid\x20function\x20name\x20\x22','96WLmJZN','\x0a\x20*\x20[脚本名称]\x20','string','apiDir','datasetcode','map','find','datasetCode','write','.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','\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','No\x20api.ts\x20found.\x20Run\x20`','bff','ENDPOINT','HOOK','functionNode','Created\x20','description','334835UvYubJ','close','5564YgWzAN','isInteger'];a68_0x41c7=function(){return _0x142c40;};return a68_0x41c7();}function buildFilePath(_0x416358,_0x39fef2,_0x3e9c56,_0x5e704c){const _0x41a79f=a68_0x41d1fb;if(_0x39fef2==='HOOK'){if(!_0x5e704c)throw CliErrors[_0x41a79f(0x1c8)]('HOOK\x20requires\x20alias/operation/node\x20options.');const _0x5f0cec=_0x5e704c[_0x41a79f(0x1aa)]??_0x5e704c[_0x41a79f(0x1ed)];return join(_0x416358[_0x41a79f(0x1ab)],_0x41a79f(0x1f4),_0x5f0cec,_0x5e704c[_0x41a79f(0x1bc)],_0x5e704c[_0x41a79f(0x1f5)],_0x3e9c56+'.js');}return join(_0x416358['scriptsRootDir'],_0x39fef2,_0x3e9c56+_0x41a79f(0x1ff));}export function generateTemplate(_0x49e158,_0x4b050c,_0x63b43b,_0x1b4d7a,_0x28b2c5){const _0x395cbd=a68_0x41d1fb,_0x18e645=_0x1b4d7a?.[_0x395cbd(0x1d4)]()||_0x395cbd(0x1af);if(_0x49e158===_0x395cbd(0x1cc))return'/**\x0a\x20*\x20COMMON\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20'+_0x18e645+_0x395cbd(0x1e7)+_0x4b050c+_0x395cbd(0x1c9)+_0x4b050c+_0x395cbd(0x1ef)+_0x4b050c+_0x395cbd(0x1bd);if(_0x49e158==='ENDPOINT')return'/**\x0a\x20*\x20ENDPOINT\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20'+_0x18e645+'\x0a\x20*\x20[接口路径]\x20POST\x20/api/endpoint/{appCode}/{scriptName}\x0a\x20*\x20[当前示例]\x20POST\x20/api/endpoint/'+_0x63b43b+'/'+_0x4b050c+_0x395cbd(0x1d3)+_0x4b050c+_0x395cbd(0x1bd);if(!_0x28b2c5)throw CliErrors[_0x395cbd(0x1c8)](_0x395cbd(0x1cf));return'/**\x0a\x20*\x20HOOK\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20'+_0x18e645+_0x395cbd(0x1b1)+_0x63b43b+'/'+_0x28b2c5[_0x395cbd(0x1ed)]+'/'+_0x28b2c5[_0x395cbd(0x1bc)]+_0x395cbd(0x1c1)+_0x28b2c5[_0x395cbd(0x1f5)]+_0x395cbd(0x1f0)+_0x4b050c+_0x395cbd(0x1bd);}