@lovrabet/rabetbase-cli 2.3.13-beta.1 → 2.3.13-beta.2

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 (260) 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/index.js +1 -1
  21. package/lib/commands/app/list.js +1 -1
  22. package/lib/commands/app/remote-directory.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-config/delete.js +1 -1
  26. package/lib/commands/app-config/get.js +1 -1
  27. package/lib/commands/app-config/index.js +1 -1
  28. package/lib/commands/app-config/list.js +1 -1
  29. package/lib/commands/app-config/set.js +1 -1
  30. package/lib/commands/app-config/shared.js +1 -1
  31. package/lib/commands/auth/index.js +1 -1
  32. package/lib/commands/bff/create.js +1 -1
  33. package/lib/commands/bff/delete.js +1 -1
  34. package/lib/commands/bff/detail.js +1 -1
  35. package/lib/commands/bff/index.js +1 -1
  36. package/lib/commands/bff/list.js +1 -1
  37. package/lib/commands/bff/pull.js +1 -1
  38. package/lib/commands/bff/push.js +1 -1
  39. package/lib/commands/bff/status.js +1 -1
  40. package/lib/commands/cli-skill/index.js +1 -1
  41. package/lib/commands/cli-update.js +1 -1
  42. package/lib/commands/codegen/index.js +1 -1
  43. package/lib/commands/codegen/sdk.js +1 -1
  44. package/lib/commands/codegen/sql.js +1 -1
  45. package/lib/commands/common/app-registry.js +1 -1
  46. package/lib/commands/common/app-selector.js +1 -1
  47. package/lib/commands/common/async-task.js +1 -1
  48. package/lib/commands/common/dry-run.js +1 -1
  49. package/lib/commands/common/flags.js +1 -1
  50. package/lib/commands/common/local-file.js +1 -1
  51. package/lib/commands/common/validate.js +1 -1
  52. package/lib/commands/config/get.js +1 -1
  53. package/lib/commands/config/index.js +1 -1
  54. package/lib/commands/config/list.js +1 -1
  55. package/lib/commands/config/set.js +1 -1
  56. package/lib/commands/config/shared.js +1 -1
  57. package/lib/commands/data/filter.js +1 -1
  58. package/lib/commands/data/getOne.js +1 -1
  59. package/lib/commands/data/index.js +1 -1
  60. package/lib/commands/data/shared.js +1 -1
  61. package/lib/commands/dataset/business-group-update.js +1 -1
  62. package/lib/commands/dataset/capability.js +1 -1
  63. package/lib/commands/dataset/delete.js +1 -1
  64. package/lib/commands/dataset/detail.js +1 -1
  65. package/lib/commands/dataset/extend-update.js +1 -1
  66. package/lib/commands/dataset/field-update.js +1 -1
  67. package/lib/commands/dataset/generate.js +1 -1
  68. package/lib/commands/dataset/index.js +1 -1
  69. package/lib/commands/dataset/list.js +1 -1
  70. package/lib/commands/dataset/operations.js +1 -1
  71. package/lib/commands/dataset/relation-audit.js +1 -1
  72. package/lib/commands/dataset/relation-create.js +1 -1
  73. package/lib/commands/dataset/relation-delete.js +1 -1
  74. package/lib/commands/dataset/relation-shared.js +1 -1
  75. package/lib/commands/dataset/relation-update.js +1 -1
  76. package/lib/commands/dataset/relations.js +1 -1
  77. package/lib/commands/dataset/rename.js +1 -1
  78. package/lib/commands/dataset/restore.js +1 -1
  79. package/lib/commands/db/analysis-batching.js +1 -1
  80. package/lib/commands/db/analyze-batch-plan.js +1 -1
  81. package/lib/commands/db/analyze-cancel.js +1 -1
  82. package/lib/commands/db/analyze-start.js +1 -1
  83. package/lib/commands/db/analyze-status.js +1 -1
  84. package/lib/commands/db/create.js +1 -1
  85. package/lib/commands/db/delete.js +1 -1
  86. package/lib/commands/db/detail.js +1 -1
  87. package/lib/commands/db/diff.js +1 -1
  88. package/lib/commands/db/index.js +1 -1
  89. package/lib/commands/db/list.js +1 -1
  90. package/lib/commands/db/shared.js +1 -1
  91. package/lib/commands/db/tables.js +1 -1
  92. package/lib/commands/db/test.js +1 -1
  93. package/lib/commands/db/update.js +1 -1
  94. package/lib/commands/doctor.js +1 -1
  95. package/lib/commands/file/index.js +1 -1
  96. package/lib/commands/init/index.js +1 -1
  97. package/lib/commands/issue/index.js +1 -1
  98. package/lib/commands/issue/nudge.js +1 -1
  99. package/lib/commands/issue/report.js +1 -1
  100. package/lib/commands/issue/shared.js +1 -1
  101. package/lib/commands/logs/index.js +1 -1
  102. package/lib/commands/menu/delete.js +1 -1
  103. package/lib/commands/menu/external-link-create.js +1 -1
  104. package/lib/commands/menu/group-create.js +1 -1
  105. package/lib/commands/menu/group-update.js +1 -1
  106. package/lib/commands/menu/index.js +1 -1
  107. package/lib/commands/menu/list.js +1 -1
  108. package/lib/commands/menu/move.js +1 -1
  109. package/lib/commands/menu/regroup-start.js +1 -1
  110. package/lib/commands/menu/shared/compare-table.js +1 -1
  111. package/lib/commands/menu/shared/delete-plan.js +1 -1
  112. package/lib/commands/menu/shared/facts.js +1 -1
  113. package/lib/commands/menu/shared/index.js +1 -1
  114. package/lib/commands/menu/shared/inquirer.js +1 -1
  115. package/lib/commands/menu/shared/local-pages.js +1 -1
  116. package/lib/commands/menu/shared/logic.js +1 -1
  117. package/lib/commands/menu/shared/mutations.js +1 -1
  118. package/lib/commands/menu/shared/service.js +1 -1
  119. package/lib/commands/menu/shared/sync-core.js +1 -1
  120. package/lib/commands/menu/shared/update-core.js +1 -1
  121. package/lib/commands/menu/shared/valid-url.js +1 -1
  122. package/lib/commands/menu/sync.js +1 -1
  123. package/lib/commands/menu/update.js +1 -1
  124. package/lib/commands/notification/config-list.js +1 -1
  125. package/lib/commands/notification/index.js +1 -1
  126. package/lib/commands/page/generate-start.js +1 -1
  127. package/lib/commands/page/generate-status.js +1 -1
  128. package/lib/commands/page/index.js +1 -1
  129. package/lib/commands/page/pull.js +1 -1
  130. package/lib/commands/page/push.js +1 -1
  131. package/lib/commands/page/relation-audit.js +1 -1
  132. package/lib/commands/page/shared.js +1 -1
  133. package/lib/commands/page/standard-page-status.js +1 -1
  134. package/lib/commands/page/sync.js +1 -1
  135. package/lib/commands/permit/index.js +1 -1
  136. package/lib/commands/permit/page-get.js +1 -1
  137. package/lib/commands/permit/page-set.js +1 -1
  138. package/lib/commands/permit/role-apis-set.js +1 -1
  139. package/lib/commands/permit/role-menus-set.js +1 -1
  140. package/lib/commands/permit/role-menus.js +1 -1
  141. package/lib/commands/permit/shared.js +1 -1
  142. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  143. package/lib/commands/project/create/format-elapsed.js +1 -1
  144. package/lib/commands/project/create/main.js +1 -1
  145. package/lib/commands/project/create/non-interactive.js +1 -1
  146. package/lib/commands/project/create/project-template-path.js +1 -1
  147. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  148. package/lib/commands/project/create/use-format-code.js +1 -1
  149. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  150. package/lib/commands/project/index.js +1 -1
  151. package/lib/commands/project/init.js +1 -1
  152. package/lib/commands/project/upgrade.js +1 -1
  153. package/lib/commands/registry.js +1 -1
  154. package/lib/commands/role/create.js +1 -1
  155. package/lib/commands/role/delete.js +1 -1
  156. package/lib/commands/role/detail.js +1 -1
  157. package/lib/commands/role/index.js +1 -1
  158. package/lib/commands/role/list.js +1 -1
  159. package/lib/commands/role/shared.js +1 -1
  160. package/lib/commands/role/update.js +1 -1
  161. package/lib/commands/role/user-add.js +1 -1
  162. package/lib/commands/role/user-remove.js +1 -1
  163. package/lib/commands/role/user-resolve.js +1 -1
  164. package/lib/commands/run/index.js +1 -1
  165. package/lib/commands/schema.js +1 -1
  166. package/lib/commands/sql/create.js +1 -1
  167. package/lib/commands/sql/delete.js +1 -1
  168. package/lib/commands/sql/detail.js +1 -1
  169. package/lib/commands/sql/exec.js +1 -1
  170. package/lib/commands/sql/index.js +1 -1
  171. package/lib/commands/sql/list.js +1 -1
  172. package/lib/commands/sql/pull.js +1 -1
  173. package/lib/commands/sql/push.js +1 -1
  174. package/lib/commands/sql/save.js +1 -1
  175. package/lib/commands/sql/shared.js +1 -1
  176. package/lib/commands/sql/status.js +1 -1
  177. package/lib/commands/sql/validate.js +1 -1
  178. package/lib/commands/task/index.js +1 -1
  179. package/lib/commands/task/status.js +1 -1
  180. package/lib/commands/workspace/add.js +1 -1
  181. package/lib/commands/workspace/index.js +1 -1
  182. package/lib/commands/workspace/remove.js +1 -1
  183. package/lib/config/schema.js +1 -1
  184. package/lib/constant/cdn.js +1 -1
  185. package/lib/constant/cli.js +1 -1
  186. package/lib/constant/defaults.js +1 -1
  187. package/lib/constant/domain.js +1 -1
  188. package/lib/constant/env.js +1 -1
  189. package/lib/constant/output.js +1 -1
  190. package/lib/constant/paths.js +1 -1
  191. package/lib/constant/risk.js +1 -1
  192. package/lib/context/app-resolver.js +1 -1
  193. package/lib/context/auth-resolver.js +1 -1
  194. package/lib/context/config-loader.js +1 -1
  195. package/lib/context.js +1 -1
  196. package/lib/core/alias-resolver.js +1 -1
  197. package/lib/core/api-client.js +1 -1
  198. package/lib/core/bff/config.js +1 -1
  199. package/lib/core/bff/file-system.js +1 -1
  200. package/lib/core/bff/hash.js +1 -1
  201. package/lib/core/bff/lock.js +1 -1
  202. package/lib/core/bff/utils.js +1 -1
  203. package/lib/core/db-resolver.js +1 -1
  204. package/lib/core/page/file-system.js +1 -1
  205. package/lib/core/page/hash.js +1 -1
  206. package/lib/core/page/lock.js +1 -1
  207. package/lib/core/sql-index-auditor.js +1 -1
  208. package/lib/core/sql-sync/config.js +1 -1
  209. package/lib/core/sql-sync/file-system.js +1 -1
  210. package/lib/core/sql-sync/hash.js +1 -1
  211. package/lib/core/sql-sync/lock.js +1 -1
  212. package/lib/core/sql-sync/utils.js +1 -1
  213. package/lib/core/sql-validator.js +1 -1
  214. package/lib/errors.js +1 -1
  215. package/lib/framework/build-all-flags.js +1 -1
  216. package/lib/framework/error-output.js +1 -1
  217. package/lib/framework/explicit-yes.js +1 -1
  218. package/lib/framework/flags.js +1 -1
  219. package/lib/framework/help.js +1 -1
  220. package/lib/framework/index.js +1 -1
  221. package/lib/framework/output.js +1 -1
  222. package/lib/framework/response.js +1 -1
  223. package/lib/framework/runner-alias.js +1 -1
  224. package/lib/framework/runner.js +1 -1
  225. package/lib/framework/schema-export.js +1 -1
  226. package/lib/framework/types.js +1 -1
  227. package/lib/generated/build-info.js +1 -1
  228. package/lib/help.js +1 -1
  229. package/lib/skills/main.js +1 -1
  230. package/lib/skills/npx-skills-add.js +1 -1
  231. package/lib/telemetry/cli-command-trace.js +1 -1
  232. package/lib/telemetry/cli-help-trace.js +1 -1
  233. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  234. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  235. package/lib/telemetry/send-cli-trace-log.js +1 -1
  236. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  237. package/lib/utils/ai_config.js +1 -1
  238. package/lib/utils/apply-jq-filter.js +1 -1
  239. package/lib/utils/cdn-config.js +1 -1
  240. package/lib/utils/check-sdk-version.js +1 -1
  241. package/lib/utils/cli-version-check.js +1 -1
  242. package/lib/utils/cli-version-policy.js +1 -1
  243. package/lib/utils/config.js +1 -1
  244. package/lib/utils/copy-directory.js +1 -1
  245. package/lib/utils/entity-with-id.js +1 -1
  246. package/lib/utils/file-utils.js +1 -1
  247. package/lib/utils/guides-cdn.js +1 -1
  248. package/lib/utils/http-client.js +1 -1
  249. package/lib/utils/is-non-interactive.js +1 -1
  250. package/lib/utils/logger.js +1 -1
  251. package/lib/utils/params.js +1 -1
  252. package/lib/utils/platform.js +1 -1
  253. package/lib/utils/rules-cdn.js +1 -1
  254. package/lib/utils/sleep.js +1 -1
  255. package/lib/utils/template-replacer.js +1 -1
  256. package/lib/utils/update-notice.js +1 -1
  257. package/lib/utils/version.js +1 -1
  258. package/lib/utils/with-active-cookie.js +1 -1
  259. package/lib/utils/write-cli-side-channel.js +1 -1
  260. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x59ea17,_0x37e57e){const _0x40ef53=a249_0x1785,_0x15b291=_0x59ea17();while(!![]){try{const _0x2fb37f=parseInt(_0x40ef53(0x14e))/0x1+-parseInt(_0x40ef53(0x14d))/0x2+-parseInt(_0x40ef53(0x14b))/0x3*(parseInt(_0x40ef53(0x148))/0x4)+-parseInt(_0x40ef53(0x151))/0x5+parseInt(_0x40ef53(0x150))/0x6*(-parseInt(_0x40ef53(0x147))/0x7)+-parseInt(_0x40ef53(0x14c))/0x8+parseInt(_0x40ef53(0x153))/0x9;if(_0x2fb37f===_0x37e57e)break;else _0x15b291['push'](_0x15b291['shift']());}catch(_0x32e62a){_0x15b291['push'](_0x15b291['shift']());}}}(a249_0x51e3,0xc33c4));function toFiniteNumber(_0x4547ee){const _0x3157bd=a249_0x1785;if(typeof _0x4547ee===_0x3157bd(0x152)&&Number[_0x3157bd(0x14f)](_0x4547ee))return _0x4547ee;if(typeof _0x4547ee===_0x3157bd(0x146)){const _0x73be4c=_0x4547ee[_0x3157bd(0x14a)]();if(!_0x73be4c)return undefined;const _0x253a97=Number(_0x73be4c);if(Number[_0x3157bd(0x14f)](_0x253a97))return _0x253a97;}return undefined;}export function normalizeEntityWithIdResponse(_0x599983){const _0x55cbd3=a249_0x1785,_0x32b008=toFiniteNumber(_0x599983);if(_0x32b008!==undefined)return{'id':_0x32b008,'entity':{'id':_0x32b008}};if(!_0x599983||typeof _0x599983!==_0x55cbd3(0x149))return{'id':undefined,'entity':{}};const _0xd4d432={..._0x599983},_0x4af11e=toFiniteNumber(_0xd4d432['id']);return _0x4af11e!==undefined&&(_0xd4d432['id']=_0x4af11e),{'id':_0x4af11e,'entity':_0xd4d432};}function a249_0x1785(_0x4829db,_0x4aee9f){_0x4829db=_0x4829db-0x146;const _0x51e3df=a249_0x51e3();let _0x1785ff=_0x51e3df[_0x4829db];return _0x1785ff;}function a249_0x51e3(){const _0x2e187f=['number','27827370XrXZHJ','string','14868IgkgRQ','12CQPPce','object','trim','679002GqgSfR','1247480lRjFqx','627498IpVqTd','124351UMohir','isFinite','3390hMNkEX','339255XtHqRa'];a249_0x51e3=function(){return _0x2e187f;};return a249_0x51e3();}
1
+ (function(_0x514f82,_0x5687d0){const _0x489cb4=a249_0x1791,_0x20363e=_0x514f82();while(!![]){try{const _0x42da0c=parseInt(_0x489cb4(0x164))/0x1*(parseInt(_0x489cb4(0x167))/0x2)+parseInt(_0x489cb4(0x16b))/0x3+parseInt(_0x489cb4(0x16a))/0x4*(parseInt(_0x489cb4(0x161))/0x5)+-parseInt(_0x489cb4(0x169))/0x6*(-parseInt(_0x489cb4(0x15f))/0x7)+parseInt(_0x489cb4(0x16c))/0x8*(-parseInt(_0x489cb4(0x163))/0x9)+parseInt(_0x489cb4(0x15e))/0xa*(parseInt(_0x489cb4(0x168))/0xb)+-parseInt(_0x489cb4(0x160))/0xc;if(_0x42da0c===_0x5687d0)break;else _0x20363e['push'](_0x20363e['shift']());}catch(_0x1bce4d){_0x20363e['push'](_0x20363e['shift']());}}}(a249_0x31fa,0xd2624));function toFiniteNumber(_0x73be27){const _0x41b91f=a249_0x1791;if(typeof _0x73be27==='number'&&Number[_0x41b91f(0x162)](_0x73be27))return _0x73be27;if(typeof _0x73be27===_0x41b91f(0x166)){const _0x30c9ab=_0x73be27['trim']();if(!_0x30c9ab)return undefined;const _0x19ca7=Number(_0x30c9ab);if(Number[_0x41b91f(0x162)](_0x19ca7))return _0x19ca7;}return undefined;}function a249_0x1791(_0x10b68f,_0x2630f0){_0x10b68f=_0x10b68f-0x15e;const _0x31fa88=a249_0x31fa();let _0x1791fb=_0x31fa88[_0x10b68f];return _0x1791fb;}function a249_0x31fa(){const _0x26797c=['126UrHCVE','279UwLOrm','object','string','7722YfmsDp','99yfvpzE','804fMWZqM','136qMZfQL','1738848TdixKp','603952orMzFY','1324930fCiOjK','34902BZCQZX','33094920kLozxA','170465yufQvG','isFinite'];a249_0x31fa=function(){return _0x26797c;};return a249_0x31fa();}export function normalizeEntityWithIdResponse(_0xdcc083){const _0x3a3a32=a249_0x1791,_0x5cd631=toFiniteNumber(_0xdcc083);if(_0x5cd631!==undefined)return{'id':_0x5cd631,'entity':{'id':_0x5cd631}};if(!_0xdcc083||typeof _0xdcc083!==_0x3a3a32(0x165))return{'id':undefined,'entity':{}};const _0x56384={..._0xdcc083},_0x154f10=toFiniteNumber(_0x56384['id']);return _0x154f10!==undefined&&(_0x56384['id']=_0x154f10),{'id':_0x154f10,'entity':_0x56384};}
@@ -1 +1 @@
1
- (function(_0x299a82,_0x3491ec){const _0x6b7207=a250_0x5cca,_0xfaf57b=_0x299a82();while(!![]){try{const _0x5a8a45=-parseInt(_0x6b7207(0xcd))/0x1+-parseInt(_0x6b7207(0xca))/0x2*(-parseInt(_0x6b7207(0xc4))/0x3)+-parseInt(_0x6b7207(0xc8))/0x4*(-parseInt(_0x6b7207(0xc5))/0x5)+-parseInt(_0x6b7207(0xce))/0x6*(-parseInt(_0x6b7207(0xc6))/0x7)+-parseInt(_0x6b7207(0xc7))/0x8+-parseInt(_0x6b7207(0xc9))/0x9+parseInt(_0x6b7207(0xcb))/0xa;if(_0x5a8a45===_0x3491ec)break;else _0xfaf57b['push'](_0xfaf57b['shift']());}catch(_0x2b4280){_0xfaf57b['push'](_0xfaf57b['shift']());}}}(a250_0x14b0,0xcab64));import{existsSync,mkdirSync,copyFileSync,readdirSync,statSync}from'node:fs';function a250_0x5cca(_0x5941ea,_0x3b0f99){_0x5941ea=_0x5941ea-0xc4;const _0x14b0d1=a250_0x14b0();let _0x5cca37=_0x14b0d1[_0x5941ea];return _0x5cca37;}import{join}from'node:path';export async function copyDir(_0x51d73d,_0x233737){const _0x4f9826=a250_0x5cca,_0x97ebbf=statSync(_0x51d73d);if(_0x97ebbf[_0x4f9826(0xcc)]()){!existsSync(_0x233737)&&mkdirSync(_0x233737,{'recursive':!![]});const _0xec67e0=readdirSync(_0x51d73d);for(const _0x5906a0 of _0xec67e0){await copyDir(join(_0x51d73d,_0x5906a0),join(_0x233737,_0x5906a0));}}else copyFileSync(_0x51d73d,_0x233737);}export function ensureDir(_0x377caa){!existsSync(_0x377caa)&&mkdirSync(_0x377caa,{'recursive':!![]});}export function pathExists(_0x5becef){return existsSync(_0x5becef);}function a250_0x14b0(){const _0x2b5023=['2vKiRNZ','9601820xtJjpP','isDirectory','527180rOPwDW','69078yyAbml','2144361JLHCOF','685KYgftz','182FqTBpE','3646800pAdIzM','30928azJXUg','10982277fXXdez'];a250_0x14b0=function(){return _0x2b5023;};return a250_0x14b0();}
1
+ function a250_0x27bf(){const _0x36f721=['252LOZkuq','1330780aepzIj','10236304NMqWHH','211561FUtPFs','9vHWOoF','11856380EKFQmh','3710169ksQVPD','2037918elwbTV','1284124SxjmOi','10waUpWn'];a250_0x27bf=function(){return _0x36f721;};return a250_0x27bf();}(function(_0x2377d6,_0x75caa1){const _0x1313fc=a250_0x4265,_0x126a85=_0x2377d6();while(!![]){try{const _0xa23f9b=-parseInt(_0x1313fc(0x1d9))/0x1+-parseInt(_0x1313fc(0x1d5))/0x2+parseInt(_0x1313fc(0x1d4))/0x3+parseInt(_0x1313fc(0x1d6))/0x4*(parseInt(_0x1313fc(0x1d7))/0x5)+parseInt(_0x1313fc(0x1d8))/0x6*(-parseInt(_0x1313fc(0x1db))/0x7)+parseInt(_0x1313fc(0x1da))/0x8*(parseInt(_0x1313fc(0x1d2))/0x9)+parseInt(_0x1313fc(0x1d3))/0xa;if(_0xa23f9b===_0x75caa1)break;else _0x126a85['push'](_0x126a85['shift']());}catch(_0x1ec0d0){_0x126a85['push'](_0x126a85['shift']());}}}(a250_0x27bf,0xb0f78));import{existsSync,mkdirSync,copyFileSync,readdirSync,statSync}from'node:fs';import{join}from'node:path';export async function copyDir(_0x239f4e,_0x4c379e){const _0x29b088=statSync(_0x239f4e);if(_0x29b088['isDirectory']()){!existsSync(_0x4c379e)&&mkdirSync(_0x4c379e,{'recursive':!![]});const _0x3f870e=readdirSync(_0x239f4e);for(const _0x467261 of _0x3f870e){await copyDir(join(_0x239f4e,_0x467261),join(_0x4c379e,_0x467261));}}else copyFileSync(_0x239f4e,_0x4c379e);}function a250_0x4265(_0x2f9b90,_0x5d14be){_0x2f9b90=_0x2f9b90-0x1d2;const _0x27bf27=a250_0x27bf();let _0x4265fb=_0x27bf27[_0x2f9b90];return _0x4265fb;}export function ensureDir(_0x5bd174){!existsSync(_0x5bd174)&&mkdirSync(_0x5bd174,{'recursive':!![]});}export function pathExists(_0x11e510){return existsSync(_0x11e510);}
@@ -1 +1 @@
1
- const a251_0x2d60df=a251_0x4be3;(function(_0x54f7da,_0x2d92e1){const _0x59a345=a251_0x4be3,_0x4d4f77=_0x54f7da();while(!![]){try{const _0x2ca2da=parseInt(_0x59a345(0x97))/0x1*(-parseInt(_0x59a345(0x8f))/0x2)+-parseInt(_0x59a345(0xa4))/0x3*(-parseInt(_0x59a345(0x9d))/0x4)+-parseInt(_0x59a345(0x8c))/0x5+parseInt(_0x59a345(0x90))/0x6*(-parseInt(_0x59a345(0x94))/0x7)+parseInt(_0x59a345(0x89))/0x8*(-parseInt(_0x59a345(0x91))/0x9)+-parseInt(_0x59a345(0xa1))/0xa*(parseInt(_0x59a345(0x9f))/0xb)+parseInt(_0x59a345(0xa6))/0xc;if(_0x2ca2da===_0x2d92e1)break;else _0x4d4f77['push'](_0x4d4f77['shift']());}catch(_0x2e4596){_0x4d4f77['push'](_0x4d4f77['shift']());}}}(a251_0x5324,0x917b4));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 _0x7b6643=a251_0x4be3,_0x10dcc6=getTemplateBaseUrl();return _0x10dcc6+_0x7b6643(0xa8);}const CACHE_DIR=join(homedir(),a251_0x2d60df(0xa9),a251_0x2d60df(0xa3));export async function fetchGuidesFromCDN(){const _0x4b8b9c=a251_0x2d60df,_0x2af779=getGuidesCdnUrl(),_0x417938=await fetch(_0x2af779,{'headers':{'Accept':'application/json'}});if(!_0x417938['ok'])throw new Error(_0x4b8b9c(0xa2)+_0x417938[_0x4b8b9c(0x8d)]+'\x20'+_0x417938[_0x4b8b9c(0x8e)]);const _0x2f2722=await _0x417938['json']();if(!_0x2f2722[_0x4b8b9c(0x9b)]||typeof _0x2f2722[_0x4b8b9c(0x9b)]!==_0x4b8b9c(0x92))throw new Error(_0x4b8b9c(0xa5));return _0x2f2722;}export function writeGuidesToProject(_0x59eca5,_0xe3c0d8,_0x370087=a251_0x2d60df(0x87),_0x41ed8f){const _0xbf5680=a251_0x2d60df,_0x4982df=join(_0xe3c0d8,_0x370087);mkdirSync(_0x4982df,{'recursive':!![]});for(const [_0x352c59,_0x474f72]of Object['entries'](_0x59eca5[_0xbf5680(0x9b)])){let _0x3a28cf=_0x474f72[_0xbf5680(0x98)];_0x474f72[_0xbf5680(0x9e)]&&(_0x3a28cf=appendUpdateTime(_0x3a28cf,_0x474f72['lastUpdated'])),writeFileSync(join(_0x4982df,_0x352c59+'.md'),_0x3a28cf,_0xbf5680(0xaa));}}function a251_0x5324(){const _0x272051=['status','statusText','144QASiwV','6GxQBRk','117WZkfoU','object','CDN\x20数据中缺少\x20skillTemplate','4017391ejCfds','entries','length','5673ZUFGFU','content','replace','push','guides','extendContent','8RBybFp','lastUpdated','715Ntxjju','\x0a\x0a>更新时间:','147830IZMloJ','CDN\x20请求失败:\x20','cache','379770ByEKuW','CDN\x20返回数据格式错误','36258648hHRKNh','skillTemplate','/skills/guides.json','.lovrabet','utf-8','trimEnd','.lovrabet/skill/guides','title','294704tXAWaa','join','map','1283420VKyGVM'];a251_0x5324=function(){return _0x272051;};return a251_0x5324();}export function appendUpdateTime(_0x19ebed,_0x2a6169){const _0xa9d784=a251_0x2d60df;return _0x19ebed=_0x19ebed[_0xa9d784(0x99)](/\n*>更新时间:.*$/m,''),_0x19ebed['trimEnd']()+(_0xa9d784(0xa0)+_0x2a6169);}export function getSkillTemplate(_0x412237){const _0x46757b=a251_0x2d60df;return _0x412237['skillTemplate']?.[_0x46757b(0x98)]||'';}export function appendExtendContents(_0x55d1aa,_0x2f7341,_0x2e7c81){const _0x4ff1fd=a251_0x2d60df,_0x2acf0b=[];for(const [,_0x11a7e1]of Object[_0x4ff1fd(0x95)](_0x2f7341[_0x4ff1fd(0x9b)])){_0x11a7e1[_0x4ff1fd(0x9c)]&&_0x2acf0b[_0x4ff1fd(0x9a)](_0x11a7e1[_0x4ff1fd(0x9c)][_0x4ff1fd(0x86)]());}if(_0x2acf0b[_0x4ff1fd(0x96)]===0x0)return _0x55d1aa;return _0x55d1aa[_0x4ff1fd(0x86)]()+'\x0a\x0a'+_0x2acf0b[_0x4ff1fd(0x8a)]('\x0a\x0a')+'\x0a';}export function writeSkillFile(_0x4704c0,_0x24e660,_0x306e19){const _0x584f21=a251_0x2d60df,_0x223e87=getSkillTemplate(_0x4704c0);if(!_0x223e87)throw new Error(_0x584f21(0x93));const _0x15f5cc=dirname(_0x24e660);mkdirSync(_0x15f5cc,{'recursive':!![]});let _0x3e72d8=_0x223e87[_0x584f21(0x99)](/\{\{IDE_NAME\}\}/g,_0x306e19);_0x3e72d8=appendExtendContents(_0x3e72d8,_0x4704c0),_0x4704c0[_0x584f21(0xa7)]['lastUpdated']&&(_0x3e72d8=appendUpdateTime(_0x3e72d8,_0x4704c0[_0x584f21(0xa7)][_0x584f21(0x9e)])),writeFileSync(_0x24e660,_0x3e72d8,'utf-8');}function a251_0x4be3(_0xe26950,_0x325982){_0xe26950=_0xe26950-0x86;const _0x532420=a251_0x5324();let _0x4be391=_0x532420[_0xe26950];return _0x4be391;}export async function installGuides(_0x10bd8b){const _0x26fe37=a251_0x2d60df,_0x33a215=await fetchGuidesFromCDN();return writeGuidesToProject(_0x33a215,_0x10bd8b),Object['keys'](_0x33a215[_0x26fe37(0x9b)])[_0x26fe37(0x96)];}export function getGuidesSummary(_0x57dddc){const _0x473c7b=a251_0x2d60df;return Object[_0x473c7b(0x95)](_0x57dddc['guides'])[_0x473c7b(0x8b)](([_0x2343b3,_0x2a6e29])=>({'key':_0x2343b3,'title':_0x2a6e29[_0x473c7b(0x88)],'path':_0x2a6e29['path']}));}
1
+ const a251_0x526f6d=a251_0x2617;(function(_0x2f8c86,_0x47ee86){const _0xf117a3=a251_0x2617,_0x508c9c=_0x2f8c86();while(!![]){try{const _0x2c0a5e=parseInt(_0xf117a3(0x174))/0x1*(-parseInt(_0xf117a3(0x15c))/0x2)+parseInt(_0xf117a3(0x154))/0x3*(-parseInt(_0xf117a3(0x170))/0x4)+parseInt(_0xf117a3(0x176))/0x5*(parseInt(_0xf117a3(0x167))/0x6)+-parseInt(_0xf117a3(0x164))/0x7*(parseInt(_0xf117a3(0x162))/0x8)+parseInt(_0xf117a3(0x163))/0x9+parseInt(_0xf117a3(0x16f))/0xa+parseInt(_0xf117a3(0x155))/0xb;if(_0x2c0a5e===_0x47ee86)break;else _0x508c9c['push'](_0x508c9c['shift']());}catch(_0x47442d){_0x508c9c['push'](_0x508c9c['shift']());}}}(a251_0x3a90,0x8d4dc));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 _0x2ba4f3=a251_0x2617,_0x32a743=getTemplateBaseUrl();return _0x32a743+_0x2ba4f3(0x156);}const CACHE_DIR=join(homedir(),'.lovrabet',a251_0x526f6d(0x15e));function a251_0x2617(_0x2aa6ed,_0x25ad32){_0x2aa6ed=_0x2aa6ed-0x154;const _0x3a9084=a251_0x3a90();let _0x2617ae=_0x3a9084[_0x2aa6ed];return _0x2617ae;}export async function fetchGuidesFromCDN(){const _0x24ee57=a251_0x526f6d,_0x342e74=getGuidesCdnUrl(),_0x118355=await fetch(_0x342e74,{'headers':{'Accept':_0x24ee57(0x15d)}});if(!_0x118355['ok'])throw new Error(_0x24ee57(0x157)+_0x118355[_0x24ee57(0x172)]+'\x20'+_0x118355[_0x24ee57(0x177)]);const _0x146a0a=await _0x118355['json']();if(!_0x146a0a[_0x24ee57(0x169)]||typeof _0x146a0a[_0x24ee57(0x169)]!==_0x24ee57(0x168))throw new Error('CDN\x20返回数据格式错误');return _0x146a0a;}export function writeGuidesToProject(_0x9aff9f,_0x29aed,_0x58e089=a251_0x526f6d(0x16a),_0x2ce005){const _0x19076d=a251_0x526f6d,_0xfd00=join(_0x29aed,_0x58e089);mkdirSync(_0xfd00,{'recursive':!![]});for(const [_0x3715f5,_0x2fd6f1]of Object[_0x19076d(0x16b)](_0x9aff9f[_0x19076d(0x169)])){let _0x2dac2f=_0x2fd6f1[_0x19076d(0x173)];_0x2fd6f1['lastUpdated']&&(_0x2dac2f=appendUpdateTime(_0x2dac2f,_0x2fd6f1[_0x19076d(0x15b)])),writeFileSync(join(_0xfd00,_0x3715f5+_0x19076d(0x15f)),_0x2dac2f,_0x19076d(0x16c));}}export function appendUpdateTime(_0x11c6c3,_0x4f06bd){const _0x5a0c77=a251_0x526f6d;return _0x11c6c3=_0x11c6c3[_0x5a0c77(0x159)](/\n*>更新时间:.*$/m,''),_0x11c6c3[_0x5a0c77(0x160)]()+(_0x5a0c77(0x15a)+_0x4f06bd);}function a251_0x3a90(){const _0x48ad17=['8AwnSOM','title','status','content','109669KZktKY','CDN\x20数据中缺少\x20skillTemplate','59420xiZmsx','statusText','639336FIoOch','2650582eWlkDh','/skills/guides.json','CDN\x20请求失败:\x20','map','replace','\x0a\x0a>更新时间:','lastUpdated','2UHZIij','application/json','cache','.md','trimEnd','extendContent','720eTGgRb','3090141jggVuG','89663bYZeEZ','join','skillTemplate','582eQHtfv','object','guides','.lovrabet/skill/guides','entries','utf-8','path','length','5304240XJuAfh'];a251_0x3a90=function(){return _0x48ad17;};return a251_0x3a90();}export function getSkillTemplate(_0x5ca195){const _0x1747b7=a251_0x526f6d;return _0x5ca195[_0x1747b7(0x166)]?.[_0x1747b7(0x173)]||'';}export function appendExtendContents(_0x20e9c4,_0x43037d,_0x27cf7f){const _0x140d41=a251_0x526f6d,_0x1da4ad=[];for(const [,_0x1282b1]of Object['entries'](_0x43037d[_0x140d41(0x169)])){_0x1282b1[_0x140d41(0x161)]&&_0x1da4ad['push'](_0x1282b1[_0x140d41(0x161)]['trimEnd']());}if(_0x1da4ad[_0x140d41(0x16e)]===0x0)return _0x20e9c4;return _0x20e9c4[_0x140d41(0x160)]()+'\x0a\x0a'+_0x1da4ad[_0x140d41(0x165)]('\x0a\x0a')+'\x0a';}export function writeSkillFile(_0x838768,_0x25670d,_0x3a7064){const _0x267a74=a251_0x526f6d,_0x4996f8=getSkillTemplate(_0x838768);if(!_0x4996f8)throw new Error(_0x267a74(0x175));const _0x2d6141=dirname(_0x25670d);mkdirSync(_0x2d6141,{'recursive':!![]});let _0x3b3a76=_0x4996f8[_0x267a74(0x159)](/\{\{IDE_NAME\}\}/g,_0x3a7064);_0x3b3a76=appendExtendContents(_0x3b3a76,_0x838768),_0x838768[_0x267a74(0x166)]['lastUpdated']&&(_0x3b3a76=appendUpdateTime(_0x3b3a76,_0x838768[_0x267a74(0x166)][_0x267a74(0x15b)])),writeFileSync(_0x25670d,_0x3b3a76,_0x267a74(0x16c));}export async function installGuides(_0x32ee2d){const _0x5e4801=a251_0x526f6d,_0x3fde63=await fetchGuidesFromCDN();return writeGuidesToProject(_0x3fde63,_0x32ee2d),Object['keys'](_0x3fde63[_0x5e4801(0x169)])[_0x5e4801(0x16e)];}export function getGuidesSummary(_0x4ec725){const _0x2d7aec=a251_0x526f6d;return Object[_0x2d7aec(0x16b)](_0x4ec725[_0x2d7aec(0x169)])[_0x2d7aec(0x158)](([_0x30ba27,_0x1f2267])=>({'key':_0x30ba27,'title':_0x1f2267[_0x2d7aec(0x171)],'path':_0x1f2267[_0x2d7aec(0x16d)]}));}
@@ -1 +1 @@
1
- (function(_0x38e78a,_0x3aeca6){const _0x4b4e3f=a252_0x1350,_0x1ecd51=_0x38e78a();while(!![]){try{const _0x1248f2=-parseInt(_0x4b4e3f(0xf2))/0x1+-parseInt(_0x4b4e3f(0xef))/0x2*(parseInt(_0x4b4e3f(0xf8))/0x3)+-parseInt(_0x4b4e3f(0xf5))/0x4*(-parseInt(_0x4b4e3f(0x106))/0x5)+-parseInt(_0x4b4e3f(0x102))/0x6+parseInt(_0x4b4e3f(0xf3))/0x7*(parseInt(_0x4b4e3f(0xf4))/0x8)+-parseInt(_0x4b4e3f(0xff))/0x9+parseInt(_0x4b4e3f(0xf9))/0xa*(parseInt(_0x4b4e3f(0x101))/0xb);if(_0x1248f2===_0x3aeca6)break;else _0x1ecd51['push'](_0x1ecd51['shift']());}catch(_0x1bd311){_0x1ecd51['push'](_0x1ecd51['shift']());}}}(a252_0x1f96,0x8f4f7));function a252_0x1350(_0x5002cd,_0x3d1bf7){_0x5002cd=_0x5002cd-0xee;const _0x1f9621=a252_0x1f96();let _0x13501b=_0x1f9621[_0x5002cd];return _0x13501b;}export async function httpRequest(_0x5ad37e,_0x3f4886={}){const _0x37afb8=a252_0x1350,{timeout:timeout=0x7530,retries:retries=0x3,retryDelay:retryDelay=0x3e8,headers:headers={}}=_0x3f4886;let _0x85c822=null;for(let _0x3a5e65=0x0;_0x3a5e65<=retries;_0x3a5e65++){try{const _0x454d60=new AbortController(),_0x1a16f7=setTimeout(()=>_0x454d60['abort'](),timeout),_0x250dde=await fetch(_0x5ad37e,{'headers':headers,'signal':_0x454d60[_0x37afb8(0xf7)]});clearTimeout(_0x1a16f7);let _0x174f4a;const _0x40f7a8=_0x250dde[_0x37afb8(0x107)][_0x37afb8(0x104)](_0x37afb8(0xf6));return _0x40f7a8?.['includes']('application/json')?_0x174f4a=await _0x250dde['json']():_0x174f4a=await _0x250dde[_0x37afb8(0xfa)](),{'ok':_0x250dde['ok'],'status':_0x250dde[_0x37afb8(0xee)],'statusText':_0x250dde['statusText'],'data':_0x174f4a,'headers':_0x250dde[_0x37afb8(0x107)],'url':_0x250dde['url'],'text':()=>_0x250dde[_0x37afb8(0xfa)]()};}catch(_0x587f27){_0x85c822=_0x587f27 instanceof Error?_0x587f27:new Error(String(_0x587f27));if(_0x3a5e65===retries)break;if(shouldRetry(_0x587f27)){console['log']('*\x20请求失败,'+retryDelay+'ms\x20后进行第\x20'+(_0x3a5e65+0x1)+_0x37afb8(0xfe)),await sleep(retryDelay);continue;}else break;}}throw _0x85c822||new Error(_0x37afb8(0xf1));}function shouldRetry(_0x164e50){const _0x2bec8a=a252_0x1350;if(_0x164e50 instanceof Error){if(_0x164e50[_0x2bec8a(0xfb)]==='AbortError')return![];if(_0x164e50[_0x2bec8a(0xfb)]===_0x2bec8a(0x100)&&_0x164e50[_0x2bec8a(0x105)][_0x2bec8a(0xfc)](_0x2bec8a(0xf0)))return!![];if(_0x164e50['message'][_0x2bec8a(0xfc)](_0x2bec8a(0x103)))return!![];if(_0x164e50['message'][_0x2bec8a(0xfc)](_0x2bec8a(0xfd)))return![];}return![];}function sleep(_0x206e6a){return new Promise(_0x1d9a2d=>setTimeout(_0x1d9a2d,_0x206e6a));}export function validateUrl(_0x27860a){try{return new URL(_0x27860a),!![];}catch{return![];}}function a252_0x1f96(){const _0x53e4b1=['text','name','includes','ENOTFOUND','\x20次重试...','260811RDAnBl','TypeError','33MaZZuj','915804dCjkSS','ECONNRESET','get','message','100zfGBRr','headers','status','1190816NHFQUL','fetch','Request\x20failed','597894UrIgTL','7GjQbdG','5023000slSiNd','233404LASbbK','content-type','signal','3JqwYzB','556730odYOYf'];a252_0x1f96=function(){return _0x53e4b1;};return a252_0x1f96();}
1
+ function a252_0x3815(_0x3151ae,_0x4c2ac7){_0x3151ae=_0x3151ae-0x14f;const _0x4f00c5=a252_0x4f00();let _0x38151a=_0x4f00c5[_0x3151ae];return _0x38151a;}(function(_0x5d81a6,_0x3f23c3){const _0x5021ab=a252_0x3815,_0x3f6a7f=_0x5d81a6();while(!![]){try{const _0x322597=-parseInt(_0x5021ab(0x160))/0x1+parseInt(_0x5021ab(0x152))/0x2+parseInt(_0x5021ab(0x154))/0x3*(-parseInt(_0x5021ab(0x169))/0x4)+parseInt(_0x5021ab(0x151))/0x5+parseInt(_0x5021ab(0x15f))/0x6*(-parseInt(_0x5021ab(0x162))/0x7)+parseInt(_0x5021ab(0x156))/0x8*(-parseInt(_0x5021ab(0x168))/0x9)+parseInt(_0x5021ab(0x16e))/0xa*(parseInt(_0x5021ab(0x161))/0xb);if(_0x322597===_0x3f23c3)break;else _0x3f6a7f['push'](_0x3f6a7f['shift']());}catch(_0x930726){_0x3f6a7f['push'](_0x3f6a7f['shift']());}}}(a252_0x4f00,0x60469));export async function httpRequest(_0x36d24a,_0x3e5d2b={}){const _0x213135=a252_0x3815,{timeout:timeout=0x7530,retries:retries=0x3,retryDelay:retryDelay=0x3e8,headers:headers={}}=_0x3e5d2b;let _0x1c017d=null;for(let _0x25b90b=0x0;_0x25b90b<=retries;_0x25b90b++){try{const _0x4d3313=new AbortController(),_0x4fbc5f=setTimeout(()=>_0x4d3313['abort'](),timeout),_0x3ea200=await fetch(_0x36d24a,{'headers':headers,'signal':_0x4d3313[_0x213135(0x150)]});clearTimeout(_0x4fbc5f);let _0x40f48e;const _0x1ab8c7=_0x3ea200['headers'][_0x213135(0x153)](_0x213135(0x157));return _0x1ab8c7?.[_0x213135(0x155)]('application/json')?_0x40f48e=await _0x3ea200[_0x213135(0x16a)]():_0x40f48e=await _0x3ea200['text'](),{'ok':_0x3ea200['ok'],'status':_0x3ea200[_0x213135(0x15b)],'statusText':_0x3ea200[_0x213135(0x167)],'data':_0x40f48e,'headers':_0x3ea200[_0x213135(0x159)],'url':_0x3ea200[_0x213135(0x164)],'text':()=>_0x3ea200[_0x213135(0x166)]()};}catch(_0x1b5e2b){_0x1c017d=_0x1b5e2b instanceof Error?_0x1b5e2b:new Error(String(_0x1b5e2b));if(_0x25b90b===retries)break;if(shouldRetry(_0x1b5e2b)){console[_0x213135(0x15c)](_0x213135(0x163)+retryDelay+_0x213135(0x16b)+(_0x25b90b+0x1)+_0x213135(0x16c)),await sleep(retryDelay);continue;}else break;}}throw _0x1c017d||new Error(_0x213135(0x158));}function a252_0x4f00(){const _0x308b21=['558537PzrcbA','includes','16ujpIyD','content-type','Request\x20failed','headers','message','status','log','TypeError','AbortError','1410BSjPma','328763dIJYqs','11YQpFGe','21847wgWxwe','*\x20请求失败,','url','name','text','statusText','4014lEQWqU','12bMhhXz','json','ms\x20后进行第\x20','\x20次重试...','fetch','15767970YRWvpe','ENOTFOUND','signal','1467975SKDJxx','291160lzyJez','get'];a252_0x4f00=function(){return _0x308b21;};return a252_0x4f00();}function shouldRetry(_0xdea5f8){const _0x2c7667=a252_0x3815;if(_0xdea5f8 instanceof Error){if(_0xdea5f8[_0x2c7667(0x165)]===_0x2c7667(0x15e))return![];if(_0xdea5f8[_0x2c7667(0x165)]===_0x2c7667(0x15d)&&_0xdea5f8[_0x2c7667(0x15a)]['includes'](_0x2c7667(0x16d)))return!![];if(_0xdea5f8[_0x2c7667(0x15a)]['includes']('ECONNRESET'))return!![];if(_0xdea5f8[_0x2c7667(0x15a)]['includes'](_0x2c7667(0x14f)))return![];}return![];}function sleep(_0x5978d3){return new Promise(_0x315075=>setTimeout(_0x315075,_0x5978d3));}export function validateUrl(_0x2d8708){try{return new URL(_0x2d8708),!![];}catch{return![];}}
@@ -1 +1 @@
1
- (function(_0x3dda25,_0x40ea3b){const _0x4ec36a=a253_0x592a,_0x17e6cf=_0x3dda25();while(!![]){try{const _0x17d911=-parseInt(_0x4ec36a(0x118))/0x1*(parseInt(_0x4ec36a(0x113))/0x2)+-parseInt(_0x4ec36a(0x115))/0x3+-parseInt(_0x4ec36a(0x10c))/0x4+parseInt(_0x4ec36a(0x116))/0x5+parseInt(_0x4ec36a(0x10d))/0x6+parseInt(_0x4ec36a(0x114))/0x7+parseInt(_0x4ec36a(0x112))/0x8;if(_0x17d911===_0x40ea3b)break;else _0x17e6cf['push'](_0x17e6cf['shift']());}catch(_0x50d36c){_0x17e6cf['push'](_0x17e6cf['shift']());}}}(a253_0x5e40,0xbb60a));function a253_0x592a(_0x54d592,_0xa00b68){_0x54d592=_0x54d592-0x10c;const _0x5e4057=a253_0x5e40();let _0x592afb=_0x5e4057[_0x54d592];return _0x592afb;}function env(_0x2c5af4){return process.env[`RABETBASE_${_0x2c5af4}`]||process.env[`LOVRABET_${_0x2c5af4}`]||undefined;}function a253_0x5e40(){const _0xf7c922=['4232208iuevhG','41596HbVlit','10386831qBRQhq','981396KCjnep','70985JVodpt','nonInteractive','14aPZGIM','6136696XtUEdx','5357520fHlVVR','isTTY','stdin','true','setRawMode'];a253_0x5e40=function(){return _0xf7c922;};return a253_0x5e40();}export function isNonInteractive(_0x427468){const _0x4aee23=a253_0x592a;return!!(_0x427468[_0x4aee23(0x117)]||_0x427468['ci']||env('CI')==='true'||process.env.CI===_0x4aee23(0x110)||!process['stdout']['isTTY']||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x13efed=a253_0x592a;if(!process[_0x13efed(0x10f)][_0x13efed(0x10e)])return![];try{const _0x18fe01=process[_0x13efed(0x10f)]['isRaw'];return process[_0x13efed(0x10f)]['setRawMode'](!![]),process['stdin'][_0x13efed(0x111)](_0x18fe01??![]),!![];}catch{return![];}}
1
+ function a253_0x5c6e(_0x49c850,_0x39bc72){_0x49c850=_0x49c850-0x1c8;const _0x409b24=a253_0x409b();let _0x5c6ec8=_0x409b24[_0x49c850];return _0x5c6ec8;}function a253_0x409b(){const _0x7347c4=['setRawMode','1455840qKEnQn','stdin','4666380xMTDuY','5890908QNSLgS','stdout','6907563RiWCbm','3251549bhMlCt','isRaw','4mWCJcz','true','16qGbsZm','isTTY','11209180yHdyel','150OVeyAd','8724MDkbGx','nonInteractive'];a253_0x409b=function(){return _0x7347c4;};return a253_0x409b();}(function(_0x2feae9,_0x3c231d){const _0x30f7a2=a253_0x5c6e,_0x930045=_0x2feae9();while(!![]){try{const _0x2b655e=parseInt(_0x30f7a2(0x1cf))/0x1*(parseInt(_0x30f7a2(0x1d0))/0x2)+-parseInt(_0x30f7a2(0x1d3))/0x3+parseInt(_0x30f7a2(0x1ca))/0x4*(parseInt(_0x30f7a2(0x1d5))/0x5)+parseInt(_0x30f7a2(0x1d6))/0x6+parseInt(_0x30f7a2(0x1c8))/0x7*(-parseInt(_0x30f7a2(0x1cc))/0x8)+parseInt(_0x30f7a2(0x1d8))/0x9+-parseInt(_0x30f7a2(0x1ce))/0xa;if(_0x2b655e===_0x3c231d)break;else _0x930045['push'](_0x930045['shift']());}catch(_0x4ef591){_0x930045['push'](_0x930045['shift']());}}}(a253_0x409b,0xc3b99));function env(_0x564f97){return process.env[`RABETBASE_${_0x564f97}`]||process.env[`LOVRABET_${_0x564f97}`]||undefined;}export function isNonInteractive(_0xf84332){const _0x2774a7=a253_0x5c6e;return!!(_0xf84332[_0x2774a7(0x1d1)]||_0xf84332['ci']||env('CI')===_0x2774a7(0x1cb)||process.env.CI===_0x2774a7(0x1cb)||!process[_0x2774a7(0x1d7)][_0x2774a7(0x1cd)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x292484=a253_0x5c6e;if(!process[_0x292484(0x1d4)][_0x292484(0x1cd)])return![];try{const _0xb3cae8=process[_0x292484(0x1d4)][_0x292484(0x1c9)];return process[_0x292484(0x1d4)][_0x292484(0x1d2)](!![]),process[_0x292484(0x1d4)][_0x292484(0x1d2)](_0xb3cae8??![]),!![];}catch{return![];}}
@@ -1 +1 @@
1
- function a254_0x4b1d(){const _0x157e7e=['timestamp','error','4279389aPXtUX','toISOString','4ybsVNy','warn','.lovrabet.log','完成:\x20','initWinstonLogger','stringify','rawCommand','trim','unknown','green','logFilePath','addColors','parse','existsSync','printf','24323695pCmWKL','red','details','transports','join','errors','Failed\x20to\x20clear\x20logs:','2546425kYdJND','yellow','10vOzPHP','7407itCXyB','utf8','2062mWkxfT','format','6517770KTSttq','clearLogs','now','mkdirSync','duration','3608SHZAGu','createLogger','message','dirname','info','2239805opwCDu','setRawCommand','currentRawCommand','File','失败:\x20','setLogPath','winstonLogger','split','success','1211KoiEkl','filter','readLogs','logTask','log','getWinstonInstance','readFileSync'];a254_0x4b1d=function(){return _0x157e7e;};return a254_0x4b1d();}function a254_0x33f1(_0x3e88b9,_0x5157ae){_0x3e88b9=_0x3e88b9-0x1da;const _0x4b1dfc=a254_0x4b1d();let _0x33f19d=_0x4b1dfc[_0x3e88b9];return _0x33f19d;}const a254_0x340ec2=a254_0x33f1;(function(_0x1e5104,_0x336b4b){const _0x56e689=a254_0x33f1,_0x3ce1f3=_0x1e5104();while(!![]){try{const _0x490d91=parseInt(_0x56e689(0x1ec))/0x1*(-parseInt(_0x56e689(0x212))/0x2)+-parseInt(_0x56e689(0x1f5))/0x3+parseInt(_0x56e689(0x1f7))/0x4*(-parseInt(_0x56e689(0x1e3))/0x5)+parseInt(_0x56e689(0x214))/0x6+parseInt(_0x56e689(0x20d))/0x7+-parseInt(_0x56e689(0x1de))/0x8*(-parseInt(_0x56e689(0x210))/0x9)+-parseInt(_0x56e689(0x20f))/0xa*(-parseInt(_0x56e689(0x206))/0xb);if(_0x490d91===_0x336b4b)break;else _0x3ce1f3['push'](_0x3ce1f3['shift']());}catch(_0x2b4bf4){_0x3ce1f3['push'](_0x3ce1f3['shift']());}}}(a254_0x4b1d,0xde0d3));import a254_0x4d1d65 from'winston';import a254_0x34c6b1 from'node:fs';import a254_0x50019a from'node:path';class Logger{['winstonLogger'];[a254_0x340ec2(0x201)];[a254_0x340ec2(0x1e5)]='';constructor(){this['logFilePath']='';}[a254_0x340ec2(0x1e4)](_0x5a9d97){this['currentRawCommand']=_0x5a9d97;}[a254_0x340ec2(0x1fb)](){const _0x12ba17=a254_0x340ec2,_0x1267e3=a254_0x50019a[_0x12ba17(0x1e1)](this[_0x12ba17(0x201)]);!a254_0x34c6b1[_0x12ba17(0x204)](_0x1267e3)&&a254_0x34c6b1[_0x12ba17(0x1dc)](_0x1267e3,{'recursive':!![]});const _0x12c9b7=a254_0x4d1d65[_0x12ba17(0x213)]['combine'](a254_0x4d1d65['format'][_0x12ba17(0x1f3)](),a254_0x4d1d65['format'][_0x12ba17(0x20b)]({'stack':!![]}),a254_0x4d1d65[_0x12ba17(0x213)][_0x12ba17(0x205)](_0x8c7a3=>{const _0x4501ef=_0x12ba17,_0x5eeb90={'timestamp':_0x8c7a3['timestamp']||new Date()[_0x4501ef(0x1f6)](),'level':_0x8c7a3['level']||_0x4501ef(0x1e2),'command':_0x8c7a3['command']||_0x4501ef(0x1ff),'rawCommand':_0x8c7a3[_0x4501ef(0x1fd)]||this['currentRawCommand']||undefined,'message':_0x8c7a3[_0x4501ef(0x1e0)]||'','duration':_0x8c7a3[_0x4501ef(0x1dd)]||undefined,'details':_0x8c7a3[_0x4501ef(0x208)]||undefined};return JSON[_0x4501ef(0x1fc)](_0x5eeb90);}));this['winstonLogger']=a254_0x4d1d65[_0x12ba17(0x1df)]({'level':_0x12ba17(0x1e2),'format':_0x12c9b7,'transports':[new a254_0x4d1d65[(_0x12ba17(0x209))][(_0x12ba17(0x1e6))]({'filename':this[_0x12ba17(0x201)],'level':_0x12ba17(0x1e2)})],'silent':![]}),a254_0x4d1d65[_0x12ba17(0x202)]({'success':_0x12ba17(0x200),'error':_0x12ba17(0x207),'warn':_0x12ba17(0x20e),'info':'blue'});}[a254_0x340ec2(0x1e8)](_0x4764c2){const _0x244473=a254_0x340ec2;this['logFilePath']=a254_0x50019a[_0x244473(0x20a)](_0x4764c2,_0x244473(0x1f9)),this['winstonLogger']&&this[_0x244473(0x1e9)]['clear'](),this[_0x244473(0x1fb)]();}[a254_0x340ec2(0x1e2)](_0x43bc12,_0xc5be05,_0x4ae0e3){const _0x2cf233=a254_0x340ec2;if(!this[_0x2cf233(0x201)]||!this['winstonLogger'])return;this[_0x2cf233(0x1e9)][_0x2cf233(0x1e2)](_0xc5be05,{'command':_0x43bc12,'details':_0x4ae0e3});}[a254_0x340ec2(0x1eb)](_0x5f45fa,_0x5279a0,_0x58d3b8,_0x136d60){const _0x9b8c20=a254_0x340ec2;if(!this['logFilePath']||!this[_0x9b8c20(0x1e9)])return;this[_0x9b8c20(0x1e9)][_0x9b8c20(0x1f0)](_0x9b8c20(0x1e2),_0x5279a0,{'level':_0x9b8c20(0x1eb),'command':_0x5f45fa,'duration':_0x58d3b8,'details':_0x136d60});}['error'](_0x31c624,_0x30bb0b,_0x3e3e92){const _0x37d07b=a254_0x340ec2;if(!this[_0x37d07b(0x201)]||!this[_0x37d07b(0x1e9)])return;this[_0x37d07b(0x1e9)][_0x37d07b(0x1f4)](_0x30bb0b,{'command':_0x31c624,'details':_0x3e3e92});}[a254_0x340ec2(0x1f8)](_0x56777c,_0x59f0ed,_0xdcbe77){const _0x12a705=a254_0x340ec2;if(!this[_0x12a705(0x201)]||!this['winstonLogger'])return;this[_0x12a705(0x1e9)][_0x12a705(0x1f8)](_0x59f0ed,{'command':_0x56777c,'details':_0xdcbe77});}async[a254_0x340ec2(0x1ef)](_0x5d99c3,_0x2da47a,_0x16a7b9){const _0x1c95e7=a254_0x340ec2,_0x1b19f8=Date[_0x1c95e7(0x1db)]();this[_0x1c95e7(0x1e2)](_0x5d99c3,'开始执行:\x20'+_0x2da47a);try{const _0x53243b=await _0x16a7b9(),_0x3bbdfc=Date[_0x1c95e7(0x1db)]()-_0x1b19f8;return this[_0x1c95e7(0x1eb)](_0x5d99c3,_0x1c95e7(0x1fa)+_0x2da47a,_0x3bbdfc),_0x53243b;}catch(_0xbe20e7){const _0x5bcb00=Date[_0x1c95e7(0x1db)]()-_0x1b19f8;this[_0x1c95e7(0x1f4)](_0x5d99c3,_0x1c95e7(0x1e7)+_0x2da47a,{'error':_0xbe20e7 instanceof Error?_0xbe20e7[_0x1c95e7(0x1e0)]:String(_0xbe20e7),'duration':_0x5bcb00});throw _0xbe20e7;}}[a254_0x340ec2(0x1ee)](){const _0x5f1b1c=a254_0x340ec2;try{if(!a254_0x34c6b1[_0x5f1b1c(0x204)](this[_0x5f1b1c(0x201)]))return[];const _0x59e5c4=a254_0x34c6b1[_0x5f1b1c(0x1f2)](this['logFilePath'],_0x5f1b1c(0x211));return _0x59e5c4[_0x5f1b1c(0x1ea)]('\x0a')[_0x5f1b1c(0x1ed)](_0x135a52=>_0x135a52[_0x5f1b1c(0x1fe)]())['map'](_0x3c9144=>JSON[_0x5f1b1c(0x203)](_0x3c9144));}catch(_0x121a81){return console[_0x5f1b1c(0x1f8)]('Failed\x20to\x20read\x20logs:',_0x121a81),[];}}[a254_0x340ec2(0x1da)](){const _0x135b72=a254_0x340ec2;try{a254_0x34c6b1[_0x135b72(0x204)](this['logFilePath'])&&a254_0x34c6b1['writeFileSync'](this[_0x135b72(0x201)],'',_0x135b72(0x211));}catch(_0x55ae6a){console['warn'](_0x135b72(0x20c),_0x55ae6a);}}[a254_0x340ec2(0x1f1)](){const _0x5dd851=a254_0x340ec2;return this[_0x5dd851(0x1e9)];}}export const logger=new Logger();
1
+ const a254_0x4f094c=a254_0x557e;(function(_0x219da3,_0x523000){const _0x3406c5=a254_0x557e,_0x58434c=_0x219da3();while(!![]){try{const _0x293744=parseInt(_0x3406c5(0xc9))/0x1+-parseInt(_0x3406c5(0xce))/0x2+parseInt(_0x3406c5(0xb2))/0x3+parseInt(_0x3406c5(0xc6))/0x4*(-parseInt(_0x3406c5(0xb3))/0x5)+parseInt(_0x3406c5(0xe0))/0x6*(parseInt(_0x3406c5(0xe3))/0x7)+parseInt(_0x3406c5(0xd5))/0x8+parseInt(_0x3406c5(0xbc))/0x9*(-parseInt(_0x3406c5(0xb6))/0xa);if(_0x293744===_0x523000)break;else _0x58434c['push'](_0x58434c['shift']());}catch(_0x5a39d9){_0x58434c['push'](_0x58434c['shift']());}}}(a254_0x5f1c,0x63dca));import a254_0x4cc4e9 from'winston';function a254_0x5f1c(){const _0x503490=['mkdirSync','join','logTask','4qvskjd','utf8','red','602285aBXZEO','unknown','errors','完成:\x20','toISOString','1319846YijlLz','.lovrabet.log','transports','initWinstonLogger','失败:\x20','printf','writeFileSync','5789976MYqZvF','duration','now','createLogger','logFilePath','currentRawCommand','readLogs','split','blue','warn','clearLogs','6Vnwnpv','rawCommand','combine','3206882GFLNeO','setLogPath','Failed\x20to\x20clear\x20logs:','log','timestamp','trim','error','1973823RhvOLB','4085135SDCGWi','level','yellow','5561150eEmWjo','getWinstonInstance','addColors','readFileSync','format','existsSync','9qOpmZO','details','winstonLogger','info','stringify','parse','setRawCommand'];a254_0x5f1c=function(){return _0x503490;};return a254_0x5f1c();}import a254_0x22508a from'node:fs';import a254_0x5a0dcd from'node:path';function a254_0x557e(_0x577351,_0x2ccfac){_0x577351=_0x577351-0xae;const _0x5f1c36=a254_0x5f1c();let _0x557ec7=_0x5f1c36[_0x577351];return _0x557ec7;}class Logger{['winstonLogger'];[a254_0x4f094c(0xd9)];[a254_0x4f094c(0xda)]='';constructor(){this['logFilePath']='';}[a254_0x4f094c(0xc2)](_0x858cb0){const _0x22d45a=a254_0x4f094c;this[_0x22d45a(0xda)]=_0x858cb0;}[a254_0x4f094c(0xd1)](){const _0x2ae978=a254_0x4f094c,_0x3823c8=a254_0x5a0dcd['dirname'](this[_0x2ae978(0xd9)]);!a254_0x22508a[_0x2ae978(0xbb)](_0x3823c8)&&a254_0x22508a[_0x2ae978(0xc3)](_0x3823c8,{'recursive':!![]});const _0x4dd03c=a254_0x4cc4e9[_0x2ae978(0xba)][_0x2ae978(0xe2)](a254_0x4cc4e9[_0x2ae978(0xba)][_0x2ae978(0xaf)](),a254_0x4cc4e9[_0x2ae978(0xba)][_0x2ae978(0xcb)]({'stack':!![]}),a254_0x4cc4e9[_0x2ae978(0xba)][_0x2ae978(0xd3)](_0x2062d4=>{const _0x260940=_0x2ae978,_0x4bedb5={'timestamp':_0x2062d4['timestamp']||new Date()[_0x260940(0xcd)](),'level':_0x2062d4[_0x260940(0xb4)]||_0x260940(0xbf),'command':_0x2062d4['command']||_0x260940(0xca),'rawCommand':_0x2062d4[_0x260940(0xe1)]||this[_0x260940(0xda)]||undefined,'message':_0x2062d4['message']||'','duration':_0x2062d4[_0x260940(0xd6)]||undefined,'details':_0x2062d4[_0x260940(0xbd)]||undefined};return JSON[_0x260940(0xc0)](_0x4bedb5);}));this[_0x2ae978(0xbe)]=a254_0x4cc4e9[_0x2ae978(0xd8)]({'level':_0x2ae978(0xbf),'format':_0x4dd03c,'transports':[new a254_0x4cc4e9[(_0x2ae978(0xd0))]['File']({'filename':this[_0x2ae978(0xd9)],'level':_0x2ae978(0xbf)})],'silent':![]}),a254_0x4cc4e9[_0x2ae978(0xb8)]({'success':'green','error':_0x2ae978(0xc8),'warn':_0x2ae978(0xb5),'info':_0x2ae978(0xdd)});}[a254_0x4f094c(0xe4)](_0x3589ac){const _0x2b3fb7=a254_0x4f094c;this['logFilePath']=a254_0x5a0dcd[_0x2b3fb7(0xc4)](_0x3589ac,_0x2b3fb7(0xcf)),this[_0x2b3fb7(0xbe)]&&this['winstonLogger']['clear'](),this[_0x2b3fb7(0xd1)]();}['info'](_0xcf7461,_0x28fb5d,_0x37ad13){const _0x3139d4=a254_0x4f094c;if(!this[_0x3139d4(0xd9)]||!this[_0x3139d4(0xbe)])return;this['winstonLogger']['info'](_0x28fb5d,{'command':_0xcf7461,'details':_0x37ad13});}['success'](_0xd010d1,_0x1108c0,_0x39cb53,_0x52c830){const _0x16fbfb=a254_0x4f094c;if(!this['logFilePath']||!this['winstonLogger'])return;this['winstonLogger'][_0x16fbfb(0xae)]('info',_0x1108c0,{'level':'success','command':_0xd010d1,'duration':_0x39cb53,'details':_0x52c830});}[a254_0x4f094c(0xb1)](_0xed4955,_0x171b07,_0x3efe84){const _0x665cdb=a254_0x4f094c;if(!this[_0x665cdb(0xd9)]||!this['winstonLogger'])return;this['winstonLogger']['error'](_0x171b07,{'command':_0xed4955,'details':_0x3efe84});}['warn'](_0x3729ba,_0x2a3726,_0x35c46f){const _0xbfd84e=a254_0x4f094c;if(!this[_0xbfd84e(0xd9)]||!this[_0xbfd84e(0xbe)])return;this[_0xbfd84e(0xbe)][_0xbfd84e(0xde)](_0x2a3726,{'command':_0x3729ba,'details':_0x35c46f});}async[a254_0x4f094c(0xc5)](_0x3d0a78,_0x36b20a,_0x5d0f2f){const _0x2cf16b=a254_0x4f094c,_0x4fd1ca=Date[_0x2cf16b(0xd7)]();this['info'](_0x3d0a78,'开始执行:\x20'+_0x36b20a);try{const _0x58eba1=await _0x5d0f2f(),_0x41f4e5=Date[_0x2cf16b(0xd7)]()-_0x4fd1ca;return this['success'](_0x3d0a78,_0x2cf16b(0xcc)+_0x36b20a,_0x41f4e5),_0x58eba1;}catch(_0x29e57e){const _0x4f63d1=Date[_0x2cf16b(0xd7)]()-_0x4fd1ca;this[_0x2cf16b(0xb1)](_0x3d0a78,_0x2cf16b(0xd2)+_0x36b20a,{'error':_0x29e57e instanceof Error?_0x29e57e['message']:String(_0x29e57e),'duration':_0x4f63d1});throw _0x29e57e;}}[a254_0x4f094c(0xdb)](){const _0x4c14c3=a254_0x4f094c;try{if(!a254_0x22508a[_0x4c14c3(0xbb)](this[_0x4c14c3(0xd9)]))return[];const _0x3cc7c3=a254_0x22508a[_0x4c14c3(0xb9)](this['logFilePath'],'utf8');return _0x3cc7c3[_0x4c14c3(0xdc)]('\x0a')['filter'](_0x21d05b=>_0x21d05b[_0x4c14c3(0xb0)]())['map'](_0x21b6cb=>JSON[_0x4c14c3(0xc1)](_0x21b6cb));}catch(_0x3d988a){return console[_0x4c14c3(0xde)]('Failed\x20to\x20read\x20logs:',_0x3d988a),[];}}[a254_0x4f094c(0xdf)](){const _0x49523c=a254_0x4f094c;try{a254_0x22508a[_0x49523c(0xbb)](this[_0x49523c(0xd9)])&&a254_0x22508a[_0x49523c(0xd4)](this[_0x49523c(0xd9)],'',_0x49523c(0xc7));}catch(_0x5b7818){console[_0x49523c(0xde)](_0x49523c(0xe5),_0x5b7818);}}[a254_0x4f094c(0xb7)](){const _0x4dab76=a254_0x4f094c;return this[_0x4dab76(0xbe)];}}export const logger=new Logger();
@@ -1 +1 @@
1
- (function(_0x171589,_0x1d1046){const _0x533013=a255_0x5598,_0x1cd1b6=_0x171589();while(!![]){try{const _0x42ee22=-parseInt(_0x533013(0x142))/0x1+parseInt(_0x533013(0x13f))/0x2*(-parseInt(_0x533013(0x143))/0x3)+-parseInt(_0x533013(0x144))/0x4+-parseInt(_0x533013(0x141))/0x5*(-parseInt(_0x533013(0x14c))/0x6)+-parseInt(_0x533013(0x147))/0x7+-parseInt(_0x533013(0x140))/0x8+-parseInt(_0x533013(0x149))/0x9*(-parseInt(_0x533013(0x146))/0xa);if(_0x42ee22===_0x1d1046)break;else _0x1cd1b6['push'](_0x1cd1b6['shift']());}catch(_0x3a40fb){_0x1cd1b6['push'](_0x1cd1b6['shift']());}}}(a255_0x157b,0xa8e0f));import{CliErrors}from'../errors.js';function a255_0x5598(_0x27bc5e,_0x4e8c89){_0x27bc5e=_0x27bc5e-0x13f;const _0x157b32=a255_0x157b();let _0x559833=_0x157b32[_0x27bc5e];return _0x559833;}function a255_0x157b(){const _0x9fcc7f=['7596897jEZHyb','isArray','45pzymqB','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','parse','6jZOxIo','Invalid\x20JSON\x20for\x20--params:\x20','--params\x20must\x20be\x20a\x20JSON\x20object','validation','14MVaKig','6176184AGDDtJ','2961215NXeLAd','830548ITKObQ','198801umDMPI','1241600sInMNJ','object','7123190CSgOWO'];a255_0x157b=function(){return _0x9fcc7f;};return a255_0x157b();}export function parseJsonParams(_0x3f9d69){const _0x51c025=a255_0x5598;if(!_0x3f9d69)return undefined;let _0x204c90;try{_0x204c90=JSON[_0x51c025(0x14b)](_0x3f9d69);}catch{throw CliErrors[_0x51c025(0x14f)](_0x51c025(0x14d)+_0x3f9d69);}if(!_0x204c90||typeof _0x204c90!==_0x51c025(0x145)||Array[_0x51c025(0x148)](_0x204c90))throw CliErrors[_0x51c025(0x14f)](_0x51c025(0x14e),_0x51c025(0x14a));return _0x204c90;}
1
+ function a255_0x17f4(){const _0x56abac=['21612SNvvne','1162110vaZrdL','parse','--params\x20must\x20be\x20a\x20JSON\x20object','2IgdWOO','873553AUeZtW','isArray','4865176avGPIJ','validation','7318460QyvrCa','406125KAFYbV','3733384OSFhqL','279TqbxTt','object','1995NsQmqr','Invalid\x20JSON\x20for\x20--params:\x20'];a255_0x17f4=function(){return _0x56abac;};return a255_0x17f4();}(function(_0x41ce0d,_0x162356){const _0x3e44b2=a255_0x200b,_0x4d5d89=_0x41ce0d();while(!![]){try{const _0x2c937c=parseInt(_0x3e44b2(0xa2))/0x1*(-parseInt(_0x3e44b2(0xa1))/0x2)+parseInt(_0x3e44b2(0xa7))/0x3+-parseInt(_0x3e44b2(0xa4))/0x4+-parseInt(_0x3e44b2(0xa6))/0x5+-parseInt(_0x3e44b2(0xad))/0x6*(-parseInt(_0x3e44b2(0xab))/0x7)+-parseInt(_0x3e44b2(0xa8))/0x8+parseInt(_0x3e44b2(0xa9))/0x9*(parseInt(_0x3e44b2(0xae))/0xa);if(_0x2c937c===_0x162356)break;else _0x4d5d89['push'](_0x4d5d89['shift']());}catch(_0x835684){_0x4d5d89['push'](_0x4d5d89['shift']());}}}(a255_0x17f4,0xb5b52));function a255_0x200b(_0x2a9515,_0x382b10){_0x2a9515=_0x2a9515-0xa0;const _0x17f444=a255_0x17f4();let _0x200b35=_0x17f444[_0x2a9515];return _0x200b35;}import{CliErrors}from'../errors.js';export function parseJsonParams(_0xa71005){const _0x538dd5=a255_0x200b;if(!_0xa71005)return undefined;let _0x4482df;try{_0x4482df=JSON[_0x538dd5(0xaf)](_0xa71005);}catch{throw CliErrors[_0x538dd5(0xa5)](_0x538dd5(0xac)+_0xa71005);}if(!_0x4482df||typeof _0x4482df!==_0x538dd5(0xaa)||Array[_0x538dd5(0xa3)](_0x4482df))throw CliErrors[_0x538dd5(0xa5)](_0x538dd5(0xa0),'Example:\x20--params\x20\x27{\x22id\x22:123}\x27');return _0x4482df;}
@@ -1 +1 @@
1
- const a256_0x178b99=a256_0x29ad;(function(_0x57f7b7,_0x18b0fa){const _0x283340=a256_0x29ad,_0x4252aa=_0x57f7b7();while(!![]){try{const _0x118886=parseInt(_0x283340(0x110))/0x1+parseInt(_0x283340(0x115))/0x2*(parseInt(_0x283340(0x116))/0x3)+parseInt(_0x283340(0x114))/0x4+-parseInt(_0x283340(0x111))/0x5+parseInt(_0x283340(0x117))/0x6*(-parseInt(_0x283340(0x10e))/0x7)+-parseInt(_0x283340(0x10d))/0x8+parseInt(_0x283340(0x10f))/0x9;if(_0x118886===_0x18b0fa)break;else _0x4252aa['push'](_0x4252aa['shift']());}catch(_0x5e8f1d){_0x4252aa['push'](_0x4252aa['shift']());}}}(a256_0x38bd,0x1f4fe));export const isWindows=process[a256_0x178b99(0x112)]===a256_0x178b99(0x113);export function resolveNpmBin(_0x3bd0c2){return isWindows?_0x3bd0c2+'.cmd':_0x3bd0c2;}function a256_0x29ad(_0x28afb0,_0x545463){_0x28afb0=_0x28afb0-0x10d;const _0x38bd2c=a256_0x38bd();let _0x29ad6f=_0x38bd2c[_0x28afb0];return _0x29ad6f;}function a256_0x38bd(){const _0x558e1d=['platform','win32','790768RBEyhf','2UuPglT','110793sPiKgo','598566EnPvXc','1486144EIuiwA','14LrBumk','1012446UGQrmW','193809eGjJgM','136910IbfqQd'];a256_0x38bd=function(){return _0x558e1d;};return a256_0x38bd();}
1
+ function a256_0x4cb1(_0x44b341,_0xa324ba){_0x44b341=_0x44b341-0x1ba;const _0x19d64b=a256_0x19d6();let _0x4cb165=_0x19d64b[_0x44b341];return _0x4cb165;}function a256_0x19d6(){const _0x22f5fe=['4409778qZmspO','win32','platform','1655410TJTGdz','2389215AYVVCq','840nwqOLt','22184ltHThy','.cmd','84dKlCkZ','3926216kWPXyR','44SFTjnE','44mxhpvP','20205vPETrU','32532ZUzbgG'];a256_0x19d6=function(){return _0x22f5fe;};return a256_0x19d6();}const a256_0x56874e=a256_0x4cb1;(function(_0x840e8d,_0x316d71){const _0x495f5b=a256_0x4cb1,_0x1b3a83=_0x840e8d();while(!![]){try{const _0x232b0d=-parseInt(_0x495f5b(0x1c6))/0x1*(-parseInt(_0x495f5b(0x1bd))/0x2)+parseInt(_0x495f5b(0x1ba))/0x3*(-parseInt(_0x495f5b(0x1bf))/0x4)+-parseInt(_0x495f5b(0x1c4))/0x5+parseInt(_0x495f5b(0x1c0))/0x6+-parseInt(_0x495f5b(0x1bb))/0x7+parseInt(_0x495f5b(0x1c5))/0x8*(-parseInt(_0x495f5b(0x1be))/0x9)+-parseInt(_0x495f5b(0x1c3))/0xa*(-parseInt(_0x495f5b(0x1bc))/0xb);if(_0x232b0d===_0x316d71)break;else _0x1b3a83['push'](_0x1b3a83['shift']());}catch(_0x25aab1){_0x1b3a83['push'](_0x1b3a83['shift']());}}}(a256_0x19d6,0x5d813));export const isWindows=process[a256_0x56874e(0x1c2)]===a256_0x56874e(0x1c1);export function resolveNpmBin(_0xbb8704){const _0x26745d=a256_0x56874e;return isWindows?_0xbb8704+_0x26745d(0x1c7):_0xbb8704;}
@@ -1 +1 @@
1
- (function(_0x2e883d,_0x40276e){const _0x45e1f9=a257_0x5262,_0x14d313=_0x2e883d();while(!![]){try{const _0x494556=-parseInt(_0x45e1f9(0x158))/0x1+-parseInt(_0x45e1f9(0x159))/0x2+parseInt(_0x45e1f9(0x15a))/0x3+parseInt(_0x45e1f9(0x154))/0x4+-parseInt(_0x45e1f9(0x152))/0x5*(-parseInt(_0x45e1f9(0x160))/0x6)+-parseInt(_0x45e1f9(0x151))/0x7+-parseInt(_0x45e1f9(0x164))/0x8*(-parseInt(_0x45e1f9(0x15d))/0x9);if(_0x494556===_0x40276e)break;else _0x14d313['push'](_0x14d313['shift']());}catch(_0x177404){_0x14d313['push'](_0x14d313['shift']());}}}(a257_0x4f2c,0x1da21));import{existsSync,mkdirSync,readFileSync,writeFileSync}from'node:fs';function a257_0x4f2c(){const _0x16dbbc=['454020VOFoEE','lovrabet_rules.mdc','json','2371401JqURIu','utf-8','content','345810caOVZk','application/json','本地模板文件不存在:\x20','statusText','8LimkzV','catch','1286418UOeUZY','5muZtuZ','CDN\x20返回数据格式错误','425504DwWCsD','lastUpdated','string','agents.md','207276kgyJil','132826itscZJ'];a257_0x4f2c=function(){return _0x16dbbc;};return a257_0x4f2c();}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 _0x2467bb=getTemplateBaseUrl();return _0x2467bb+'/rules/rules.json';}const LOCAL_TEMPLATE_PATH=resolve(__dirname,'../../templates/rules/lovrabet_rules.mdc.tpl');export async function fetchRulesFromCDN(){const _0x589ed2=a257_0x5262,_0x5d6bb2=getRulesCdnUrl(),_0x2ab662=await fetch(_0x5d6bb2,{'headers':{'Accept':_0x589ed2(0x161)}});if(!_0x2ab662['ok'])throw new Error('CDN\x20请求失败:\x20'+_0x2ab662['status']+'\x20'+_0x2ab662[_0x589ed2(0x163)]);const _0xc455ff=await _0x2ab662[_0x589ed2(0x15c)]();if(!_0xc455ff['content']||typeof _0xc455ff[_0x589ed2(0x15f)]!==_0x589ed2(0x156))throw new Error(_0x589ed2(0x153));return _0xc455ff;}export async function getRulesContent(){const _0x476285=a257_0x5262;try{const _0x32d18a=await fetchRulesFromCDN();return _0x32d18a[_0x476285(0x15f)];}catch{return readLocalTemplate();}}export function readLocalTemplate(){const _0x68f16b=a257_0x5262;if(existsSync(LOCAL_TEMPLATE_PATH))return readFileSync(LOCAL_TEMPLATE_PATH,_0x68f16b(0x15e));throw new Error(_0x68f16b(0x162)+LOCAL_TEMPLATE_PATH);}export async function writeRulesFile(_0xdc977c){const _0x3be82b=a257_0x5262,_0x597a95=await fetchRulesFromCDN()[_0x3be82b(0x150)](()=>null);let _0x5375fe;_0x597a95?(_0x5375fe=_0x597a95[_0x3be82b(0x15f)],_0x597a95['lastUpdated']&&(_0x5375fe=appendUpdateTime(_0x5375fe,_0x597a95[_0x3be82b(0x155)]))):_0x5375fe=readLocalTemplate();const _0x5055ae=dirname(_0xdc977c);!existsSync(_0x5055ae)&&mkdirSync(_0x5055ae,{'recursive':!![]}),writeFileSync(_0xdc977c,_0x5375fe,_0x3be82b(0x15e));}export async function copyRulesToCursor(_0x2ace0b){const _0x46ee5c=a257_0x5262,_0x55ef4c=join(_0x2ace0b,'.cursor/rules'),_0x11bcfc=join(_0x55ef4c,_0x46ee5c(0x15b));if(existsSync(_0x11bcfc))return![];return await writeRulesFile(_0x11bcfc),!![];}function a257_0x5262(_0x291520,_0x1ce60c){_0x291520=_0x291520-0x150;const _0x4f2c39=a257_0x4f2c();let _0x5262f3=_0x4f2c39[_0x291520];return _0x5262f3;}export async function copyRulesToAgentsMd(_0x413643){const _0xbca35c=a257_0x5262,_0x2afc1b=join(_0x413643,_0xbca35c(0x157));if(existsSync(_0x2afc1b))return![];return await writeRulesFile(_0x2afc1b),!![];}
1
+ const a257_0x1bc657=a257_0x3948;(function(_0x284782,_0x53d945){const _0x405013=a257_0x3948,_0x3a0add=_0x284782();while(!![]){try{const _0x4a8aed=-parseInt(_0x405013(0x192))/0x1*(parseInt(_0x405013(0x18c))/0x2)+-parseInt(_0x405013(0x19a))/0x3+-parseInt(_0x405013(0x199))/0x4+parseInt(_0x405013(0x19d))/0x5*(parseInt(_0x405013(0x196))/0x6)+parseInt(_0x405013(0x1a1))/0x7*(-parseInt(_0x405013(0x18d))/0x8)+-parseInt(_0x405013(0x191))/0x9*(parseInt(_0x405013(0x19b))/0xa)+parseInt(_0x405013(0x193))/0xb;if(_0x4a8aed===_0x53d945)break;else _0x3a0add['push'](_0x3a0add['shift']());}catch(_0x4099d2){_0x3a0add['push'](_0x3a0add['shift']());}}}(a257_0x3c2c,0x493a0));import{existsSync,mkdirSync,readFileSync,writeFileSync}from'node:fs';import{dirname,join,resolve}from'node:path';import{fileURLToPath}from'node:url';import{getTemplateBaseUrl}from'../utils/config.js';import{appendUpdateTime}from'../utils/guides-cdn.js';function a257_0x3948(_0x56ebd3,_0x3766cb){_0x56ebd3=_0x56ebd3-0x18b;const _0x3c2cea=a257_0x3c2c();let _0x39489f=_0x3c2cea[_0x56ebd3];return _0x39489f;}const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function getRulesCdnUrl(){const _0x360e2f=getTemplateBaseUrl();return _0x360e2f+'/rules/rules.json';}const LOCAL_TEMPLATE_PATH=resolve(__dirname,a257_0x1bc657(0x198));export async function fetchRulesFromCDN(){const _0x398507=a257_0x1bc657,_0x516e14=getRulesCdnUrl(),_0x27cc32=await fetch(_0x516e14,{'headers':{'Accept':'application/json'}});if(!_0x27cc32['ok'])throw new Error(_0x398507(0x1a0)+_0x27cc32[_0x398507(0x18b)]+'\x20'+_0x27cc32[_0x398507(0x19f)]);const _0x244781=await _0x27cc32[_0x398507(0x194)]();if(!_0x244781[_0x398507(0x190)]||typeof _0x244781['content']!==_0x398507(0x18f))throw new Error(_0x398507(0x195));return _0x244781;}export async function getRulesContent(){const _0x89809c=a257_0x1bc657;try{const _0x251f80=await fetchRulesFromCDN();return _0x251f80[_0x89809c(0x190)];}catch{return readLocalTemplate();}}export function readLocalTemplate(){const _0x367392=a257_0x1bc657;if(existsSync(LOCAL_TEMPLATE_PATH))return readFileSync(LOCAL_TEMPLATE_PATH,_0x367392(0x18e));throw new Error('本地模板文件不存在:\x20'+LOCAL_TEMPLATE_PATH);}export async function writeRulesFile(_0x3959c4){const _0x4b5ce3=a257_0x1bc657,_0x3e6cb3=await fetchRulesFromCDN()['catch'](()=>null);let _0xa26720;_0x3e6cb3?(_0xa26720=_0x3e6cb3[_0x4b5ce3(0x190)],_0x3e6cb3['lastUpdated']&&(_0xa26720=appendUpdateTime(_0xa26720,_0x3e6cb3[_0x4b5ce3(0x19c)]))):_0xa26720=readLocalTemplate();const _0x4a7887=dirname(_0x3959c4);!existsSync(_0x4a7887)&&mkdirSync(_0x4a7887,{'recursive':!![]}),writeFileSync(_0x3959c4,_0xa26720,'utf-8');}function a257_0x3c2c(){const _0x3fa7aa=['status','94XzhLUr','7640tVGtXz','utf-8','string','content','1107ucAtIA','7382jaxOdN','15381201xrVZlt','json','CDN\x20返回数据格式错误','6xAYWWG','.cursor/rules','../../templates/rules/lovrabet_rules.mdc.tpl','1182744WKzmlU','466332egUHtM','45230fiyiBk','lastUpdated','1294615VvrIbt','agents.md','statusText','CDN\x20请求失败:\x20','21feVlmb'];a257_0x3c2c=function(){return _0x3fa7aa;};return a257_0x3c2c();}export async function copyRulesToCursor(_0x489efc){const _0x33c1b4=a257_0x1bc657,_0x320958=join(_0x489efc,_0x33c1b4(0x197)),_0x2698dd=join(_0x320958,'lovrabet_rules.mdc');if(existsSync(_0x2698dd))return![];return await writeRulesFile(_0x2698dd),!![];}export async function copyRulesToAgentsMd(_0x3cfd63){const _0x8066d2=a257_0x1bc657,_0x300d2b=join(_0x3cfd63,_0x8066d2(0x19e));if(existsSync(_0x300d2b))return![];return await writeRulesFile(_0x300d2b),!![];}
@@ -1 +1 @@
1
- export function sleep(_0x2cd6f7){return new Promise(_0x35619c=>setTimeout(_0x35619c,_0x2cd6f7));}
1
+ export function sleep(_0x536f22){return new Promise(_0x441ec3=>setTimeout(_0x441ec3,_0x536f22));}
@@ -1 +1 @@
1
- const a259_0x29f1ab=a259_0x2fad;function a259_0x50f9(){const _0x1b01b9=['endsWith','.js','now','tableName','\x0a\x20\x20\x20\x20{\x20','getFullYear','success','replaceContent','isDirectory','9ZRflkK','toUpperCase','slice','processFile','getSeconds','getDate','LOVRABET','replace','开始处理模板内容替换','.scss','\x20},','tableName:\x20\x22','message','extname','getMinutes','10674AkzrJs','padStart','replaceApiContent','map','374910UTPDlC','1517060qBHpgG','name','api','isFile','charAt','template','split','promises','writeFile','copyFile','formatLocalTimestamp','6YNqHjJ','default','getMonth','toDisplayTitle','info','datasetCode:\x20\x22','error','processDirectory','utf8','.ts','.tsx','754520GTkPeH','mkdir','datasetCode','pad','toComponentName','.css','.json','alias','.tpl','getHours','3232744hXZPJa','100380mMFSrM','1109899ZgJPSb','toISOString','alias:\x20\x22','name:\x20\x22','processTemplate','toLowerCase','模板内容替换失败','join'];a259_0x50f9=function(){return _0x1b01b9;};return a259_0x50f9();}(function(_0x1f3b27,_0x44cd7e){const _0x38b444=a259_0x2fad,_0x3c3837=_0x1f3b27();while(!![]){try{const _0x1a3013=parseInt(_0x38b444(0x110))/0x1+parseInt(_0x38b444(0x135))/0x2+-parseInt(_0x38b444(0x131))/0x3+-parseInt(_0x38b444(0x105))/0x4+-parseInt(_0x38b444(0x136))/0x5*(-parseInt(_0x38b444(0xfa))/0x6)+parseInt(_0x38b444(0x111))/0x7+-parseInt(_0x38b444(0x10f))/0x8*(parseInt(_0x38b444(0x122))/0x9);if(_0x1a3013===_0x44cd7e)break;else _0x3c3837['push'](_0x3c3837['shift']());}catch(_0x4b6381){_0x3c3837['push'](_0x3c3837['shift']());}}}(a259_0x50f9,0x257b3));import a259_0x30c82a from'node:fs';import a259_0x5a5ac1 from'node:path';import{logger}from'../utils/logger.js';function a259_0x2fad(_0x16386a,_0x287b9c){_0x16386a=_0x16386a-0xf4;const _0x50f91b=a259_0x50f9();let _0x2fadf6=_0x50f91b[_0x16386a];return _0x2fadf6;}import{getCliVersion}from'../utils/version.js';const CLI_VERSION=getCliVersion();export class TemplateReplacer{static[a259_0x29f1ab(0x108)](_0x300558){const _0x191e98=a259_0x29f1ab;return String(_0x300558)[_0x191e98(0x132)](0x2,'0');}static[a259_0x29f1ab(0xf9)](_0x25efbf){const _0x196308=a259_0x29f1ab,_0x262939=_0x25efbf[_0x196308(0x11e)](),_0x3ec98d=this[_0x196308(0x108)](_0x25efbf[_0x196308(0xfc)]()+0x1),_0x38fc3a=this[_0x196308(0x108)](_0x25efbf[_0x196308(0x127)]()),_0x5e44ea=this[_0x196308(0x108)](_0x25efbf[_0x196308(0x10e)]()),_0x230d1e=this[_0x196308(0x108)](_0x25efbf[_0x196308(0x130)]()),_0x2f15b9=this[_0x196308(0x108)](_0x25efbf[_0x196308(0x126)]());return{'createdAt':_0x262939+'-'+_0x3ec98d+'-'+_0x38fc3a+'\x20'+_0x5e44ea+':'+_0x230d1e+':'+_0x2f15b9,'createdDate':_0x262939+'-'+_0x3ec98d+'-'+_0x38fc3a,'createdTime':_0x5e44ea+':'+_0x230d1e+':'+_0x2f15b9};}static[a259_0x29f1ab(0x109)](_0x3b3183){const _0x3a4e75=a259_0x29f1ab,_0x17fb2e=_0x3b3183[_0x3a4e75(0xf5)]('/')['pop']()||_0x3b3183;return _0x17fb2e['split']('-')[_0x3a4e75(0x134)](_0x35c51d=>_0x35c51d[_0x3a4e75(0x13a)](0x0)[_0x3a4e75(0x123)]()+_0x35c51d['slice'](0x1)[_0x3a4e75(0x116)]())[_0x3a4e75(0x118)]('');}static['toDisplayTitle'](_0x5df19e){const _0x5adece=a259_0x29f1ab,_0x461067=_0x5df19e[_0x5adece(0xf5)]('/')['pop']()||_0x5df19e;return _0x461067[_0x5adece(0xf5)]('-')[_0x5adece(0x134)](_0x5f00e1=>_0x5f00e1[_0x5adece(0x13a)](0x0)[_0x5adece(0x123)]()+_0x5f00e1[_0x5adece(0x124)](0x1)['toLowerCase']())['join']('\x20');}static[a259_0x29f1ab(0x120)](_0x23253a,_0x5bac4f,_0x571953){const _0x28b958=a259_0x29f1ab,_0x8f67a5=this[_0x28b958(0x109)](_0x5bac4f),_0x35a878=this[_0x28b958(0xfd)](_0x5bac4f),{createdAt:_0x1f683b,createdDate:_0x199de2,createdTime:_0x54a104}=this[_0x28b958(0xf9)](new Date());let _0x33807e=_0x23253a[_0x28b958(0x129)](/\{CliVersion\}/g,CLI_VERSION)[_0x28b958(0x129)](/\{ComponentName\}/g,_0x8f67a5)[_0x28b958(0x129)](/\{DisplayTitle\}/g,_0x35a878)[_0x28b958(0x129)](/\{PageName\}/g,_0x5bac4f)[_0x28b958(0x129)](/\{TemplateName\}/g,_0x571953)[_0x28b958(0x129)](/\{CreatedAt\}/g,_0x1f683b)[_0x28b958(0x129)](/\{CreatedDate\}/g,_0x199de2)[_0x28b958(0x129)](/\{CreatedTime\}/g,_0x54a104);return _0x33807e;}static[a259_0x29f1ab(0x133)](_0x3435a4,_0x414b8c,_0x1374c7,_0x50e0f9,_0x40695e,_0x4d421d,_0x331e8e,_0x492c4e){const _0x3e5d3e=a259_0x29f1ab,_0x490a98=new Date(),_0x46bbf2=_0x490a98[_0x3e5d3e(0x112)](),_0x1a7663=_0x1374c7[_0x3e5d3e(0x134)](_0x414561=>{const _0x26462f=_0x3e5d3e,_0x57e9a8=[_0x26462f(0xff)+_0x414561[_0x26462f(0x107)]+'\x22',_0x26462f(0x12d)+_0x414561[_0x26462f(0x11c)]+'\x22',_0x26462f(0x114)+_0x414561['name']+'\x22'];return _0x414561[_0x26462f(0x10c)]&&_0x57e9a8['push'](_0x26462f(0x113)+_0x414561[_0x26462f(0x10c)]+'\x22'),_0x26462f(0x11d)+_0x57e9a8['join'](',\x20')+_0x26462f(0x12c);})[_0x3e5d3e(0x118)](''),_0x36ace3=_0x50e0f9||_0x1374c7[0x0]?.[_0x3e5d3e(0x10c)]||'YourModel';let _0x157830=_0x3435a4[_0x3e5d3e(0x129)](/\{AppCode\}/g,_0x414b8c)[_0x3e5d3e(0x129)](/\{ModelConfigs\}/g,_0x1a7663)[_0x3e5d3e(0x129)](/\{ExampleModelName\}/g,_0x36ace3)[_0x3e5d3e(0x129)](/\{ApiFileName\}/g,_0x40695e||_0x3e5d3e(0x138))[_0x3e5d3e(0x129)](/\{ConfigName\}/g,_0x4d421d||_0x3e5d3e(0xfb))['replace'](/\{ClientConfigParam\}/g,_0x331e8e||'')[_0x3e5d3e(0x129)](/\{VarPrefix\}/g,_0x492c4e||_0x3e5d3e(0x128))['replace'](/\{CreatedAt\}/g,_0x46bbf2);return _0x157830;}static async[a259_0x29f1ab(0x115)](_0x27c366,_0x3425e2,_0x2129c9,_0xdd212b,_0xfdaeb9=!![]){const _0x2db578=a259_0x29f1ab,_0x5912da=Date[_0x2db578(0x11b)]();try{_0xfdaeb9&&logger[_0x2db578(0xfe)](_0x2db578(0xf4),_0x2db578(0x12a),{'templatePath':_0x27c366,'targetPath':_0x3425e2,'pageName':_0x2129c9,'templateName':_0xdd212b});await a259_0x30c82a[_0x2db578(0xf6)]['mkdir'](_0x3425e2,{'recursive':!![]}),await this['processDirectory'](_0x27c366,_0x3425e2,_0x2129c9,_0xdd212b);if(_0xfdaeb9){const _0x3782bf=Date[_0x2db578(0x11b)]()-_0x5912da;logger[_0x2db578(0x11f)]('template','模板内容替换完成',_0x3782bf,{'pageName':_0x2129c9,'templateName':_0xdd212b});}}catch(_0x1fecf9){if(_0xfdaeb9){const _0x5cc86b=Date['now']()-_0x5912da;logger[_0x2db578(0x100)](_0x2db578(0xf4),_0x2db578(0x117),{'templatePath':_0x27c366,'targetPath':_0x3425e2,'pageName':_0x2129c9,'templateName':_0xdd212b,'error':_0x1fecf9 instanceof Error?_0x1fecf9[_0x2db578(0x12e)]:String(_0x1fecf9),'duration':_0x5cc86b});}throw _0x1fecf9;}}static async[a259_0x29f1ab(0x101)](_0x7ba6f2,_0x146f92,_0x2dafed,_0x23b7bc){const _0x1cab67=a259_0x29f1ab,_0x11427b=await a259_0x30c82a[_0x1cab67(0xf6)]['readdir'](_0x7ba6f2,{'withFileTypes':!![]});for(const _0xb8f513 of _0x11427b){const _0x5d2c29=a259_0x5a5ac1['join'](_0x7ba6f2,_0xb8f513[_0x1cab67(0x137)]);let _0x1e5efe=a259_0x5a5ac1['join'](_0x146f92,_0xb8f513['name']);_0xb8f513[_0x1cab67(0x137)][_0x1cab67(0x119)]('.tpl')&&(_0x1e5efe=a259_0x5a5ac1['join'](_0x146f92,_0xb8f513[_0x1cab67(0x137)]['replace'](/\.tpl$/,'')));if(_0xb8f513[_0x1cab67(0x121)]())await a259_0x30c82a[_0x1cab67(0xf6)][_0x1cab67(0x106)](_0x1e5efe,{'recursive':!![]}),await this[_0x1cab67(0x101)](_0x5d2c29,_0x1e5efe,_0x2dafed,_0x23b7bc);else _0xb8f513[_0x1cab67(0x139)]()&&await this[_0x1cab67(0x125)](_0x5d2c29,_0x1e5efe,_0x2dafed,_0x23b7bc);}}static async[a259_0x29f1ab(0x125)](_0x288d23,_0x52aabe,_0x101583,_0x8256c){const _0x338d2f=a259_0x29f1ab,_0x804451=a259_0x5a5ac1[_0x338d2f(0x12f)](_0x288d23)[_0x338d2f(0x116)]();_0x288d23[_0x338d2f(0x119)](_0x338d2f(0x10d))&&(_0x52aabe=_0x52aabe['replace'](/\.tpl$/,''));const _0x18b02c=[_0x338d2f(0x104),_0x338d2f(0x103),'.jsx',_0x338d2f(0x11a),_0x338d2f(0x10b),'.md',_0x338d2f(0x10a),_0x338d2f(0x12b),'.tpl'];if(_0x18b02c['includes'](_0x804451)||_0x288d23['endsWith'](_0x338d2f(0x10d))){const _0x28fbe4=await a259_0x30c82a['promises']['readFile'](_0x288d23,_0x338d2f(0x102)),_0x53fa5e=this[_0x338d2f(0x120)](_0x28fbe4,_0x101583,_0x8256c);await a259_0x30c82a['promises'][_0x338d2f(0xf7)](_0x52aabe,_0x53fa5e,_0x338d2f(0x102));}else await a259_0x30c82a[_0x338d2f(0xf6)][_0x338d2f(0xf8)](_0x288d23,_0x52aabe);}}
1
+ const a259_0x45a8d4=a259_0x344e;(function(_0x5bf133,_0x4a97dd){const _0x46f798=a259_0x344e,_0x4d4e47=_0x5bf133();while(!![]){try{const _0x504ddf=-parseInt(_0x46f798(0x214))/0x1*(parseInt(_0x46f798(0x1f6))/0x2)+-parseInt(_0x46f798(0x1f1))/0x3*(parseInt(_0x46f798(0x206))/0x4)+parseInt(_0x46f798(0x225))/0x5*(-parseInt(_0x46f798(0x202))/0x6)+-parseInt(_0x46f798(0x20c))/0x7+-parseInt(_0x46f798(0x1e8))/0x8*(parseInt(_0x46f798(0x20b))/0x9)+-parseInt(_0x46f798(0x20e))/0xa*(parseInt(_0x46f798(0x1f9))/0xb)+-parseInt(_0x46f798(0x1f5))/0xc*(-parseInt(_0x46f798(0x223))/0xd);if(_0x504ddf===_0x4a97dd)break;else _0x4d4e47['push'](_0x4d4e47['shift']());}catch(_0x2d4754){_0x4d4e47['push'](_0x4d4e47['shift']());}}}(a259_0x620b,0xea0cf));import a259_0x3bce7d from'node:fs';import a259_0x43ed8f from'node:path';import{logger}from'../utils/logger.js';function a259_0x344e(_0x3a3577,_0x26917f){_0x3a3577=_0x3a3577-0x1e0;const _0x620bfc=a259_0x620b();let _0x344e19=_0x620bfc[_0x3a3577];return _0x344e19;}import{getCliVersion}from'../utils/version.js';function a259_0x620b(){const _0x1b5e5d=['datasetCode:\x20\x22','processFile','toDisplayTitle','info','pop','processTemplate','getMonth','开始处理模板内容替换','258IeFHrc','tableName:\x20\x22','name','toUpperCase','1058968wmQHqK','now','endsWith','replaceContent','toComponentName','7209FjbnzB','11980269FAkzhi','slice','20vUCjOm','map','.ts','.css','.json','formatLocalTimestamp','3nxmvPP','push','split','\x20},','LOVRABET','toLowerCase','模板内容替换失败','tableName','replaceApiContent','replace','template','readFile','getHours','utf8','getDate','13zHxaOW','success','142655IHSkAF','promises','getMinutes','toISOString','isDirectory','api','mkdir','\x0a\x20\x20\x20\x20{\x20','alias','padStart','.tpl','.scss','pad','11488adStyO','.jsx','模板内容替换完成','name:\x20\x22','join','datasetCode','charAt','default','YourModel','15UxhrfC','extname','includes','getSeconds','103624044pNqhfg','814288ceqcqb','copyFile','processDirectory','5736434IaOPQU'];a259_0x620b=function(){return _0x1b5e5d;};return a259_0x620b();}const CLI_VERSION=getCliVersion();export class TemplateReplacer{static['pad'](_0x4e1ba9){const _0xb53bd5=a259_0x344e;return String(_0x4e1ba9)[_0xb53bd5(0x1e4)](0x2,'0');}static[a259_0x45a8d4(0x213)](_0x20e2dd){const _0x56a8d7=a259_0x45a8d4,_0x2aeb3f=_0x20e2dd['getFullYear'](),_0x11064f=this[_0x56a8d7(0x1e7)](_0x20e2dd[_0x56a8d7(0x200)]()+0x1),_0x519e25=this[_0x56a8d7(0x1e7)](_0x20e2dd[_0x56a8d7(0x222)]()),_0x48604d=this[_0x56a8d7(0x1e7)](_0x20e2dd[_0x56a8d7(0x220)]()),_0x317610=this[_0x56a8d7(0x1e7)](_0x20e2dd[_0x56a8d7(0x227)]()),_0x8db060=this[_0x56a8d7(0x1e7)](_0x20e2dd[_0x56a8d7(0x1f4)]());return{'createdAt':_0x2aeb3f+'-'+_0x11064f+'-'+_0x519e25+'\x20'+_0x48604d+':'+_0x317610+':'+_0x8db060,'createdDate':_0x2aeb3f+'-'+_0x11064f+'-'+_0x519e25,'createdTime':_0x48604d+':'+_0x317610+':'+_0x8db060};}static[a259_0x45a8d4(0x20a)](_0x95be5){const _0x148f90=a259_0x45a8d4,_0x277b4e=_0x95be5['split']('/')['pop']()||_0x95be5;return _0x277b4e[_0x148f90(0x216)]('-')[_0x148f90(0x20f)](_0xe0c090=>_0xe0c090[_0x148f90(0x1ee)](0x0)['toUpperCase']()+_0xe0c090[_0x148f90(0x20d)](0x1)['toLowerCase']())['join']('');}static['toDisplayTitle'](_0x10dad0){const _0x4be642=a259_0x45a8d4,_0x4ce7db=_0x10dad0[_0x4be642(0x216)]('/')[_0x4be642(0x1fe)]()||_0x10dad0;return _0x4ce7db[_0x4be642(0x216)]('-')[_0x4be642(0x20f)](_0x52b5d1=>_0x52b5d1[_0x4be642(0x1ee)](0x0)[_0x4be642(0x205)]()+_0x52b5d1['slice'](0x1)[_0x4be642(0x219)]())['join']('\x20');}static[a259_0x45a8d4(0x209)](_0x4d1786,_0x30d7f5,_0x28b851){const _0x15009f=a259_0x45a8d4,_0x26c96e=this[_0x15009f(0x20a)](_0x30d7f5),_0x4cf9ce=this[_0x15009f(0x1fc)](_0x30d7f5),{createdAt:_0x3de2ae,createdDate:_0x5b5a59,createdTime:_0x2dcf4e}=this[_0x15009f(0x213)](new Date());let _0xce6f73=_0x4d1786['replace'](/\{CliVersion\}/g,CLI_VERSION)[_0x15009f(0x21d)](/\{ComponentName\}/g,_0x26c96e)[_0x15009f(0x21d)](/\{DisplayTitle\}/g,_0x4cf9ce)[_0x15009f(0x21d)](/\{PageName\}/g,_0x30d7f5)['replace'](/\{TemplateName\}/g,_0x28b851)[_0x15009f(0x21d)](/\{CreatedAt\}/g,_0x3de2ae)[_0x15009f(0x21d)](/\{CreatedDate\}/g,_0x5b5a59)[_0x15009f(0x21d)](/\{CreatedTime\}/g,_0x2dcf4e);return _0xce6f73;}static[a259_0x45a8d4(0x21c)](_0x4befce,_0x3fe7e5,_0x13f172,_0x5de89d,_0x1d1f84,_0x294b4a,_0x1cdfdd,_0xfe1553){const _0x140d9b=a259_0x45a8d4,_0x53f878=new Date(),_0x5c620e=_0x53f878[_0x140d9b(0x228)](),_0x583627=_0x13f172[_0x140d9b(0x20f)](_0x69f4b6=>{const _0x587218=_0x140d9b,_0x27cac0=[_0x587218(0x1fa)+_0x69f4b6[_0x587218(0x1ed)]+'\x22',_0x587218(0x203)+_0x69f4b6[_0x587218(0x21b)]+'\x22',_0x587218(0x1eb)+_0x69f4b6['name']+'\x22'];return _0x69f4b6[_0x587218(0x1e3)]&&_0x27cac0[_0x587218(0x215)]('alias:\x20\x22'+_0x69f4b6['alias']+'\x22'),_0x587218(0x1e2)+_0x27cac0[_0x587218(0x1ec)](',\x20')+_0x587218(0x217);})[_0x140d9b(0x1ec)](''),_0x9a472a=_0x5de89d||_0x13f172[0x0]?.['alias']||_0x140d9b(0x1f0);let _0x5f2e37=_0x4befce[_0x140d9b(0x21d)](/\{AppCode\}/g,_0x3fe7e5)[_0x140d9b(0x21d)](/\{ModelConfigs\}/g,_0x583627)[_0x140d9b(0x21d)](/\{ExampleModelName\}/g,_0x9a472a)[_0x140d9b(0x21d)](/\{ApiFileName\}/g,_0x1d1f84||_0x140d9b(0x1e0))[_0x140d9b(0x21d)](/\{ConfigName\}/g,_0x294b4a||_0x140d9b(0x1ef))[_0x140d9b(0x21d)](/\{ClientConfigParam\}/g,_0x1cdfdd||'')[_0x140d9b(0x21d)](/\{VarPrefix\}/g,_0xfe1553||_0x140d9b(0x218))[_0x140d9b(0x21d)](/\{CreatedAt\}/g,_0x5c620e);return _0x5f2e37;}static async[a259_0x45a8d4(0x1ff)](_0x481dd5,_0xb3629c,_0x4c237a,_0x517ca8,_0x45f931=!![]){const _0x553470=a259_0x45a8d4,_0x6ec2a2=Date[_0x553470(0x207)]();try{_0x45f931&&logger[_0x553470(0x1fd)](_0x553470(0x21e),_0x553470(0x201),{'templatePath':_0x481dd5,'targetPath':_0xb3629c,'pageName':_0x4c237a,'templateName':_0x517ca8});await a259_0x3bce7d[_0x553470(0x226)][_0x553470(0x1e1)](_0xb3629c,{'recursive':!![]}),await this[_0x553470(0x1f8)](_0x481dd5,_0xb3629c,_0x4c237a,_0x517ca8);if(_0x45f931){const _0x5eb057=Date[_0x553470(0x207)]()-_0x6ec2a2;logger[_0x553470(0x224)]('template',_0x553470(0x1ea),_0x5eb057,{'pageName':_0x4c237a,'templateName':_0x517ca8});}}catch(_0x3eebe7){if(_0x45f931){const _0x6000e8=Date[_0x553470(0x207)]()-_0x6ec2a2;logger['error'](_0x553470(0x21e),_0x553470(0x21a),{'templatePath':_0x481dd5,'targetPath':_0xb3629c,'pageName':_0x4c237a,'templateName':_0x517ca8,'error':_0x3eebe7 instanceof Error?_0x3eebe7['message']:String(_0x3eebe7),'duration':_0x6000e8});}throw _0x3eebe7;}}static async['processDirectory'](_0x4d194c,_0x5f09e9,_0x4aff53,_0x5aae8a){const _0xfaf97=a259_0x45a8d4,_0x57d825=await a259_0x3bce7d['promises']['readdir'](_0x4d194c,{'withFileTypes':!![]});for(const _0x3347e5 of _0x57d825){const _0x217680=a259_0x43ed8f[_0xfaf97(0x1ec)](_0x4d194c,_0x3347e5['name']);let _0x5960af=a259_0x43ed8f['join'](_0x5f09e9,_0x3347e5[_0xfaf97(0x204)]);_0x3347e5[_0xfaf97(0x204)]['endsWith'](_0xfaf97(0x1e5))&&(_0x5960af=a259_0x43ed8f[_0xfaf97(0x1ec)](_0x5f09e9,_0x3347e5['name'][_0xfaf97(0x21d)](/\.tpl$/,'')));if(_0x3347e5[_0xfaf97(0x229)]())await a259_0x3bce7d[_0xfaf97(0x226)][_0xfaf97(0x1e1)](_0x5960af,{'recursive':!![]}),await this[_0xfaf97(0x1f8)](_0x217680,_0x5960af,_0x4aff53,_0x5aae8a);else _0x3347e5['isFile']()&&await this[_0xfaf97(0x1fb)](_0x217680,_0x5960af,_0x4aff53,_0x5aae8a);}}static async['processFile'](_0x583efc,_0x35a2db,_0x2fff6e,_0x58319c){const _0x4f6d41=a259_0x45a8d4,_0xdadcdb=a259_0x43ed8f[_0x4f6d41(0x1f2)](_0x583efc)[_0x4f6d41(0x219)]();_0x583efc[_0x4f6d41(0x208)](_0x4f6d41(0x1e5))&&(_0x35a2db=_0x35a2db[_0x4f6d41(0x21d)](/\.tpl$/,''));const _0xc0cdd5=['.tsx',_0x4f6d41(0x210),_0x4f6d41(0x1e9),'.js',_0x4f6d41(0x212),'.md',_0x4f6d41(0x211),_0x4f6d41(0x1e6),'.tpl'];if(_0xc0cdd5[_0x4f6d41(0x1f3)](_0xdadcdb)||_0x583efc[_0x4f6d41(0x208)](_0x4f6d41(0x1e5))){const _0x51122b=await a259_0x3bce7d[_0x4f6d41(0x226)][_0x4f6d41(0x21f)](_0x583efc,_0x4f6d41(0x221)),_0x1f2d77=this[_0x4f6d41(0x209)](_0x51122b,_0x2fff6e,_0x58319c);await a259_0x3bce7d['promises']['writeFile'](_0x35a2db,_0x1f2d77,'utf8');}else await a259_0x3bce7d['promises'][_0x4f6d41(0x1f7)](_0x583efc,_0x35a2db);}}
@@ -1 +1 @@
1
- (function(_0x31d670,_0x53d326){const _0xb0196b=a260_0x9d51,_0x5eac32=_0x31d670();while(!![]){try{const _0x2057c4=-parseInt(_0xb0196b(0xce))/0x1*(-parseInt(_0xb0196b(0xc3))/0x2)+-parseInt(_0xb0196b(0xcb))/0x3+parseInt(_0xb0196b(0xba))/0x4+parseInt(_0xb0196b(0xb9))/0x5+parseInt(_0xb0196b(0xcd))/0x6+-parseInt(_0xb0196b(0xbb))/0x7+parseInt(_0xb0196b(0xc9))/0x8;if(_0x2057c4===_0x53d326)break;else _0x5eac32['push'](_0x5eac32['shift']());}catch(_0xb1baf5){_0x5eac32['push'](_0x5eac32['shift']());}}}(a260_0x5a7e,0x545d0));import{mkdir,readFile,writeFile}from'node:fs/promises';import{homedir}from'node:os';import{dirname,join}from'node:path';import a260_0x14e5db from'semver';import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';import{getCliVersionPolicy}from'../utils/cli-version-policy.js';import{getCliVersion}from'../utils/version.js';const UPDATE_CHECK_TTL_MS=0xc*0x3c*0x3c*0x3e8,UPDATE_NOTICE_TTL_MS=0x18*0x3c*0x3c*0x3e8;function isUpdateNoticeDisabled(){const _0x11c0b7=a260_0x9d51,_0x3bf7c4=process.env.RABETBASE_NO_UPDATE_NOTICE?.[_0x11c0b7(0xc6)]()[_0x11c0b7(0xbc)]();return _0x3bf7c4==='1'||_0x3bf7c4===_0x11c0b7(0xcc)||_0x3bf7c4===_0x11c0b7(0xd1);}function cacheRoot(){const _0xe2d6df=a260_0x9d51;return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),_0xe2d6df(0xbf));}export function getUpdateNoticeCachePath(){const _0x5121a1=a260_0x9d51;return join(cacheRoot(),_0x5121a1(0xc7),'update-check.json');}function a260_0x5a7e(){const _0xa92f03=['gte','trim','rabetbase-cli','stableVersion','2049528gtrWbM','checkedAt','700842DpaIuj','true','1669716wYtDhx','2cvBELB','number','now','yes','71085zdtdeJ','818908bSQbtz','1304443kCYLXZ','toLowerCase','\x20available,\x20current\x20','lastNotifiedVersion','.cache','valid','/v/','utf8','12094SVjvHY','parse'];a260_0x5a7e=function(){return _0xa92f03;};return a260_0x5a7e();}function a260_0x9d51(_0x1af2d3,_0x5c61b0){_0x1af2d3=_0x1af2d3-0xb9;const _0x5a7ed7=a260_0x5a7e();let _0x9d5175=_0x5a7ed7[_0x1af2d3];return _0x9d5175;}async function readUpdateNoticeCache(){const _0x2f4a9b=a260_0x9d51;try{const _0x13eceb=await readFile(getUpdateNoticeCachePath(),_0x2f4a9b(0xc2)),_0x15fb95=JSON[_0x2f4a9b(0xc4)](_0x13eceb);if(!_0x15fb95||typeof _0x15fb95!=='object')return{};return _0x15fb95;}catch{return{};}}async function writeUpdateNoticeCache(_0x1f2b63){const _0x305a7f=a260_0x9d51;try{const _0x4a9be7=getUpdateNoticeCachePath();await mkdir(dirname(_0x4a9be7),{'recursive':!![]}),await writeFile(_0x4a9be7,JSON['stringify'](_0x1f2b63,null,0x2)+'\x0a',_0x305a7f(0xc2));}catch{}}function isFreshCheck(_0x5892fd,_0x51431c){const _0x362375=a260_0x9d51;return typeof _0x5892fd[_0x362375(0xca)]===_0x362375(0xcf)&&_0x51431c-_0x5892fd['checkedAt']<UPDATE_CHECK_TTL_MS;}function isRecentlyNotified(_0x415014,_0x18d61a,_0x4b3457){const _0x3bb9b2=a260_0x9d51;return _0x415014[_0x3bb9b2(0xbe)]===_0x18d61a&&typeof _0x415014['lastNotifiedAt']===_0x3bb9b2(0xcf)&&_0x4b3457-_0x415014['lastNotifiedAt']<UPDATE_NOTICE_TTL_MS;}export function buildNpmVersionUrl(_0x30ec09){const _0x12106e=a260_0x9d51;return'https://www.npmjs.com/package/'+NPM_PACKAGE_NAME+_0x12106e(0xc1)+_0x30ec09;}export async function resolveLatestUpdateNotice(){const _0x493d65=a260_0x9d51;if(isUpdateNoticeDisabled())return null;try{const _0x66345=Date[_0x493d65(0xd0)](),_0x514cfb=getCliVersion(),_0x51996d=await readUpdateNoticeCache();let _0x1a444b=isFreshCheck(_0x51996d,_0x66345)?_0x51996d['latest']?.[_0x493d65(0xc6)]():undefined;if(!_0x1a444b&&!isFreshCheck(_0x51996d,_0x66345)){const _0x1813ef=await getCliVersionPolicy();_0x1a444b=_0x1813ef?.[_0x493d65(0xc8)]?.[_0x493d65(0xc6)]()||undefined,await writeUpdateNoticeCache({..._0x51996d,'checkedAt':_0x66345,'latest':_0x1a444b,'failed':!_0x1a444b});}if(!_0x1a444b||!a260_0x14e5db[_0x493d65(0xc0)](_0x514cfb)||!a260_0x14e5db[_0x493d65(0xc0)](_0x1a444b))return null;if(a260_0x14e5db[_0x493d65(0xc5)](_0x514cfb,_0x1a444b))return null;if(isRecentlyNotified(_0x51996d,_0x1a444b,_0x66345))return null;const _0x165690=CLI_BIN_NAME+'\x20update';return await writeUpdateNoticeCache({..._0x51996d,'checkedAt':isFreshCheck(_0x51996d,_0x66345)?_0x51996d[_0x493d65(0xca)]:_0x66345,'latest':_0x1a444b,'failed':![],'lastNotifiedVersion':_0x1a444b,'lastNotifiedAt':_0x66345}),{'command':_0x165690,'current':_0x514cfb,'latest':_0x1a444b,'url':buildNpmVersionUrl(_0x1a444b),'message':CLI_BIN_NAME+'\x20'+_0x1a444b+_0x493d65(0xbd)+_0x514cfb+',\x20run:\x20'+_0x165690};}catch{return null;}}
1
+ (function(_0x6b8c78,_0x345898){const _0x29ec46=a260_0x4c87,_0x3392b0=_0x6b8c78();while(!![]){try{const _0x290fb7=-parseInt(_0x29ec46(0x150))/0x1*(parseInt(_0x29ec46(0x160))/0x2)+-parseInt(_0x29ec46(0x15f))/0x3*(-parseInt(_0x29ec46(0x165))/0x4)+parseInt(_0x29ec46(0x167))/0x5+-parseInt(_0x29ec46(0x154))/0x6*(-parseInt(_0x29ec46(0x15b))/0x7)+-parseInt(_0x29ec46(0x14e))/0x8*(-parseInt(_0x29ec46(0x151))/0x9)+parseInt(_0x29ec46(0x153))/0xa+parseInt(_0x29ec46(0x14b))/0xb*(-parseInt(_0x29ec46(0x15d))/0xc);if(_0x290fb7===_0x345898)break;else _0x3392b0['push'](_0x3392b0['shift']());}catch(_0x263117){_0x3392b0['push'](_0x3392b0['shift']());}}}(a260_0x4949,0x922d2));import{mkdir,readFile,writeFile}from'node:fs/promises';import{homedir}from'node:os';import{dirname,join}from'node:path';import a260_0x406ac0 from'semver';import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';import{getCliVersionPolicy}from'../utils/cli-version-policy.js';import{getCliVersion}from'../utils/version.js';const UPDATE_CHECK_TTL_MS=0xc*0x3c*0x3c*0x3e8,UPDATE_NOTICE_TTL_MS=0x18*0x3c*0x3c*0x3e8;function isUpdateNoticeDisabled(){const _0x51470d=a260_0x4c87,_0x40d1da=process.env.RABETBASE_NO_UPDATE_NOTICE?.[_0x51470d(0x152)]()[_0x51470d(0x161)]();return _0x40d1da==='1'||_0x40d1da===_0x51470d(0x14d)||_0x40d1da===_0x51470d(0x156);}function cacheRoot(){const _0x38d9bd=a260_0x4c87;return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),_0x38d9bd(0x157));}export function getUpdateNoticeCachePath(){const _0x2aed3e=a260_0x4c87;return join(cacheRoot(),_0x2aed3e(0x163),_0x2aed3e(0x162));}async function readUpdateNoticeCache(){const _0x2faca7=a260_0x4c87;try{const _0x475882=await readFile(getUpdateNoticeCachePath(),_0x2faca7(0x159)),_0x10b5b5=JSON[_0x2faca7(0x14f)](_0x475882);if(!_0x10b5b5||typeof _0x10b5b5!=='object')return{};return _0x10b5b5;}catch{return{};}}async function writeUpdateNoticeCache(_0x599431){const _0x1c207d=a260_0x4c87;try{const _0x375126=getUpdateNoticeCachePath();await mkdir(dirname(_0x375126),{'recursive':!![]}),await writeFile(_0x375126,JSON[_0x1c207d(0x166)](_0x599431,null,0x2)+'\x0a',_0x1c207d(0x159));}catch{}}function isFreshCheck(_0x1dd400,_0x57361c){const _0x540c45=a260_0x4c87;return typeof _0x1dd400['checkedAt']===_0x540c45(0x158)&&_0x57361c-_0x1dd400[_0x540c45(0x155)]<UPDATE_CHECK_TTL_MS;}function a260_0x4c87(_0x211fad,_0x5e350f){_0x211fad=_0x211fad-0x14b;const _0x4949e2=a260_0x4949();let _0x4c8779=_0x4949e2[_0x211fad];return _0x4c8779;}function isRecentlyNotified(_0x5a098e,_0x1b82c2,_0x15d639){const _0x1f3e58=a260_0x4c87;return _0x5a098e['lastNotifiedVersion']===_0x1b82c2&&typeof _0x5a098e['lastNotifiedAt']===_0x1f3e58(0x158)&&_0x15d639-_0x5a098e[_0x1f3e58(0x14c)]<UPDATE_NOTICE_TTL_MS;}export function buildNpmVersionUrl(_0xc38fb6){const _0x303d2c=a260_0x4c87;return'https://www.npmjs.com/package/'+NPM_PACKAGE_NAME+_0x303d2c(0x15e)+_0xc38fb6;}function a260_0x4949(){const _0x1a5cbe=['gte','7pdeGdT','valid','12ccpTPL','/v/','1543083HIaRiZ','373300xZjIta','toLowerCase','update-check.json','rabetbase-cli','stableVersion','8VxvvKl','stringify','2237230YnUjRB','37367011SOkFGK','lastNotifiedAt','true','232BzEGSt','parse','1npeZEo','166104BwYCrX','trim','10045650SXfwAb','6998592VrWcby','checkedAt','yes','.cache','number','utf8'];a260_0x4949=function(){return _0x1a5cbe;};return a260_0x4949();}export async function resolveLatestUpdateNotice(){const _0x377fb5=a260_0x4c87;if(isUpdateNoticeDisabled())return null;try{const _0x1102cb=Date['now'](),_0x1e3496=getCliVersion(),_0x4e0448=await readUpdateNoticeCache();let _0x33189b=isFreshCheck(_0x4e0448,_0x1102cb)?_0x4e0448['latest']?.[_0x377fb5(0x152)]():undefined;if(!_0x33189b&&!isFreshCheck(_0x4e0448,_0x1102cb)){const _0x39e46a=await getCliVersionPolicy();_0x33189b=_0x39e46a?.[_0x377fb5(0x164)]?.[_0x377fb5(0x152)]()||undefined,await writeUpdateNoticeCache({..._0x4e0448,'checkedAt':_0x1102cb,'latest':_0x33189b,'failed':!_0x33189b});}if(!_0x33189b||!a260_0x406ac0[_0x377fb5(0x15c)](_0x1e3496)||!a260_0x406ac0[_0x377fb5(0x15c)](_0x33189b))return null;if(a260_0x406ac0[_0x377fb5(0x15a)](_0x1e3496,_0x33189b))return null;if(isRecentlyNotified(_0x4e0448,_0x33189b,_0x1102cb))return null;const _0x441375=CLI_BIN_NAME+'\x20update';return await writeUpdateNoticeCache({..._0x4e0448,'checkedAt':isFreshCheck(_0x4e0448,_0x1102cb)?_0x4e0448[_0x377fb5(0x155)]:_0x1102cb,'latest':_0x33189b,'failed':![],'lastNotifiedVersion':_0x33189b,'lastNotifiedAt':_0x1102cb}),{'command':_0x441375,'current':_0x1e3496,'latest':_0x33189b,'url':buildNpmVersionUrl(_0x33189b),'message':CLI_BIN_NAME+'\x20'+_0x33189b+'\x20available,\x20current\x20'+_0x1e3496+',\x20run:\x20'+_0x441375};}catch{return null;}}
@@ -1 +1 @@
1
- (function(_0x4f675e,_0x20e843){var _0x1f3aec=a261_0x173e,_0x1a81e1=_0x4f675e();while(!![]){try{var _0x38cdfb=-parseInt(_0x1f3aec(0x15d))/0x1*(parseInt(_0x1f3aec(0x161))/0x2)+-parseInt(_0x1f3aec(0x15f))/0x3*(-parseInt(_0x1f3aec(0x160))/0x4)+-parseInt(_0x1f3aec(0x163))/0x5+parseInt(_0x1f3aec(0x162))/0x6*(parseInt(_0x1f3aec(0x164))/0x7)+parseInt(_0x1f3aec(0x166))/0x8*(parseInt(_0x1f3aec(0x165))/0x9)+-parseInt(_0x1f3aec(0x15e))/0xa+-parseInt(_0x1f3aec(0x167))/0xb*(-parseInt(_0x1f3aec(0x15c))/0xc);if(_0x38cdfb===_0x20e843)break;else _0x1a81e1['push'](_0x1a81e1['shift']());}catch(_0x1f55e7){_0x1a81e1['push'](_0x1a81e1['shift']());}}}(a261_0x410f,0xd9309));import{VERSION}from'../generated/build-info.js';function a261_0x410f(){var _0x555050=['11UQQOhL','9515556oLiILz','17noEyoh','12498710sPAsUq','3YIhKdi','1969564ehrqeD','162746TxkzKL','396mFVdZn','2849980ZTLIvh','119644huFUxH','63wRdUtF','1919304XzHJDR'];a261_0x410f=function(){return _0x555050;};return a261_0x410f();}function a261_0x173e(_0x3cca92,_0x34cca4){_0x3cca92=_0x3cca92-0x15c;var _0x410fa8=a261_0x410f();var _0x173ea6=_0x410fa8[_0x3cca92];return _0x173ea6;}export function getCliVersion(){return VERSION;}
1
+ (function(_0x27141b,_0x2bd608){var _0x5ce910=a261_0xc32f,_0x6a7c23=_0x27141b();while(!![]){try{var _0x1049d0=-parseInt(_0x5ce910(0x1a8))/0x1*(-parseInt(_0x5ce910(0x1af))/0x2)+parseInt(_0x5ce910(0x1a6))/0x3*(-parseInt(_0x5ce910(0x1ab))/0x4)+parseInt(_0x5ce910(0x1ae))/0x5+-parseInt(_0x5ce910(0x1a5))/0x6+parseInt(_0x5ce910(0x1ad))/0x7*(-parseInt(_0x5ce910(0x1ac))/0x8)+-parseInt(_0x5ce910(0x1b0))/0x9*(parseInt(_0x5ce910(0x1aa))/0xa)+parseInt(_0x5ce910(0x1a7))/0xb*(parseInt(_0x5ce910(0x1a9))/0xc);if(_0x1049d0===_0x2bd608)break;else _0x6a7c23['push'](_0x6a7c23['shift']());}catch(_0x4485c0){_0x6a7c23['push'](_0x6a7c23['shift']());}}}(a261_0x2276,0x27eb7));function a261_0xc32f(_0x408742,_0x84bcd4){_0x408742=_0x408742-0x1a5;var _0x2276b4=a261_0x2276();var _0xc32fdb=_0x2276b4[_0x408742];return _0xc32fdb;}import{VERSION}from'../generated/build-info.js';export function getCliVersion(){return VERSION;}function a261_0x2276(){var _0xc59775=['18vNiUmN','381852DRCLzV','45987iJWMvw','746130JpnOiT','1glevot','12lySbzw','153860tmUVYU','8QxMzSq','1046840IkAJnc','14NEAkef','1166995AIiDIJ','498128uXdGIo'];a261_0x2276=function(){return _0xc59775;};return a261_0x2276();}
@@ -1 +1 @@
1
- (function(_0x59f6ca,_0x3c1c45){var _0x3cab1b=a262_0x4177,_0x5e4e3b=_0x59f6ca();while(!![]){try{var _0x59afc3=-parseInt(_0x3cab1b(0x1e9))/0x1*(-parseInt(_0x3cab1b(0x1e7))/0x2)+-parseInt(_0x3cab1b(0x1eb))/0x3+parseInt(_0x3cab1b(0x1ec))/0x4+parseInt(_0x3cab1b(0x1ef))/0x5*(parseInt(_0x3cab1b(0x1ee))/0x6)+-parseInt(_0x3cab1b(0x1ed))/0x7*(-parseInt(_0x3cab1b(0x1e8))/0x8)+-parseInt(_0x3cab1b(0x1ea))/0x9+-parseInt(_0x3cab1b(0x1e6))/0xa;if(_0x59afc3===_0x3c1c45)break;else _0x5e4e3b['push'](_0x5e4e3b['shift']());}catch(_0x561c30){_0x5e4e3b['push'](_0x5e4e3b['shift']());}}}(a262_0x3fe2,0xdbbeb));function a262_0x4177(_0x1d2c99,_0x21457f){_0x1d2c99=_0x1d2c99-0x1e6;var _0x3fe2a5=a262_0x3fe2();var _0x417789=_0x3fe2a5[_0x1d2c99];return _0x417789;}function a262_0x3fe2(){var _0x417c6b=['1364393gkadoU','4135014qXsvCa','2045139hpSLDa','1859380EqxZGW','936691eukAmS','236718vqyWgJ','25AKATuR','3867080qdFplz','2UShyBk','24PSygpH'];a262_0x3fe2=function(){return _0x417c6b;};return a262_0x3fe2();}import{setActiveCookie,clearActiveCookie}from'../core/api-client.js';export async function withActiveCookie(_0x4bb44f,_0x301cb7){setActiveCookie(_0x4bb44f);try{return await _0x301cb7();}finally{clearActiveCookie();}}
1
+ (function(_0x27e915,_0xda3efc){var _0x3d5493=a262_0x2b80,_0x4f4b37=_0x27e915();while(!![]){try{var _0x4a14c7=-parseInt(_0x3d5493(0x7d))/0x1*(-parseInt(_0x3d5493(0x7e))/0x2)+parseInt(_0x3d5493(0x81))/0x3+parseInt(_0x3d5493(0x87))/0x4*(-parseInt(_0x3d5493(0x7c))/0x5)+-parseInt(_0x3d5493(0x7f))/0x6*(parseInt(_0x3d5493(0x82))/0x7)+parseInt(_0x3d5493(0x85))/0x8*(-parseInt(_0x3d5493(0x80))/0x9)+-parseInt(_0x3d5493(0x83))/0xa+parseInt(_0x3d5493(0x86))/0xb*(parseInt(_0x3d5493(0x84))/0xc);if(_0x4a14c7===_0xda3efc)break;else _0x4f4b37['push'](_0x4f4b37['shift']());}catch(_0x475f74){_0x4f4b37['push'](_0x4f4b37['shift']());}}}(a262_0x5bb8,0x9dc66));import{setActiveCookie,clearActiveCookie}from'../core/api-client.js';function a262_0x2b80(_0x56675a,_0x37af87){_0x56675a=_0x56675a-0x7c;var _0x5bb807=a262_0x5bb8();var _0x2b80d2=_0x5bb807[_0x56675a];return _0x2b80d2;}export async function withActiveCookie(_0x48502f,_0x3a9708){setActiveCookie(_0x48502f);try{return await _0x3a9708();}finally{clearActiveCookie();}}function a262_0x5bb8(){var _0x3ec85c=['2lRfkhV','90mpnpDE','9MQliDj','3475878CHjZNB','399903tVtoPZ','10569320lKlvLw','15455316DRGWNu','2479528tLFiLT','11JtkTOe','525656LfDvQh','5ftGfwa','554899JLmQXg'];a262_0x5bb8=function(){return _0x3ec85c;};return a262_0x5bb8();}
@@ -1 +1 @@
1
- (function(_0x1dca5b,_0x2c2a12){var _0x3b20c5=a263_0x18a7,_0x34538a=_0x1dca5b();while(!![]){try{var _0xeb6de2=-parseInt(_0x3b20c5(0x10d))/0x1*(parseInt(_0x3b20c5(0x105))/0x2)+parseInt(_0x3b20c5(0x10b))/0x3*(-parseInt(_0x3b20c5(0x108))/0x4)+-parseInt(_0x3b20c5(0x10c))/0x5+parseInt(_0x3b20c5(0x106))/0x6+-parseInt(_0x3b20c5(0x10a))/0x7*(-parseInt(_0x3b20c5(0x109))/0x8)+-parseInt(_0x3b20c5(0x107))/0x9+parseInt(_0x3b20c5(0x104))/0xa;if(_0xeb6de2===_0x2c2a12)break;else _0x34538a['push'](_0x34538a['shift']());}catch(_0x5570a1){_0x34538a['push'](_0x34538a['shift']());}}}(a263_0x53cd,0x30071));function a263_0x18a7(_0x24403b,_0x22e050){_0x24403b=_0x24403b-0x104;var _0x53cd74=a263_0x53cd();var _0x18a780=_0x53cd74[_0x24403b];return _0x18a780;}function a263_0x53cd(){var _0x49a464=['184303zKDZXl','410301qgKzZM','701155OpJMwM','26KOBWmm','7300370XqprUN','17642XXlVTo','322146fBBLVl','2338596bxkJqf','8WYygCd','96GIrtPH'];a263_0x53cd=function(){return _0x49a464;};return a263_0x53cd();}export function writeCliSideChannelLine(_0x1ed165){process['stderr']['write'](_0x1ed165+'\x0a');}
1
+ function a263_0x44a7(_0x2657cb,_0x18b947){_0x2657cb=_0x2657cb-0x18f;var _0x532bd0=a263_0x532b();var _0x44a78a=_0x532bd0[_0x2657cb];return _0x44a78a;}(function(_0x238ec6,_0x4b97d8){var _0x51b015=a263_0x44a7,_0x56c1eb=_0x238ec6();while(!![]){try{var _0x2250c1=-parseInt(_0x51b015(0x193))/0x1+-parseInt(_0x51b015(0x199))/0x2*(-parseInt(_0x51b015(0x191))/0x3)+-parseInt(_0x51b015(0x194))/0x4+parseInt(_0x51b015(0x18f))/0x5+-parseInt(_0x51b015(0x190))/0x6*(-parseInt(_0x51b015(0x19a))/0x7)+parseInt(_0x51b015(0x195))/0x8+parseInt(_0x51b015(0x197))/0x9*(-parseInt(_0x51b015(0x192))/0xa);if(_0x2250c1===_0x4b97d8)break;else _0x56c1eb['push'](_0x56c1eb['shift']());}catch(_0x1aa135){_0x56c1eb['push'](_0x56c1eb['shift']());}}}(a263_0x532b,0x6ce5f));export function writeCliSideChannelLine(_0x2ee582){var _0x133531=a263_0x44a7;process[_0x133531(0x198)][_0x133531(0x196)](_0x2ee582+'\x0a');}function a263_0x532b(){var _0x23f9e8=['5157754bNHiSG','68795IdsbOy','6rsCkzc','1406430NMtLih','589970yScFVr','367287SsaXbV','785848SEIrBm','2571024YxCSAr','write','81AGcYeM','stderr','2Dkbhvk'];a263_0x532b=function(){return _0x23f9e8;};return a263_0x532b();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lovrabet/rabetbase-cli",
3
- "version": "2.3.13-beta.1",
3
+ "version": "2.3.13-beta.2",
4
4
  "description": "Developer CLI for Lovrabet apps, datasets, pages, SQL, BFF, database connections, skills, and AI agent workflows.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "keywords": [