@lovrabet/rabetbase-cli 2.2.4-beta.1 → 2.2.4-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (205) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/login-success-html.js +1 -1
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/generate.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/api/shared.js +1 -1
  19. package/lib/commands/app/add.js +1 -1
  20. package/lib/commands/app/discover.js +1 -1
  21. package/lib/commands/app/index.js +1 -1
  22. package/lib/commands/app/list.js +1 -1
  23. package/lib/commands/app/remove.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app/use.js +1 -1
  26. package/lib/commands/auth/index.js +1 -1
  27. package/lib/commands/bff/create.js +1 -1
  28. package/lib/commands/bff/delete.js +1 -1
  29. package/lib/commands/bff/detail.js +1 -1
  30. package/lib/commands/bff/index.js +1 -1
  31. package/lib/commands/bff/list.js +1 -1
  32. package/lib/commands/bff/pull.js +1 -1
  33. package/lib/commands/bff/push.js +1 -1
  34. package/lib/commands/bff/status.js +1 -1
  35. package/lib/commands/cli-update.js +1 -1
  36. package/lib/commands/codegen/index.js +1 -1
  37. package/lib/commands/codegen/sdk.js +1 -1
  38. package/lib/commands/codegen/sql.js +1 -1
  39. package/lib/commands/common/app-selector.js +1 -1
  40. package/lib/commands/common/flags.js +1 -1
  41. package/lib/commands/common/validate.js +1 -1
  42. package/lib/commands/config/get.js +1 -1
  43. package/lib/commands/config/index.js +1 -1
  44. package/lib/commands/config/list.js +1 -1
  45. package/lib/commands/config/set.js +1 -1
  46. package/lib/commands/config/shared.js +1 -1
  47. package/lib/commands/data/filter.js +1 -1
  48. package/lib/commands/data/getOne.js +1 -1
  49. package/lib/commands/data/index.js +1 -1
  50. package/lib/commands/data/shared.js +1 -1
  51. package/lib/commands/dataset/capability.js +1 -1
  52. package/lib/commands/dataset/delete.js +1 -1
  53. package/lib/commands/dataset/detail.js +1 -1
  54. package/lib/commands/dataset/extend-update.js +1 -1
  55. package/lib/commands/dataset/field-update.js +1 -1
  56. package/lib/commands/dataset/index.js +1 -1
  57. package/lib/commands/dataset/list.js +1 -1
  58. package/lib/commands/dataset/operations.js +1 -1
  59. package/lib/commands/dataset/relation-create.js +1 -1
  60. package/lib/commands/dataset/relation-delete.js +1 -1
  61. package/lib/commands/dataset/relation-shared.js +1 -1
  62. package/lib/commands/dataset/relation-update.js +1 -1
  63. package/lib/commands/dataset/relations.js +1 -1
  64. package/lib/commands/dataset/rename.js +1 -1
  65. package/lib/commands/db/analyze-cancel.js +1 -1
  66. package/lib/commands/db/analyze-start.js +1 -1
  67. package/lib/commands/db/analyze-status.js +1 -1
  68. package/lib/commands/db/create.js +1 -1
  69. package/lib/commands/db/delete.js +1 -1
  70. package/lib/commands/db/detail.js +1 -1
  71. package/lib/commands/db/diff.js +1 -1
  72. package/lib/commands/db/index.js +1 -1
  73. package/lib/commands/db/list.js +1 -1
  74. package/lib/commands/db/shared.js +1 -1
  75. package/lib/commands/db/tables.js +1 -1
  76. package/lib/commands/db/test.js +1 -1
  77. package/lib/commands/db/update.js +1 -1
  78. package/lib/commands/doctor.js +1 -1
  79. package/lib/commands/init/index.js +1 -1
  80. package/lib/commands/issue/index.js +1 -1
  81. package/lib/commands/issue/nudge.js +1 -1
  82. package/lib/commands/issue/report.js +1 -1
  83. package/lib/commands/issue/shared.js +1 -1
  84. package/lib/commands/logs/index.js +1 -1
  85. package/lib/commands/menu/index.js +1 -1
  86. package/lib/commands/menu/list.js +1 -1
  87. package/lib/commands/menu/shared/compare-table.js +1 -1
  88. package/lib/commands/menu/shared/index.js +1 -1
  89. package/lib/commands/menu/shared/inquirer.js +1 -1
  90. package/lib/commands/menu/shared/local-pages.js +1 -1
  91. package/lib/commands/menu/shared/logic.js +1 -1
  92. package/lib/commands/menu/shared/service.js +1 -1
  93. package/lib/commands/menu/shared/sync-core.js +1 -1
  94. package/lib/commands/menu/shared/update-core.js +1 -1
  95. package/lib/commands/menu/shared/valid-url.js +1 -1
  96. package/lib/commands/menu/sync.js +1 -1
  97. package/lib/commands/menu/update.js +1 -1
  98. package/lib/commands/page/generate-start.js +1 -1
  99. package/lib/commands/page/generate-status.js +1 -1
  100. package/lib/commands/page/index.js +1 -1
  101. package/lib/commands/page/pull.js +1 -1
  102. package/lib/commands/page/push.js +1 -1
  103. package/lib/commands/page/relation-audit.js +1 -1
  104. package/lib/commands/page/shared.js +1 -1
  105. package/lib/commands/page/standard-page-status.js +1 -1
  106. package/lib/commands/page/sync.js +1 -1
  107. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  108. package/lib/commands/project/create/format-elapsed.js +1 -1
  109. package/lib/commands/project/create/main.js +1 -1
  110. package/lib/commands/project/create/non-interactive.js +1 -1
  111. package/lib/commands/project/create/project-template-path.js +1 -1
  112. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  113. package/lib/commands/project/create/use-format-code.js +1 -1
  114. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  115. package/lib/commands/project/index.js +1 -1
  116. package/lib/commands/project/init.js +1 -1
  117. package/lib/commands/project/upgrade.js +1 -1
  118. package/lib/commands/registry.js +1 -1
  119. package/lib/commands/run/index.js +1 -1
  120. package/lib/commands/schema.js +1 -1
  121. package/lib/commands/skill/index.js +1 -1
  122. package/lib/commands/sql/create.js +1 -1
  123. package/lib/commands/sql/delete.js +1 -1
  124. package/lib/commands/sql/detail.js +1 -1
  125. package/lib/commands/sql/exec.js +1 -1
  126. package/lib/commands/sql/index.js +1 -1
  127. package/lib/commands/sql/list.js +1 -1
  128. package/lib/commands/sql/pull.js +1 -1
  129. package/lib/commands/sql/push.js +1 -1
  130. package/lib/commands/sql/save.js +1 -1
  131. package/lib/commands/sql/shared.js +1 -1
  132. package/lib/commands/sql/status.js +1 -1
  133. package/lib/commands/sql/validate.js +1 -1
  134. package/lib/config/schema.js +1 -1
  135. package/lib/constant/cdn.js +1 -1
  136. package/lib/constant/cli.js +1 -1
  137. package/lib/constant/defaults.js +1 -1
  138. package/lib/constant/domain.js +1 -1
  139. package/lib/constant/env.js +1 -1
  140. package/lib/constant/output.js +1 -1
  141. package/lib/constant/paths.js +1 -1
  142. package/lib/constant/risk.js +1 -1
  143. package/lib/context.js +1 -1
  144. package/lib/core/alias-resolver.js +1 -1
  145. package/lib/core/api-client.js +1 -1
  146. package/lib/core/bff/config.js +1 -1
  147. package/lib/core/bff/file-system.js +1 -1
  148. package/lib/core/bff/hash.js +1 -1
  149. package/lib/core/bff/lock.js +1 -1
  150. package/lib/core/bff/utils.js +1 -1
  151. package/lib/core/db-resolver.js +1 -1
  152. package/lib/core/page/file-system.js +1 -1
  153. package/lib/core/page/hash.js +1 -1
  154. package/lib/core/page/lock.js +1 -1
  155. package/lib/core/sql-sync/config.js +1 -1
  156. package/lib/core/sql-sync/file-system.js +1 -1
  157. package/lib/core/sql-sync/hash.js +1 -1
  158. package/lib/core/sql-sync/lock.js +1 -1
  159. package/lib/core/sql-sync/utils.js +1 -1
  160. package/lib/core/sql-validator.js +1 -1
  161. package/lib/errors.js +1 -1
  162. package/lib/framework/build-all-flags.js +1 -1
  163. package/lib/framework/flags.js +1 -1
  164. package/lib/framework/help.js +1 -1
  165. package/lib/framework/index.js +1 -1
  166. package/lib/framework/output.js +1 -1
  167. package/lib/framework/response.js +1 -1
  168. package/lib/framework/runner-alias.js +1 -1
  169. package/lib/framework/runner.js +1 -1
  170. package/lib/framework/schema-export.js +1 -1
  171. package/lib/framework/types.js +1 -1
  172. package/lib/generated/build-info.js +1 -1
  173. package/lib/help.js +1 -1
  174. package/lib/skills/main.js +1 -1
  175. package/lib/skills/npx-skills-add.js +1 -1
  176. package/lib/telemetry/cli-command-trace.js +1 -1
  177. package/lib/telemetry/cli-help-trace.js +1 -1
  178. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  179. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  180. package/lib/telemetry/send-cli-trace-log.js +1 -1
  181. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  182. package/lib/utils/ai_config.js +1 -1
  183. package/lib/utils/apply-jq-filter.js +1 -1
  184. package/lib/utils/cdn-config.js +1 -1
  185. package/lib/utils/check-sdk-version.js +1 -1
  186. package/lib/utils/cli-version-check.js +1 -1
  187. package/lib/utils/cli-version-policy.js +1 -1
  188. package/lib/utils/config.js +1 -1
  189. package/lib/utils/copy-directory.js +1 -1
  190. package/lib/utils/entity-with-id.js +1 -1
  191. package/lib/utils/file-utils.js +1 -1
  192. package/lib/utils/guides-cdn.js +1 -1
  193. package/lib/utils/http-client.js +1 -1
  194. package/lib/utils/is-non-interactive.js +1 -1
  195. package/lib/utils/logger.js +1 -1
  196. package/lib/utils/params.js +1 -1
  197. package/lib/utils/platform.js +1 -1
  198. package/lib/utils/rules-cdn.js +1 -1
  199. package/lib/utils/sleep.js +1 -1
  200. package/lib/utils/template-replacer.js +1 -1
  201. package/lib/utils/update-notice.js +1 -1
  202. package/lib/utils/version.js +1 -1
  203. package/lib/utils/with-active-cookie.js +1 -1
  204. package/lib/utils/write-cli-side-channel.js +1 -1
  205. package/package.json +1 -1
@@ -1 +1 @@
1
- const a199_0x183b1e=a199_0x46d3;(function(_0x2e6242,_0x352f28){const _0xc0319f=a199_0x46d3,_0x121bf6=_0x2e6242();while(!![]){try{const _0x18bb59=-parseInt(_0xc0319f(0x114))/0x1*(-parseInt(_0xc0319f(0x108))/0x2)+parseInt(_0xc0319f(0x106))/0x3*(parseInt(_0xc0319f(0xef))/0x4)+-parseInt(_0xc0319f(0x107))/0x5*(parseInt(_0xc0319f(0x112))/0x6)+-parseInt(_0xc0319f(0x119))/0x7*(parseInt(_0xc0319f(0x101))/0x8)+parseInt(_0xc0319f(0xfd))/0x9+parseInt(_0xc0319f(0x109))/0xa+-parseInt(_0xc0319f(0xfe))/0xb;if(_0x18bb59===_0x352f28)break;else _0x121bf6['push'](_0x121bf6['shift']());}catch(_0x1401fb){_0x121bf6['push'](_0x121bf6['shift']());}}}(a199_0x6cfd,0xa9d57));import a199_0x7bc21c from'winston';import a199_0x277b6c from'node:fs';function a199_0x46d3(_0x19a6f6,_0x53d8f4){_0x19a6f6=_0x19a6f6-0xe8;const _0x6cfd53=a199_0x6cfd();let _0x46d380=_0x6cfd53[_0x19a6f6];return _0x46d380;}import a199_0xf32a9a from'node:path';class Logger{[a199_0x183b1e(0x10a)];['logFilePath'];[a199_0x183b1e(0x11b)]='';constructor(){const _0x5802be=a199_0x183b1e;this[_0x5802be(0x11e)]='';}['setRawCommand'](_0x544bce){const _0x3fce08=a199_0x183b1e;this[_0x3fce08(0x11b)]=_0x544bce;}[a199_0x183b1e(0xee)](){const _0x3c183a=a199_0x183b1e,_0x1a3345=a199_0xf32a9a['dirname'](this[_0x3c183a(0x11e)]);!a199_0x277b6c['existsSync'](_0x1a3345)&&a199_0x277b6c[_0x3c183a(0xf5)](_0x1a3345,{'recursive':!![]});const _0x2add1d=a199_0x7bc21c[_0x3c183a(0xfb)]['combine'](a199_0x7bc21c[_0x3c183a(0xfb)][_0x3c183a(0xf7)](),a199_0x7bc21c[_0x3c183a(0xfb)][_0x3c183a(0x10b)]({'stack':!![]}),a199_0x7bc21c['format'][_0x3c183a(0x11c)](_0x33840a=>{const _0x297f5f=_0x3c183a,_0x319f2e={'timestamp':_0x33840a[_0x297f5f(0xf7)]||new Date()[_0x297f5f(0x10d)](),'level':_0x33840a[_0x297f5f(0x110)]||_0x297f5f(0xf3),'command':_0x33840a['command']||_0x297f5f(0xe8),'rawCommand':_0x33840a[_0x297f5f(0xf8)]||this[_0x297f5f(0x11b)]||undefined,'message':_0x33840a[_0x297f5f(0x113)]||'','duration':_0x33840a[_0x297f5f(0x11a)]||undefined,'details':_0x33840a[_0x297f5f(0x111)]||undefined};return JSON['stringify'](_0x319f2e);}));this[_0x3c183a(0x10a)]=a199_0x7bc21c[_0x3c183a(0x116)]({'level':_0x3c183a(0xf3),'format':_0x2add1d,'transports':[new a199_0x7bc21c[(_0x3c183a(0xfc))][(_0x3c183a(0x10f))]({'filename':this[_0x3c183a(0x11e)],'level':_0x3c183a(0xf3)})],'silent':![]}),a199_0x7bc21c['addColors']({'success':_0x3c183a(0xf9),'error':'red','warn':_0x3c183a(0xf6),'info':'blue'});}[a199_0x183b1e(0xf0)](_0x38d3fd){const _0x57db1a=a199_0x183b1e;this['logFilePath']=a199_0xf32a9a[_0x57db1a(0x10e)](_0x38d3fd,_0x57db1a(0xed)),this[_0x57db1a(0x10a)]&&this[_0x57db1a(0x10a)][_0x57db1a(0x100)](),this[_0x57db1a(0xee)]();}['info'](_0x307104,_0x203e29,_0x495d29){const _0x5932e8=a199_0x183b1e;if(!this[_0x5932e8(0x11e)]||!this[_0x5932e8(0x10a)])return;this['winstonLogger'][_0x5932e8(0xf3)](_0x203e29,{'command':_0x307104,'details':_0x495d29});}[a199_0x183b1e(0xf4)](_0x5b636e,_0x2c4a60,_0x17bc75,_0x5372b1){const _0x48bdb5=a199_0x183b1e;if(!this[_0x48bdb5(0x11e)]||!this[_0x48bdb5(0x10a)])return;this[_0x48bdb5(0x10a)][_0x48bdb5(0x102)]('info',_0x2c4a60,{'level':_0x48bdb5(0xf4),'command':_0x5b636e,'duration':_0x17bc75,'details':_0x5372b1});}[a199_0x183b1e(0x105)](_0x3ffcb8,_0x13b2cb,_0x119273){const _0x17ac02=a199_0x183b1e;if(!this[_0x17ac02(0x11e)]||!this[_0x17ac02(0x10a)])return;this['winstonLogger'][_0x17ac02(0x105)](_0x13b2cb,{'command':_0x3ffcb8,'details':_0x119273});}[a199_0x183b1e(0xff)](_0x2e1c98,_0x330ef7,_0x4f4b53){const _0x36a602=a199_0x183b1e;if(!this[_0x36a602(0x11e)]||!this['winstonLogger'])return;this['winstonLogger'][_0x36a602(0xff)](_0x330ef7,{'command':_0x2e1c98,'details':_0x4f4b53});}async[a199_0x183b1e(0x115)](_0x368815,_0x5a45e0,_0x5b913a){const _0x5bf430=a199_0x183b1e,_0x39dd75=Date['now']();this[_0x5bf430(0xf3)](_0x368815,'开始执行:\x20'+_0x5a45e0);try{const _0x21e44a=await _0x5b913a(),_0x1c6173=Date[_0x5bf430(0x118)]()-_0x39dd75;return this[_0x5bf430(0xf4)](_0x368815,_0x5bf430(0x10c)+_0x5a45e0,_0x1c6173),_0x21e44a;}catch(_0x3c397d){const _0x43702f=Date['now']()-_0x39dd75;this[_0x5bf430(0x105)](_0x368815,'失败:\x20'+_0x5a45e0,{'error':_0x3c397d instanceof Error?_0x3c397d['message']:String(_0x3c397d),'duration':_0x43702f});throw _0x3c397d;}}['readLogs'](){const _0x3b1876=a199_0x183b1e;try{if(!a199_0x277b6c['existsSync'](this['logFilePath']))return[];const _0x16b02d=a199_0x277b6c[_0x3b1876(0xeb)](this[_0x3b1876(0x11e)],'utf8');return _0x16b02d[_0x3b1876(0x104)]('\x0a')['filter'](_0x2d341f=>_0x2d341f[_0x3b1876(0x103)]())[_0x3b1876(0xfa)](_0x8c9e3a=>JSON[_0x3b1876(0xea)](_0x8c9e3a));}catch(_0x5e78a2){return console['warn'](_0x3b1876(0xf1),_0x5e78a2),[];}}[a199_0x183b1e(0xe9)](){const _0x256d6b=a199_0x183b1e;try{a199_0x277b6c[_0x256d6b(0xf2)](this[_0x256d6b(0x11e)])&&a199_0x277b6c[_0x256d6b(0x11d)](this[_0x256d6b(0x11e)],'','utf8');}catch(_0x2222f9){console[_0x256d6b(0xff)](_0x256d6b(0xec),_0x2222f9);}}[a199_0x183b1e(0x117)](){const _0x202bdc=a199_0x183b1e;return this[_0x202bdc(0x10a)];}}function a199_0x6cfd(){const _0x5359d6=['timestamp','rawCommand','green','map','format','transports','8830278vcsNqy','30936774hjsine','warn','clear','9888chQPKi','log','trim','split','error','328539PixAvD','80bZxIOQ','1597434RXZGbj','6434110tAJRUC','winstonLogger','errors','完成:\x20','toISOString','join','File','level','details','24546xdNeUq','message','1TglmQP','logTask','createLogger','getWinstonInstance','now','308vczDXn','duration','currentRawCommand','printf','writeFileSync','logFilePath','unknown','clearLogs','parse','readFileSync','Failed\x20to\x20clear\x20logs:','.lovrabet.log','initWinstonLogger','44ndgkYt','setLogPath','Failed\x20to\x20read\x20logs:','existsSync','info','success','mkdirSync','yellow'];a199_0x6cfd=function(){return _0x5359d6;};return a199_0x6cfd();}export const logger=new Logger();
1
+ const a199_0x2ed68c=a199_0x208a;(function(_0x401db1,_0x2c804f){const _0x45d9c3=a199_0x208a,_0x566cea=_0x401db1();while(!![]){try{const _0x35f83b=-parseInt(_0x45d9c3(0xa3))/0x1*(-parseInt(_0x45d9c3(0x8d))/0x2)+-parseInt(_0x45d9c3(0x88))/0x3*(-parseInt(_0x45d9c3(0xa2))/0x4)+parseInt(_0x45d9c3(0xab))/0x5+parseInt(_0x45d9c3(0xa7))/0x6+-parseInt(_0x45d9c3(0x7f))/0x7*(-parseInt(_0x45d9c3(0x91))/0x8)+-parseInt(_0x45d9c3(0x9a))/0x9*(parseInt(_0x45d9c3(0xa0))/0xa)+parseInt(_0x45d9c3(0x93))/0xb*(-parseInt(_0x45d9c3(0x9f))/0xc);if(_0x35f83b===_0x2c804f)break;else _0x566cea['push'](_0x566cea['shift']());}catch(_0x4a7ce7){_0x566cea['push'](_0x566cea['shift']());}}}(a199_0x1a5b,0x76e38));function a199_0x1a5b(){const _0x1b1182=['Failed\x20to\x20clear\x20logs:','Failed\x20to\x20read\x20logs:','rawCommand','3341180VjQmun','transports','initWinstonLogger','warn','join','writeFileSync','失败:\x20','info','getWinstonInstance','logFilePath','clear','message','format','readLogs','green','map','unknown','7erzavc','parse','level','addColors','setLogPath','utf8','File','dirname','duration','4149BSkEOe','.lovrabet.log','currentRawCommand','error','red','306lwcuMd','combine','trim','now','2495968ZduhVe','createLogger','58762CgMEEd','details','yellow','timestamp','开始执行:\x20','success','blue','4918455GcJEjf','完成:\x20','winstonLogger','logTask','split','3576JDGBxl','10zblYzM','mkdirSync','1028grJDrc','4314BganIC','readFileSync','errors','existsSync','3778044viYaiy'];a199_0x1a5b=function(){return _0x1b1182;};return a199_0x1a5b();}import a199_0x23b296 from'winston';import a199_0x396192 from'node:fs';import a199_0x4036a9 from'node:path';class Logger{[a199_0x2ed68c(0x9c)];[a199_0x2ed68c(0xb4)];['currentRawCommand']='';constructor(){const _0x56f3da=a199_0x2ed68c;this[_0x56f3da(0xb4)]='';}['setRawCommand'](_0x42605d){const _0x1a37fc=a199_0x2ed68c;this[_0x1a37fc(0x8a)]=_0x42605d;}[a199_0x2ed68c(0xad)](){const _0x49029d=a199_0x2ed68c,_0x341a27=a199_0x4036a9[_0x49029d(0x86)](this[_0x49029d(0xb4)]);!a199_0x396192[_0x49029d(0xa6)](_0x341a27)&&a199_0x396192[_0x49029d(0xa1)](_0x341a27,{'recursive':!![]});const _0x6bf9dc=a199_0x23b296[_0x49029d(0xb7)][_0x49029d(0x8e)](a199_0x23b296['format']['timestamp'](),a199_0x23b296['format'][_0x49029d(0xa5)]({'stack':!![]}),a199_0x23b296['format']['printf'](_0x18ee61=>{const _0x314de4=_0x49029d,_0x3a27df={'timestamp':_0x18ee61[_0x314de4(0x96)]||new Date()['toISOString'](),'level':_0x18ee61[_0x314de4(0x81)]||_0x314de4(0xb2),'command':_0x18ee61['command']||_0x314de4(0x7e),'rawCommand':_0x18ee61[_0x314de4(0xaa)]||this[_0x314de4(0x8a)]||undefined,'message':_0x18ee61[_0x314de4(0xb6)]||'','duration':_0x18ee61[_0x314de4(0x87)]||undefined,'details':_0x18ee61[_0x314de4(0x94)]||undefined};return JSON['stringify'](_0x3a27df);}));this[_0x49029d(0x9c)]=a199_0x23b296[_0x49029d(0x92)]({'level':_0x49029d(0xb2),'format':_0x6bf9dc,'transports':[new a199_0x23b296[(_0x49029d(0xac))][(_0x49029d(0x85))]({'filename':this[_0x49029d(0xb4)],'level':_0x49029d(0xb2)})],'silent':![]}),a199_0x23b296[_0x49029d(0x82)]({'success':_0x49029d(0xb9),'error':_0x49029d(0x8c),'warn':_0x49029d(0x95),'info':_0x49029d(0x99)});}[a199_0x2ed68c(0x83)](_0x4aef67){const _0x56152b=a199_0x2ed68c;this['logFilePath']=a199_0x4036a9[_0x56152b(0xaf)](_0x4aef67,_0x56152b(0x89)),this[_0x56152b(0x9c)]&&this[_0x56152b(0x9c)][_0x56152b(0xb5)](),this['initWinstonLogger']();}[a199_0x2ed68c(0xb2)](_0x407bee,_0x15f23d,_0x180da1){const _0x57caee=a199_0x2ed68c;if(!this['logFilePath']||!this['winstonLogger'])return;this['winstonLogger'][_0x57caee(0xb2)](_0x15f23d,{'command':_0x407bee,'details':_0x180da1});}[a199_0x2ed68c(0x98)](_0x2a737c,_0xf8ad63,_0x177abc,_0x4a70c1){const _0x1e7dd9=a199_0x2ed68c;if(!this['logFilePath']||!this['winstonLogger'])return;this['winstonLogger']['log'](_0x1e7dd9(0xb2),_0xf8ad63,{'level':_0x1e7dd9(0x98),'command':_0x2a737c,'duration':_0x177abc,'details':_0x4a70c1});}['error'](_0x4f2031,_0x2e9359,_0x109a30){const _0x1a5609=a199_0x2ed68c;if(!this[_0x1a5609(0xb4)]||!this[_0x1a5609(0x9c)])return;this['winstonLogger'][_0x1a5609(0x8b)](_0x2e9359,{'command':_0x4f2031,'details':_0x109a30});}['warn'](_0x41ad8a,_0x5b23a4,_0x1e5947){const _0x43f497=a199_0x2ed68c;if(!this[_0x43f497(0xb4)]||!this['winstonLogger'])return;this[_0x43f497(0x9c)][_0x43f497(0xae)](_0x5b23a4,{'command':_0x41ad8a,'details':_0x1e5947});}async[a199_0x2ed68c(0x9d)](_0x5e0099,_0x42a609,_0x48fee6){const _0x5dafcf=a199_0x2ed68c,_0xf709ab=Date['now']();this[_0x5dafcf(0xb2)](_0x5e0099,_0x5dafcf(0x97)+_0x42a609);try{const _0x254565=await _0x48fee6(),_0x24e4b0=Date[_0x5dafcf(0x90)]()-_0xf709ab;return this[_0x5dafcf(0x98)](_0x5e0099,_0x5dafcf(0x9b)+_0x42a609,_0x24e4b0),_0x254565;}catch(_0x3e9589){const _0x2558d1=Date[_0x5dafcf(0x90)]()-_0xf709ab;this[_0x5dafcf(0x8b)](_0x5e0099,_0x5dafcf(0xb1)+_0x42a609,{'error':_0x3e9589 instanceof Error?_0x3e9589[_0x5dafcf(0xb6)]:String(_0x3e9589),'duration':_0x2558d1});throw _0x3e9589;}}[a199_0x2ed68c(0xb8)](){const _0x4a405a=a199_0x2ed68c;try{if(!a199_0x396192['existsSync'](this['logFilePath']))return[];const _0x2d9b4b=a199_0x396192[_0x4a405a(0xa4)](this['logFilePath'],_0x4a405a(0x84));return _0x2d9b4b[_0x4a405a(0x9e)]('\x0a')['filter'](_0x47a3cc=>_0x47a3cc[_0x4a405a(0x8f)]())[_0x4a405a(0xba)](_0x3e040b=>JSON[_0x4a405a(0x80)](_0x3e040b));}catch(_0xf0ff74){return console[_0x4a405a(0xae)](_0x4a405a(0xa9),_0xf0ff74),[];}}['clearLogs'](){const _0x23574e=a199_0x2ed68c;try{a199_0x396192[_0x23574e(0xa6)](this[_0x23574e(0xb4)])&&a199_0x396192[_0x23574e(0xb0)](this['logFilePath'],'','utf8');}catch(_0x5e4933){console[_0x23574e(0xae)](_0x23574e(0xa8),_0x5e4933);}}[a199_0x2ed68c(0xb3)](){const _0x5b40e9=a199_0x2ed68c;return this[_0x5b40e9(0x9c)];}}function a199_0x208a(_0x58627a,_0x4c27b7){_0x58627a=_0x58627a-0x7e;const _0x1a5b80=a199_0x1a5b();let _0x208a59=_0x1a5b80[_0x58627a];return _0x208a59;}export const logger=new Logger();
@@ -1 +1 @@
1
- (function(_0x4b6c72,_0x2e9d3d){const _0x5807c9=a200_0x1595,_0x2663d1=_0x4b6c72();while(!![]){try{const _0x3ead71=parseInt(_0x5807c9(0x7e))/0x1*(-parseInt(_0x5807c9(0x82))/0x2)+-parseInt(_0x5807c9(0x78))/0x3*(parseInt(_0x5807c9(0x77))/0x4)+-parseInt(_0x5807c9(0x79))/0x5*(parseInt(_0x5807c9(0x7b))/0x6)+-parseInt(_0x5807c9(0x7c))/0x7+parseInt(_0x5807c9(0x81))/0x8+-parseInt(_0x5807c9(0x7f))/0x9+parseInt(_0x5807c9(0x80))/0xa*(parseInt(_0x5807c9(0x74))/0xb);if(_0x3ead71===_0x2e9d3d)break;else _0x2663d1['push'](_0x2663d1['shift']());}catch(_0x4926e4){_0x2663d1['push'](_0x2663d1['shift']());}}}(a200_0x1fef,0x8efc7));function a200_0x1595(_0x8ba777,_0x3e31cb){_0x8ba777=_0x8ba777-0x74;const _0x1fef0c=a200_0x1fef();let _0x159550=_0x1fef0c[_0x8ba777];return _0x159550;}function a200_0x1fef(){const _0x3aa13c=['1546928MAMqLZ','160qNZbWo','object','--params\x20must\x20be\x20a\x20JSON\x20object','validation','7227PxypkT','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','parse','2477356AuDmRg','3ktLXfR','4967290MAbpIs','isArray','6ndKiEq','748769mSvgyS','Invalid\x20JSON\x20for\x20--params:\x20','5353uPORLC','2781900gtcUeB','43370HtfbNN'];a200_0x1fef=function(){return _0x3aa13c;};return a200_0x1fef();}import{CliErrors}from'../errors.js';export function parseJsonParams(_0x21710a){const _0x69a7fb=a200_0x1595;if(!_0x21710a)return undefined;let _0x1bdb54;try{_0x1bdb54=JSON[_0x69a7fb(0x76)](_0x21710a);}catch{throw CliErrors[_0x69a7fb(0x85)](_0x69a7fb(0x7d)+_0x21710a);}if(!_0x1bdb54||typeof _0x1bdb54!==_0x69a7fb(0x83)||Array[_0x69a7fb(0x7a)](_0x1bdb54))throw CliErrors[_0x69a7fb(0x85)](_0x69a7fb(0x84),_0x69a7fb(0x75));return _0x1bdb54;}
1
+ function a200_0x158b(){const _0x5b6e5d=['2235875KRVqLe','validation','8YUjhMq','1233654JEcqdm','6901360eHIwmQ','4875283nxlQHI','parse','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','1163163GgBFzA','object','6PVjmPT','2639007edqvFz','2571154hbDKwX','isArray'];a200_0x158b=function(){return _0x5b6e5d;};return a200_0x158b();}(function(_0x327bad,_0x589e0c){const _0x19e568=a200_0x304f,_0x4b891f=_0x327bad();while(!![]){try{const _0x34da60=parseInt(_0x19e568(0x11d))/0x1+-parseInt(_0x19e568(0x113))/0x2+-parseInt(_0x19e568(0x118))/0x3*(-parseInt(_0x19e568(0x117))/0x4)+-parseInt(_0x19e568(0x115))/0x5+-parseInt(_0x19e568(0x11f))/0x6*(parseInt(_0x19e568(0x11a))/0x7)+parseInt(_0x19e568(0x119))/0x8+parseInt(_0x19e568(0x120))/0x9;if(_0x34da60===_0x589e0c)break;else _0x4b891f['push'](_0x4b891f['shift']());}catch(_0x1e55c4){_0x4b891f['push'](_0x4b891f['shift']());}}}(a200_0x158b,0xade4f));import{CliErrors}from'../errors.js';function a200_0x304f(_0x42a17c,_0x896ca2){_0x42a17c=_0x42a17c-0x113;const _0x158bca=a200_0x158b();let _0x304f8f=_0x158bca[_0x42a17c];return _0x304f8f;}export function parseJsonParams(_0x55b67d){const _0x2f1056=a200_0x304f;if(!_0x55b67d)return undefined;let _0x9326b3;try{_0x9326b3=JSON[_0x2f1056(0x11b)](_0x55b67d);}catch{throw CliErrors['validation']('Invalid\x20JSON\x20for\x20--params:\x20'+_0x55b67d);}if(!_0x9326b3||typeof _0x9326b3!==_0x2f1056(0x11e)||Array[_0x2f1056(0x114)](_0x9326b3))throw CliErrors[_0x2f1056(0x116)]('--params\x20must\x20be\x20a\x20JSON\x20object',_0x2f1056(0x11c));return _0x9326b3;}
@@ -1 +1 @@
1
- const a201_0x3184e3=a201_0x4b10;function a201_0x4024(){const _0x4b3cce=['388xuIJYY','26175ySJLIX','88kqPcGu','.cmd','platform','218183LepRgw','43106QQEbPg','win32','4422820TzFgPW','12GxCmLC','7034736KFAfCr','7565742yYEPjE','51dEXExE','37773835xyYNKV','10xXtNYP'];a201_0x4024=function(){return _0x4b3cce;};return a201_0x4024();}(function(_0x1e57e4,_0x3f5d42){const _0x445477=a201_0x4b10,_0x38e4ae=_0x1e57e4();while(!![]){try{const _0xeeccdd=-parseInt(_0x445477(0x158))/0x1*(parseInt(_0x445477(0x152))/0x2)+parseInt(_0x445477(0x14d))/0x3*(parseInt(_0x445477(0x14c))/0x4)+-parseInt(_0x445477(0x154))/0x5+-parseInt(_0x445477(0x156))/0x6+parseInt(_0x445477(0x151))/0x7*(parseInt(_0x445477(0x14e))/0x8)+parseInt(_0x445477(0x157))/0x9*(-parseInt(_0x445477(0x14b))/0xa)+parseInt(_0x445477(0x159))/0xb*(parseInt(_0x445477(0x155))/0xc);if(_0xeeccdd===_0x3f5d42)break;else _0x38e4ae['push'](_0x38e4ae['shift']());}catch(_0x500d8f){_0x38e4ae['push'](_0x38e4ae['shift']());}}}(a201_0x4024,0x98e84));export const isWindows=process[a201_0x3184e3(0x150)]===a201_0x3184e3(0x153);function a201_0x4b10(_0x45b318,_0x2062ff){_0x45b318=_0x45b318-0x14b;const _0x40242c=a201_0x4024();let _0x4b1087=_0x40242c[_0x45b318];return _0x4b1087;}export function resolveNpmBin(_0x2770c3){const _0x2463bd=a201_0x3184e3;return isWindows?_0x2770c3+_0x2463bd(0x14f):_0x2770c3;}
1
+ const a201_0x45c4cc=a201_0x8fcd;(function(_0x25e3bd,_0x4334a7){const _0x132d60=a201_0x8fcd,_0x1d7194=_0x25e3bd();while(!![]){try{const _0x1cfd14=-parseInt(_0x132d60(0x183))/0x1+-parseInt(_0x132d60(0x180))/0x2+-parseInt(_0x132d60(0x181))/0x3*(parseInt(_0x132d60(0x17f))/0x4)+-parseInt(_0x132d60(0x187))/0x5*(-parseInt(_0x132d60(0x185))/0x6)+parseInt(_0x132d60(0x186))/0x7*(-parseInt(_0x132d60(0x188))/0x8)+parseInt(_0x132d60(0x18b))/0x9*(-parseInt(_0x132d60(0x189))/0xa)+-parseInt(_0x132d60(0x182))/0xb*(-parseInt(_0x132d60(0x184))/0xc);if(_0x1cfd14===_0x4334a7)break;else _0x1d7194['push'](_0x1d7194['shift']());}catch(_0x53ba53){_0x1d7194['push'](_0x1d7194['shift']());}}}(a201_0x3517,0x3db8f));function a201_0x8fcd(_0x4856e9,_0x3aa569){_0x4856e9=_0x4856e9-0x17f;const _0x3517a0=a201_0x3517();let _0x8fcdaa=_0x3517a0[_0x4856e9];return _0x8fcdaa;}function a201_0x3517(){const _0x1ba652=['1609190fxyeCT','272upXPEE','410aZPsHW','platform','107712BLvTmH','5840ZOXQFn','886026EfDmRT','258CRiygE','8195vyjLDE','317375GqJUQb','21732VOhLFb','6jTsMHx','8561FKbpfD'];a201_0x3517=function(){return _0x1ba652;};return a201_0x3517();}export const isWindows=process[a201_0x45c4cc(0x18a)]==='win32';export function resolveNpmBin(_0x371f14){return isWindows?_0x371f14+'.cmd':_0x371f14;}
@@ -1 +1 @@
1
- const a202_0x58cdcb=a202_0x1184;(function(_0x1f5c10,_0x964767){const _0x425d99=a202_0x1184,_0xef89e1=_0x1f5c10();while(!![]){try{const _0x560586=parseInt(_0x425d99(0x1cc))/0x1+parseInt(_0x425d99(0x1c7))/0x2*(parseInt(_0x425d99(0x1d3))/0x3)+parseInt(_0x425d99(0x1d9))/0x4*(-parseInt(_0x425d99(0x1c4))/0x5)+parseInt(_0x425d99(0x1d2))/0x6*(-parseInt(_0x425d99(0x1da))/0x7)+parseInt(_0x425d99(0x1ca))/0x8+parseInt(_0x425d99(0x1d1))/0x9*(-parseInt(_0x425d99(0x1c8))/0xa)+parseInt(_0x425d99(0x1c2))/0xb;if(_0x560586===_0x964767)break;else _0xef89e1['push'](_0xef89e1['shift']());}catch(_0x45003b){_0xef89e1['push'](_0xef89e1['shift']());}}}(a202_0x4373,0xa8c9f));import{existsSync,mkdirSync,readFileSync,writeFileSync}from'node:fs';import{dirname,join,resolve}from'node:path';import{fileURLToPath}from'node:url';import{getTemplateBaseUrl}from'../utils/config.js';import{appendUpdateTime}from'../utils/guides-cdn.js';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function a202_0x4373(){const _0x27e9e1=['.cursor/rules','2rxkmzE','8443160dCtsDy','string','9718760WPOcXk','status','387344SeYSGA','application/json','statusText','/rules/rules.json','lovrabet_rules.mdc','9rPjiAw','18ffRGQh','2429709wlYlbc','agents.md','本地模板文件不存在:\x20','utf-8','../../templates/rules/lovrabet_rules.mdc.tpl','catch','420owawWO','3070515IdYVvU','8707413yzSZsp','CDN\x20返回数据格式错误','16765fBVbdB','content'];a202_0x4373=function(){return _0x27e9e1;};return a202_0x4373();}function a202_0x1184(_0x4c3f96,_0x15c7ff){_0x4c3f96=_0x4c3f96-0x1c2;const _0x4373d6=a202_0x4373();let _0x11846a=_0x4373d6[_0x4c3f96];return _0x11846a;}function getRulesCdnUrl(){const _0x451a88=a202_0x1184,_0x2e1cdc=getTemplateBaseUrl();return _0x2e1cdc+_0x451a88(0x1cf);}const LOCAL_TEMPLATE_PATH=resolve(__dirname,a202_0x58cdcb(0x1d7));export async function fetchRulesFromCDN(){const _0xa945f1=a202_0x58cdcb,_0xbcf074=getRulesCdnUrl(),_0xc85796=await fetch(_0xbcf074,{'headers':{'Accept':_0xa945f1(0x1cd)}});if(!_0xc85796['ok'])throw new Error('CDN\x20请求失败:\x20'+_0xc85796[_0xa945f1(0x1cb)]+'\x20'+_0xc85796[_0xa945f1(0x1ce)]);const _0x5a88dc=await _0xc85796['json']();if(!_0x5a88dc[_0xa945f1(0x1c5)]||typeof _0x5a88dc[_0xa945f1(0x1c5)]!==_0xa945f1(0x1c9))throw new Error(_0xa945f1(0x1c3));return _0x5a88dc;}export async function getRulesContent(){try{const _0x5e07aa=await fetchRulesFromCDN();return _0x5e07aa['content'];}catch{return readLocalTemplate();}}export function readLocalTemplate(){const _0x27b00c=a202_0x58cdcb;if(existsSync(LOCAL_TEMPLATE_PATH))return readFileSync(LOCAL_TEMPLATE_PATH,_0x27b00c(0x1d6));throw new Error(_0x27b00c(0x1d5)+LOCAL_TEMPLATE_PATH);}export async function writeRulesFile(_0x5c03f4){const _0x2c751a=a202_0x58cdcb,_0x55b915=await fetchRulesFromCDN()[_0x2c751a(0x1d8)](()=>null);let _0x2005a0;_0x55b915?(_0x2005a0=_0x55b915['content'],_0x55b915['lastUpdated']&&(_0x2005a0=appendUpdateTime(_0x2005a0,_0x55b915['lastUpdated']))):_0x2005a0=readLocalTemplate();const _0x3bf99a=dirname(_0x5c03f4);!existsSync(_0x3bf99a)&&mkdirSync(_0x3bf99a,{'recursive':!![]}),writeFileSync(_0x5c03f4,_0x2005a0,'utf-8');}export async function copyRulesToCursor(_0x4013da){const _0x5a34fd=a202_0x58cdcb,_0x1b07a4=join(_0x4013da,_0x5a34fd(0x1c6)),_0xc8d4b7=join(_0x1b07a4,_0x5a34fd(0x1d0));if(existsSync(_0xc8d4b7))return![];return await writeRulesFile(_0xc8d4b7),!![];}export async function copyRulesToAgentsMd(_0x45c454){const _0x2e7e67=a202_0x58cdcb,_0x144400=join(_0x45c454,_0x2e7e67(0x1d4));if(existsSync(_0x144400))return![];return await writeRulesFile(_0x144400),!![];}
1
+ const a202_0xcecb8=a202_0x5783;(function(_0x1b61bd,_0x1992e2){const _0x53aa06=a202_0x5783,_0x5e4eda=_0x1b61bd();while(!![]){try{const _0x58b766=parseInt(_0x53aa06(0x160))/0x1*(parseInt(_0x53aa06(0x174))/0x2)+-parseInt(_0x53aa06(0x16b))/0x3*(-parseInt(_0x53aa06(0x164))/0x4)+-parseInt(_0x53aa06(0x15e))/0x5*(-parseInt(_0x53aa06(0x162))/0x6)+-parseInt(_0x53aa06(0x170))/0x7+-parseInt(_0x53aa06(0x173))/0x8+-parseInt(_0x53aa06(0x161))/0x9+parseInt(_0x53aa06(0x15f))/0xa*(parseInt(_0x53aa06(0x16d))/0xb);if(_0x58b766===_0x1992e2)break;else _0x5e4eda['push'](_0x5e4eda['shift']());}catch(_0x5a55e9){_0x5e4eda['push'](_0x5e4eda['shift']());}}}(a202_0xf269,0xa30f4));import{existsSync,mkdirSync,readFileSync,writeFileSync}from'node:fs';function a202_0xf269(){const _0x11dee0=['70670OvRknM','190HYzoqg','219850DfVJqZ','3116565oQasow','90uYWBDn','agents.md','4817452ElfuQt','statusText','/rules/rules.json','utf-8','json','CDN\x20请求失败:\x20','CDN\x20返回数据格式错误','3hOHbGz','string','880506CheGkz','application/json','content','7332318BiDvqD','lovrabet_rules.mdc','../../templates/rules/lovrabet_rules.mdc.tpl','8763568OgrvzA','2FlxuyU','lastUpdated','catch','.cursor/rules','status'];a202_0xf269=function(){return _0x11dee0;};return a202_0xf269();}function a202_0x5783(_0x3e97a2,_0x244998){_0x3e97a2=_0x3e97a2-0x15b;const _0xf26913=a202_0xf269();let _0x578360=_0xf26913[_0x3e97a2];return _0x578360;}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 _0x40b551=a202_0x5783,_0x113937=getTemplateBaseUrl();return _0x113937+_0x40b551(0x166);}const LOCAL_TEMPLATE_PATH=resolve(__dirname,a202_0xcecb8(0x172));export async function fetchRulesFromCDN(){const _0x1d05be=a202_0xcecb8,_0x523613=getRulesCdnUrl(),_0x260187=await fetch(_0x523613,{'headers':{'Accept':_0x1d05be(0x16e)}});if(!_0x260187['ok'])throw new Error(_0x1d05be(0x169)+_0x260187[_0x1d05be(0x15d)]+'\x20'+_0x260187[_0x1d05be(0x165)]);const _0x8bd162=await _0x260187[_0x1d05be(0x168)]();if(!_0x8bd162['content']||typeof _0x8bd162[_0x1d05be(0x16f)]!==_0x1d05be(0x16c))throw new Error(_0x1d05be(0x16a));return _0x8bd162;}export async function getRulesContent(){const _0x599910=a202_0xcecb8;try{const _0x1268ae=await fetchRulesFromCDN();return _0x1268ae[_0x599910(0x16f)];}catch{return readLocalTemplate();}}export function readLocalTemplate(){const _0x32ef62=a202_0xcecb8;if(existsSync(LOCAL_TEMPLATE_PATH))return readFileSync(LOCAL_TEMPLATE_PATH,_0x32ef62(0x167));throw new Error('本地模板文件不存在:\x20'+LOCAL_TEMPLATE_PATH);}export async function writeRulesFile(_0x2f264d){const _0x8cac36=a202_0xcecb8,_0x2ab0db=await fetchRulesFromCDN()[_0x8cac36(0x15b)](()=>null);let _0x8b143d;_0x2ab0db?(_0x8b143d=_0x2ab0db[_0x8cac36(0x16f)],_0x2ab0db['lastUpdated']&&(_0x8b143d=appendUpdateTime(_0x8b143d,_0x2ab0db[_0x8cac36(0x175)]))):_0x8b143d=readLocalTemplate();const _0x126df0=dirname(_0x2f264d);!existsSync(_0x126df0)&&mkdirSync(_0x126df0,{'recursive':!![]}),writeFileSync(_0x2f264d,_0x8b143d,_0x8cac36(0x167));}export async function copyRulesToCursor(_0x5e0709){const _0x2e3197=a202_0xcecb8,_0x4288ef=join(_0x5e0709,_0x2e3197(0x15c)),_0x2f9c02=join(_0x4288ef,_0x2e3197(0x171));if(existsSync(_0x2f9c02))return![];return await writeRulesFile(_0x2f9c02),!![];}export async function copyRulesToAgentsMd(_0x46306e){const _0x2d4b09=a202_0xcecb8,_0x3a39ff=join(_0x46306e,_0x2d4b09(0x163));if(existsSync(_0x3a39ff))return![];return await writeRulesFile(_0x3a39ff),!![];}
@@ -1 +1 @@
1
- export function sleep(_0x36c36f){return new Promise(_0x2cb623=>setTimeout(_0x2cb623,_0x36c36f));}
1
+ export function sleep(_0x4105fc){return new Promise(_0x57a954=>setTimeout(_0x57a954,_0x4105fc));}
@@ -1 +1 @@
1
- const a204_0x18f0a1=a204_0x2bd8;(function(_0xf9b067,_0x31a579){const _0x3e870d=a204_0x2bd8,_0x44937e=_0xf9b067();while(!![]){try{const _0x40b33a=-parseInt(_0x3e870d(0x7c))/0x1*(parseInt(_0x3e870d(0xae))/0x2)+parseInt(_0x3e870d(0x9b))/0x3*(parseInt(_0x3e870d(0x83))/0x4)+parseInt(_0x3e870d(0xa5))/0x5+-parseInt(_0x3e870d(0x99))/0x6+-parseInt(_0x3e870d(0x9e))/0x7+-parseInt(_0x3e870d(0xad))/0x8*(-parseInt(_0x3e870d(0xac))/0x9)+parseInt(_0x3e870d(0x70))/0xa;if(_0x40b33a===_0x31a579)break;else _0x44937e['push'](_0x44937e['shift']());}catch(_0x5656bf){_0x44937e['push'](_0x44937e['shift']());}}}(a204_0x4a71,0x2e17c));import a204_0x474377 from'node:fs';function a204_0x4a71(){const _0x268ff7=['2043XDiAoR','getDate','promises','datasetCode:\x20\x22','extname','toComponentName','toDisplayTitle','1236dePVsi','slice','getMinutes','api','utf8','\x20},','.jsx','.md','default','isDirectory','YourModel','getSeconds','getHours','readdir','replaceContent','processFile','join','.ts','toISOString','alias','pop','replaceApiContent','2004960xGOMnN','isFile','474yqtONO','tableName:\x20\x22','now','1760486IoFAUl','tableName','.tpl','map','name:\x20\x22','.css','formatLocalTimestamp','1596480ommyUg','mkdir','toLowerCase','LOVRABET','processDirectory','getFullYear','endsWith','45YxWNbS','590528IGXWcj','54BqBaiz','\x0a\x20\x20\x20\x20{\x20','getMonth','info','replace','processTemplate','split','padStart','924170DMyXhx','template','pad','模板内容替换失败','datasetCode','name','.tsx','includes','error','.json','copyFile','charAt'];a204_0x4a71=function(){return _0x268ff7;};return a204_0x4a71();}import a204_0x16e4ac from'node:path';import{logger}from'../utils/logger.js';function a204_0x2bd8(_0x4ca5e1,_0x161c3e){_0x4ca5e1=_0x4ca5e1-0x6e;const _0x4a7188=a204_0x4a71();let _0x2bd87b=_0x4a7188[_0x4ca5e1];return _0x2bd87b;}import{getCliVersion}from'../utils/version.js';const CLI_VERSION=getCliVersion();export class TemplateReplacer{static['pad'](_0x44e3bd){const _0x2fddc2=a204_0x2bd8;return String(_0x44e3bd)[_0x2fddc2(0x6f)](0x2,'0');}static[a204_0x18f0a1(0xa4)](_0x50f93){const _0x5d5567=a204_0x18f0a1,_0x277247=_0x50f93[_0x5d5567(0xaa)](),_0x38b7ef=this[_0x5d5567(0x72)](_0x50f93[_0x5d5567(0xb0)]()+0x1),_0x159f31=this[_0x5d5567(0x72)](_0x50f93[_0x5d5567(0x7d)]()),_0x427fde=this[_0x5d5567(0x72)](_0x50f93[_0x5d5567(0x8f)]()),_0x37fa86=this['pad'](_0x50f93[_0x5d5567(0x85)]()),_0x5a1ba9=this[_0x5d5567(0x72)](_0x50f93[_0x5d5567(0x8e)]());return{'createdAt':_0x277247+'-'+_0x38b7ef+'-'+_0x159f31+'\x20'+_0x427fde+':'+_0x37fa86+':'+_0x5a1ba9,'createdDate':_0x277247+'-'+_0x38b7ef+'-'+_0x159f31,'createdTime':_0x427fde+':'+_0x37fa86+':'+_0x5a1ba9};}static['toComponentName'](_0x3857a1){const _0x549c90=a204_0x18f0a1,_0x368b09=_0x3857a1[_0x549c90(0x6e)]('/')['pop']()||_0x3857a1;return _0x368b09['split']('-')[_0x549c90(0xa1)](_0x513399=>_0x513399[_0x549c90(0x7b)](0x0)['toUpperCase']()+_0x513399[_0x549c90(0x84)](0x1)['toLowerCase']())['join']('');}static['toDisplayTitle'](_0x10dbc1){const _0x32c717=a204_0x18f0a1,_0x1b2d30=_0x10dbc1[_0x32c717(0x6e)]('/')[_0x32c717(0x97)]()||_0x10dbc1;return _0x1b2d30[_0x32c717(0x6e)]('-')[_0x32c717(0xa1)](_0x409d14=>_0x409d14['charAt'](0x0)['toUpperCase']()+_0x409d14[_0x32c717(0x84)](0x1)[_0x32c717(0xa7)]())[_0x32c717(0x93)]('\x20');}static[a204_0x18f0a1(0x91)](_0x45f188,_0x26c3cb,_0x4772e9){const _0x1e9675=a204_0x18f0a1,_0x58af38=this[_0x1e9675(0x81)](_0x26c3cb),_0xa87590=this[_0x1e9675(0x82)](_0x26c3cb),{createdAt:_0x37ef1f,createdDate:_0x16652b,createdTime:_0x3c623a}=this[_0x1e9675(0xa4)](new Date());let _0x22856e=_0x45f188[_0x1e9675(0xb2)](/\{CliVersion\}/g,CLI_VERSION)['replace'](/\{ComponentName\}/g,_0x58af38)[_0x1e9675(0xb2)](/\{DisplayTitle\}/g,_0xa87590)['replace'](/\{PageName\}/g,_0x26c3cb)['replace'](/\{TemplateName\}/g,_0x4772e9)['replace'](/\{CreatedAt\}/g,_0x37ef1f)[_0x1e9675(0xb2)](/\{CreatedDate\}/g,_0x16652b)[_0x1e9675(0xb2)](/\{CreatedTime\}/g,_0x3c623a);return _0x22856e;}static[a204_0x18f0a1(0x98)](_0x365cdb,_0x4329fd,_0x1a0299,_0x241fa6,_0x3d70bb,_0x85626d,_0x3f20d6,_0x3ed080){const _0x5d1160=a204_0x18f0a1,_0x27a78a=new Date(),_0x27d220=_0x27a78a[_0x5d1160(0x95)](),_0x1e6785=_0x1a0299[_0x5d1160(0xa1)](_0xac0d50=>{const _0x4cfd1c=_0x5d1160,_0x6acd95=[_0x4cfd1c(0x7f)+_0xac0d50[_0x4cfd1c(0x74)]+'\x22',_0x4cfd1c(0x9c)+_0xac0d50[_0x4cfd1c(0x9f)]+'\x22',_0x4cfd1c(0xa2)+_0xac0d50[_0x4cfd1c(0x75)]+'\x22'];return _0xac0d50['alias']&&_0x6acd95['push']('alias:\x20\x22'+_0xac0d50[_0x4cfd1c(0x96)]+'\x22'),_0x4cfd1c(0xaf)+_0x6acd95[_0x4cfd1c(0x93)](',\x20')+_0x4cfd1c(0x88);})[_0x5d1160(0x93)](''),_0x439f83=_0x241fa6||_0x1a0299[0x0]?.[_0x5d1160(0x96)]||_0x5d1160(0x8d);let _0x405937=_0x365cdb[_0x5d1160(0xb2)](/\{AppCode\}/g,_0x4329fd)[_0x5d1160(0xb2)](/\{ModelConfigs\}/g,_0x1e6785)[_0x5d1160(0xb2)](/\{ExampleModelName\}/g,_0x439f83)[_0x5d1160(0xb2)](/\{ApiFileName\}/g,_0x3d70bb||_0x5d1160(0x86))[_0x5d1160(0xb2)](/\{ConfigName\}/g,_0x85626d||_0x5d1160(0x8b))['replace'](/\{ClientConfigParam\}/g,_0x3f20d6||'')[_0x5d1160(0xb2)](/\{VarPrefix\}/g,_0x3ed080||_0x5d1160(0xa8))['replace'](/\{CreatedAt\}/g,_0x27d220);return _0x405937;}static async[a204_0x18f0a1(0xb3)](_0x5634ae,_0xdadfb2,_0x117fc1,_0x15d95f,_0x36ac58=!![]){const _0x21ccb9=a204_0x18f0a1,_0x57319f=Date['now']();try{_0x36ac58&&logger[_0x21ccb9(0xb1)](_0x21ccb9(0x71),'开始处理模板内容替换',{'templatePath':_0x5634ae,'targetPath':_0xdadfb2,'pageName':_0x117fc1,'templateName':_0x15d95f});await a204_0x474377[_0x21ccb9(0x7e)][_0x21ccb9(0xa6)](_0xdadfb2,{'recursive':!![]}),await this[_0x21ccb9(0xa9)](_0x5634ae,_0xdadfb2,_0x117fc1,_0x15d95f);if(_0x36ac58){const _0x30611f=Date[_0x21ccb9(0x9d)]()-_0x57319f;logger['success']('template','模板内容替换完成',_0x30611f,{'pageName':_0x117fc1,'templateName':_0x15d95f});}}catch(_0xf0d91f){if(_0x36ac58){const _0x544bc4=Date[_0x21ccb9(0x9d)]()-_0x57319f;logger[_0x21ccb9(0x78)]('template',_0x21ccb9(0x73),{'templatePath':_0x5634ae,'targetPath':_0xdadfb2,'pageName':_0x117fc1,'templateName':_0x15d95f,'error':_0xf0d91f instanceof Error?_0xf0d91f['message']:String(_0xf0d91f),'duration':_0x544bc4});}throw _0xf0d91f;}}static async[a204_0x18f0a1(0xa9)](_0x8c8d29,_0xffffbb,_0x8e9238,_0x5f5388){const _0x5741d5=a204_0x18f0a1,_0x257166=await a204_0x474377[_0x5741d5(0x7e)][_0x5741d5(0x90)](_0x8c8d29,{'withFileTypes':!![]});for(const _0x52b92d of _0x257166){const _0x293ce8=a204_0x16e4ac[_0x5741d5(0x93)](_0x8c8d29,_0x52b92d[_0x5741d5(0x75)]);let _0x4abdfc=a204_0x16e4ac['join'](_0xffffbb,_0x52b92d['name']);_0x52b92d[_0x5741d5(0x75)][_0x5741d5(0xab)]('.tpl')&&(_0x4abdfc=a204_0x16e4ac[_0x5741d5(0x93)](_0xffffbb,_0x52b92d[_0x5741d5(0x75)][_0x5741d5(0xb2)](/\.tpl$/,'')));if(_0x52b92d[_0x5741d5(0x8c)]())await a204_0x474377[_0x5741d5(0x7e)][_0x5741d5(0xa6)](_0x4abdfc,{'recursive':!![]}),await this[_0x5741d5(0xa9)](_0x293ce8,_0x4abdfc,_0x8e9238,_0x5f5388);else _0x52b92d[_0x5741d5(0x9a)]()&&await this[_0x5741d5(0x92)](_0x293ce8,_0x4abdfc,_0x8e9238,_0x5f5388);}}static async[a204_0x18f0a1(0x92)](_0xf91596,_0x5a87b3,_0x10cd10,_0x1e76b9){const _0x87c5de=a204_0x18f0a1,_0x58939a=a204_0x16e4ac[_0x87c5de(0x80)](_0xf91596)['toLowerCase']();_0xf91596[_0x87c5de(0xab)](_0x87c5de(0xa0))&&(_0x5a87b3=_0x5a87b3['replace'](/\.tpl$/,''));const _0x2f5c13=[_0x87c5de(0x76),_0x87c5de(0x94),_0x87c5de(0x89),'.js',_0x87c5de(0x79),_0x87c5de(0x8a),_0x87c5de(0xa3),'.scss','.tpl'];if(_0x2f5c13[_0x87c5de(0x77)](_0x58939a)||_0xf91596[_0x87c5de(0xab)]('.tpl')){const _0x5490e0=await a204_0x474377[_0x87c5de(0x7e)]['readFile'](_0xf91596,_0x87c5de(0x87)),_0x33404c=this[_0x87c5de(0x91)](_0x5490e0,_0x10cd10,_0x1e76b9);await a204_0x474377[_0x87c5de(0x7e)]['writeFile'](_0x5a87b3,_0x33404c,_0x87c5de(0x87));}else await a204_0x474377[_0x87c5de(0x7e)][_0x87c5de(0x7a)](_0xf91596,_0x5a87b3);}}
1
+ const a204_0x57a081=a204_0x1e82;(function(_0x44f848,_0x292b34){const _0x4fe173=a204_0x1e82,_0x1e96e6=_0x44f848();while(!![]){try{const _0x2dcfe6=parseInt(_0x4fe173(0x175))/0x1*(parseInt(_0x4fe173(0x180))/0x2)+-parseInt(_0x4fe173(0x14e))/0x3*(-parseInt(_0x4fe173(0x177))/0x4)+-parseInt(_0x4fe173(0x162))/0x5+parseInt(_0x4fe173(0x16a))/0x6+-parseInt(_0x4fe173(0x17d))/0x7+parseInt(_0x4fe173(0x178))/0x8*(-parseInt(_0x4fe173(0x155))/0x9)+parseInt(_0x4fe173(0x17a))/0xa;if(_0x2dcfe6===_0x292b34)break;else _0x1e96e6['push'](_0x1e96e6['shift']());}catch(_0x1833d8){_0x1e96e6['push'](_0x1e96e6['shift']());}}}(a204_0x5a41,0xd0c90));function a204_0x1e82(_0x3bcc54,_0x3dd8f5){_0x3bcc54=_0x3bcc54-0x140;const _0x5a4127=a204_0x5a41();let _0x1e826b=_0x5a4127[_0x3bcc54];return _0x1e826b;}import a204_0x34cd65 from'node:fs';import a204_0x45899a from'node:path';import{logger}from'../utils/logger.js';function a204_0x5a41(){const _0x23a1fc=['mkdir','getMinutes','name','processFile','66WMNHLa','processDirectory','replace','.tpl','replaceApiContent','success','readFile','2828160zjvWJX','.js','datasetCode','map','.jsx','endsWith','push','getSeconds','api','toComponentName','tableName','.md','name:\x20\x22','7773775GfdSZA','split','charAt','writeFile','copyFile','alias:\x20\x22','promises','模板内容替换完成','141462vMhqnt','processTemplate','pad','message','.tsx','default','tableName:\x20\x22','utf8','extname','formatLocalTimestamp','pop','1VRGNzI','toDisplayTitle','57596AkDKLB','16otKEve','alias','14959360zyuiea','join','padStart','3369520yFVKjm','datasetCode:\x20\x22','getHours','3366976EBtNWc','toUpperCase','isDirectory','toLowerCase','LOVRABET','replaceContent','slice','template','info','YourModel','.json','now','getDate','includes'];a204_0x5a41=function(){return _0x23a1fc;};return a204_0x5a41();}import{getCliVersion}from'../utils/version.js';const CLI_VERSION=getCliVersion();export class TemplateReplacer{static[a204_0x57a081(0x16c)](_0x34b578){const _0x37051c=a204_0x57a081;return String(_0x34b578)[_0x37051c(0x17c)](0x2,'0');}static['formatLocalTimestamp'](_0x5987f8){const _0xff1cc8=a204_0x57a081,_0x50192c=_0x5987f8['getFullYear'](),_0x4392f1=this[_0xff1cc8(0x16c)](_0x5987f8['getMonth']()+0x1),_0x583936=this['pad'](_0x5987f8[_0xff1cc8(0x148)]()),_0x23935c=this['pad'](_0x5987f8[_0xff1cc8(0x17f)]()),_0x5525a3=this[_0xff1cc8(0x16c)](_0x5987f8[_0xff1cc8(0x14b)]()),_0x37eb64=this[_0xff1cc8(0x16c)](_0x5987f8[_0xff1cc8(0x15c)]());return{'createdAt':_0x50192c+'-'+_0x4392f1+'-'+_0x583936+'\x20'+_0x23935c+':'+_0x5525a3+':'+_0x37eb64,'createdDate':_0x50192c+'-'+_0x4392f1+'-'+_0x583936,'createdTime':_0x23935c+':'+_0x5525a3+':'+_0x37eb64};}static[a204_0x57a081(0x15e)](_0x5eaf56){const _0x303395=a204_0x57a081,_0x5d0260=_0x5eaf56[_0x303395(0x163)]('/')[_0x303395(0x174)]()||_0x5eaf56;return _0x5d0260['split']('-')[_0x303395(0x158)](_0x215496=>_0x215496['charAt'](0x0)[_0x303395(0x181)]()+_0x215496[_0x303395(0x142)](0x1)['toLowerCase']())[_0x303395(0x17b)]('');}static[a204_0x57a081(0x176)](_0x785f52){const _0x242156=a204_0x57a081,_0x52a5bf=_0x785f52[_0x242156(0x163)]('/')[_0x242156(0x174)]()||_0x785f52;return _0x52a5bf[_0x242156(0x163)]('-')[_0x242156(0x158)](_0x3c9206=>_0x3c9206[_0x242156(0x164)](0x0)[_0x242156(0x181)]()+_0x3c9206[_0x242156(0x142)](0x1)[_0x242156(0x183)]())['join']('\x20');}static[a204_0x57a081(0x141)](_0x2eae30,_0x115277,_0x12f734){const _0xcdcf00=a204_0x57a081,_0x27a4e9=this['toComponentName'](_0x115277),_0x434581=this[_0xcdcf00(0x176)](_0x115277),{createdAt:_0x4b344a,createdDate:_0xd7d5e4,createdTime:_0x313324}=this[_0xcdcf00(0x173)](new Date());let _0x2895a7=_0x2eae30['replace'](/\{CliVersion\}/g,CLI_VERSION)['replace'](/\{ComponentName\}/g,_0x27a4e9)[_0xcdcf00(0x150)](/\{DisplayTitle\}/g,_0x434581)[_0xcdcf00(0x150)](/\{PageName\}/g,_0x115277)['replace'](/\{TemplateName\}/g,_0x12f734)[_0xcdcf00(0x150)](/\{CreatedAt\}/g,_0x4b344a)[_0xcdcf00(0x150)](/\{CreatedDate\}/g,_0xd7d5e4)[_0xcdcf00(0x150)](/\{CreatedTime\}/g,_0x313324);return _0x2895a7;}static[a204_0x57a081(0x152)](_0xbc40f2,_0x40359a,_0x4cf74d,_0x475d44,_0x8b63d9,_0x108038,_0x48f9eb,_0x153026){const _0x45f5ba=a204_0x57a081,_0x32697f=new Date(),_0x5931f7=_0x32697f['toISOString'](),_0x2b5832=_0x4cf74d[_0x45f5ba(0x158)](_0x6d57a7=>{const _0x56fbec=_0x45f5ba,_0x523a04=[_0x56fbec(0x17e)+_0x6d57a7[_0x56fbec(0x157)]+'\x22',_0x56fbec(0x170)+_0x6d57a7[_0x56fbec(0x15f)]+'\x22',_0x56fbec(0x161)+_0x6d57a7[_0x56fbec(0x14c)]+'\x22'];return _0x6d57a7[_0x56fbec(0x179)]&&_0x523a04[_0x56fbec(0x15b)](_0x56fbec(0x167)+_0x6d57a7['alias']+'\x22'),'\x0a\x20\x20\x20\x20{\x20'+_0x523a04['join'](',\x20')+'\x20},';})['join'](''),_0x57c1f3=_0x475d44||_0x4cf74d[0x0]?.[_0x45f5ba(0x179)]||_0x45f5ba(0x145);let _0x42ba79=_0xbc40f2['replace'](/\{AppCode\}/g,_0x40359a)[_0x45f5ba(0x150)](/\{ModelConfigs\}/g,_0x2b5832)[_0x45f5ba(0x150)](/\{ExampleModelName\}/g,_0x57c1f3)[_0x45f5ba(0x150)](/\{ApiFileName\}/g,_0x8b63d9||_0x45f5ba(0x15d))[_0x45f5ba(0x150)](/\{ConfigName\}/g,_0x108038||_0x45f5ba(0x16f))['replace'](/\{ClientConfigParam\}/g,_0x48f9eb||'')[_0x45f5ba(0x150)](/\{VarPrefix\}/g,_0x153026||_0x45f5ba(0x140))['replace'](/\{CreatedAt\}/g,_0x5931f7);return _0x42ba79;}static async[a204_0x57a081(0x16b)](_0x5827e2,_0x5ddd7c,_0x56dc6f,_0x31c8f1,_0x273221=!![]){const _0x10d7e1=a204_0x57a081,_0x4eb878=Date[_0x10d7e1(0x147)]();try{_0x273221&&logger[_0x10d7e1(0x144)](_0x10d7e1(0x143),'开始处理模板内容替换',{'templatePath':_0x5827e2,'targetPath':_0x5ddd7c,'pageName':_0x56dc6f,'templateName':_0x31c8f1});await a204_0x34cd65[_0x10d7e1(0x168)][_0x10d7e1(0x14a)](_0x5ddd7c,{'recursive':!![]}),await this[_0x10d7e1(0x14f)](_0x5827e2,_0x5ddd7c,_0x56dc6f,_0x31c8f1);if(_0x273221){const _0x2ac5b7=Date['now']()-_0x4eb878;logger[_0x10d7e1(0x153)](_0x10d7e1(0x143),_0x10d7e1(0x169),_0x2ac5b7,{'pageName':_0x56dc6f,'templateName':_0x31c8f1});}}catch(_0xb9b815){if(_0x273221){const _0x5a1236=Date[_0x10d7e1(0x147)]()-_0x4eb878;logger['error'](_0x10d7e1(0x143),'模板内容替换失败',{'templatePath':_0x5827e2,'targetPath':_0x5ddd7c,'pageName':_0x56dc6f,'templateName':_0x31c8f1,'error':_0xb9b815 instanceof Error?_0xb9b815[_0x10d7e1(0x16d)]:String(_0xb9b815),'duration':_0x5a1236});}throw _0xb9b815;}}static async[a204_0x57a081(0x14f)](_0x58720a,_0x392b99,_0x49b190,_0x4666bc){const _0x3681a6=a204_0x57a081,_0x5ed926=await a204_0x34cd65[_0x3681a6(0x168)]['readdir'](_0x58720a,{'withFileTypes':!![]});for(const _0x1b0143 of _0x5ed926){const _0x28c2ca=a204_0x45899a['join'](_0x58720a,_0x1b0143['name']);let _0xf4b9b1=a204_0x45899a[_0x3681a6(0x17b)](_0x392b99,_0x1b0143[_0x3681a6(0x14c)]);_0x1b0143[_0x3681a6(0x14c)][_0x3681a6(0x15a)](_0x3681a6(0x151))&&(_0xf4b9b1=a204_0x45899a[_0x3681a6(0x17b)](_0x392b99,_0x1b0143[_0x3681a6(0x14c)][_0x3681a6(0x150)](/\.tpl$/,'')));if(_0x1b0143[_0x3681a6(0x182)]())await a204_0x34cd65['promises'][_0x3681a6(0x14a)](_0xf4b9b1,{'recursive':!![]}),await this[_0x3681a6(0x14f)](_0x28c2ca,_0xf4b9b1,_0x49b190,_0x4666bc);else _0x1b0143['isFile']()&&await this[_0x3681a6(0x14d)](_0x28c2ca,_0xf4b9b1,_0x49b190,_0x4666bc);}}static async[a204_0x57a081(0x14d)](_0x287728,_0x32be25,_0x586dff,_0x3f80fb){const _0xe516b9=a204_0x57a081,_0x8f4326=a204_0x45899a[_0xe516b9(0x172)](_0x287728)[_0xe516b9(0x183)]();_0x287728[_0xe516b9(0x15a)]('.tpl')&&(_0x32be25=_0x32be25[_0xe516b9(0x150)](/\.tpl$/,''));const _0x44033e=[_0xe516b9(0x16e),'.ts',_0xe516b9(0x159),_0xe516b9(0x156),_0xe516b9(0x146),_0xe516b9(0x160),'.css','.scss',_0xe516b9(0x151)];if(_0x44033e[_0xe516b9(0x149)](_0x8f4326)||_0x287728[_0xe516b9(0x15a)](_0xe516b9(0x151))){const _0x15dfa1=await a204_0x34cd65[_0xe516b9(0x168)][_0xe516b9(0x154)](_0x287728,_0xe516b9(0x171)),_0x44f0f6=this[_0xe516b9(0x141)](_0x15dfa1,_0x586dff,_0x3f80fb);await a204_0x34cd65[_0xe516b9(0x168)][_0xe516b9(0x165)](_0x32be25,_0x44f0f6,'utf8');}else await a204_0x34cd65[_0xe516b9(0x168)][_0xe516b9(0x166)](_0x287728,_0x32be25);}}
@@ -1 +1 @@
1
- (function(_0x51f917,_0x3fd56c){const _0x13cb91=a205_0x55d5,_0x388112=_0x51f917();while(!![]){try{const _0x43acb1=-parseInt(_0x13cb91(0x77))/0x1*(parseInt(_0x13cb91(0x78))/0x2)+parseInt(_0x13cb91(0x7d))/0x3*(parseInt(_0x13cb91(0x73))/0x4)+-parseInt(_0x13cb91(0x8f))/0x5+parseInt(_0x13cb91(0x7f))/0x6+-parseInt(_0x13cb91(0x7c))/0x7*(parseInt(_0x13cb91(0x79))/0x8)+parseInt(_0x13cb91(0x90))/0x9*(parseInt(_0x13cb91(0x83))/0xa)+-parseInt(_0x13cb91(0x89))/0xb;if(_0x43acb1===_0x3fd56c)break;else _0x388112['push'](_0x388112['shift']());}catch(_0x4471fc){_0x388112['push'](_0x388112['shift']());}}}(a205_0x298e,0x5a355));import{mkdir,readFile,writeFile}from'node:fs/promises';import{homedir}from'node:os';import{dirname,join}from'node:path';import a205_0x4c1e96 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 a205_0x55d5(_0x177ada,_0x57cbad){_0x177ada=_0x177ada-0x72;const _0x298ea0=a205_0x298e();let _0x55d5df=_0x298ea0[_0x177ada];return _0x55d5df;}function isUpdateNoticeDisabled(){const _0x471451=a205_0x55d5,_0x1c95d8=process.env.RABETBASE_NO_UPDATE_NOTICE?.['trim']()[_0x471451(0x86)]();return _0x1c95d8==='1'||_0x1c95d8===_0x471451(0x88)||_0x1c95d8==='yes';}function cacheRoot(){const _0x1cff3a=a205_0x55d5;return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),_0x1cff3a(0x85));}export function getUpdateNoticeCachePath(){const _0x33b892=a205_0x55d5;return join(cacheRoot(),_0x33b892(0x8a),_0x33b892(0x8d));}async function readUpdateNoticeCache(){const _0x19a769=a205_0x55d5;try{const _0x2256c8=await readFile(getUpdateNoticeCachePath(),_0x19a769(0x7e)),_0x2afd2b=JSON['parse'](_0x2256c8);if(!_0x2afd2b||typeof _0x2afd2b!=='object')return{};return _0x2afd2b;}catch{return{};}}async function writeUpdateNoticeCache(_0x1c56be){const _0x5b4178=a205_0x55d5;try{const _0x7f624c=getUpdateNoticeCachePath();await mkdir(dirname(_0x7f624c),{'recursive':!![]}),await writeFile(_0x7f624c,JSON[_0x5b4178(0x8e)](_0x1c56be,null,0x2)+'\x0a',_0x5b4178(0x7e));}catch{}}function isFreshCheck(_0x278e24,_0x372992){const _0x5669e2=a205_0x55d5;return typeof _0x278e24[_0x5669e2(0x8c)]===_0x5669e2(0x84)&&_0x372992-_0x278e24[_0x5669e2(0x8c)]<UPDATE_CHECK_TTL_MS;}function a205_0x298e(){const _0x374188=['4sZTMpY','trim','https://www.npmjs.com/package/','now','1BhxiUE','80638OOKBxr','56UuUBAa','gte','valid','251531mARCaj','925887VmUnYt','utf8','2178090liUXmh','\x20available,\x20current\x20','lastNotifiedAt','latest','587880qCLDXm','number','.cache','toLowerCase','stableVersion','true','5319138coONpc','rabetbase-cli','\x20update','checkedAt','update-check.json','stringify','279175wTMpGE','81mRZUlp','lastNotifiedVersion'];a205_0x298e=function(){return _0x374188;};return a205_0x298e();}function isRecentlyNotified(_0x2f1b44,_0x2601e3,_0x2834a8){const _0x5d7efe=a205_0x55d5;return _0x2f1b44[_0x5d7efe(0x72)]===_0x2601e3&&typeof _0x2f1b44[_0x5d7efe(0x81)]===_0x5d7efe(0x84)&&_0x2834a8-_0x2f1b44[_0x5d7efe(0x81)]<UPDATE_NOTICE_TTL_MS;}export function buildNpmVersionUrl(_0x1222bb){const _0x45595d=a205_0x55d5;return _0x45595d(0x75)+NPM_PACKAGE_NAME+'/v/'+_0x1222bb;}export async function resolveLatestUpdateNotice(){const _0x514e84=a205_0x55d5;if(isUpdateNoticeDisabled())return null;try{const _0xc1da37=Date[_0x514e84(0x76)](),_0x4ecfe5=getCliVersion(),_0x49076b=await readUpdateNoticeCache();let _0x2669b8=isFreshCheck(_0x49076b,_0xc1da37)?_0x49076b[_0x514e84(0x82)]?.['trim']():undefined;if(!_0x2669b8&&!isFreshCheck(_0x49076b,_0xc1da37)){const _0x565bb5=await getCliVersionPolicy();_0x2669b8=_0x565bb5?.[_0x514e84(0x87)]?.[_0x514e84(0x74)]()||undefined,await writeUpdateNoticeCache({..._0x49076b,'checkedAt':_0xc1da37,'latest':_0x2669b8,'failed':!_0x2669b8});}if(!_0x2669b8||!a205_0x4c1e96['valid'](_0x4ecfe5)||!a205_0x4c1e96[_0x514e84(0x7b)](_0x2669b8))return null;if(a205_0x4c1e96[_0x514e84(0x7a)](_0x4ecfe5,_0x2669b8))return null;if(isRecentlyNotified(_0x49076b,_0x2669b8,_0xc1da37))return null;const _0x2e6ad4=CLI_BIN_NAME+_0x514e84(0x8b);return await writeUpdateNoticeCache({..._0x49076b,'checkedAt':isFreshCheck(_0x49076b,_0xc1da37)?_0x49076b[_0x514e84(0x8c)]:_0xc1da37,'latest':_0x2669b8,'failed':![],'lastNotifiedVersion':_0x2669b8,'lastNotifiedAt':_0xc1da37}),{'command':_0x2e6ad4,'current':_0x4ecfe5,'latest':_0x2669b8,'url':buildNpmVersionUrl(_0x2669b8),'message':CLI_BIN_NAME+'\x20'+_0x2669b8+_0x514e84(0x80)+_0x4ecfe5+',\x20run:\x20'+_0x2e6ad4};}catch{return null;}}
1
+ function a205_0x931d(_0x376d37,_0x38b9e2){_0x376d37=_0x376d37-0x125;const _0x3af2d0=a205_0x3af2();let _0x931d35=_0x3af2d0[_0x376d37];return _0x931d35;}(function(_0x483027,_0x5e7fc3){const _0x348d02=a205_0x931d,_0x335bc4=_0x483027();while(!![]){try{const _0x29783a=parseInt(_0x348d02(0x12d))/0x1*(-parseInt(_0x348d02(0x132))/0x2)+parseInt(_0x348d02(0x138))/0x3+parseInt(_0x348d02(0x126))/0x4*(parseInt(_0x348d02(0x13f))/0x5)+-parseInt(_0x348d02(0x129))/0x6+-parseInt(_0x348d02(0x13d))/0x7+-parseInt(_0x348d02(0x12e))/0x8+parseInt(_0x348d02(0x13b))/0x9;if(_0x29783a===_0x5e7fc3)break;else _0x335bc4['push'](_0x335bc4['shift']());}catch(_0x5a4f1f){_0x335bc4['push'](_0x335bc4['shift']());}}}(a205_0x3af2,0x9c03c));import{mkdir,readFile,writeFile}from'node:fs/promises';import{homedir}from'node:os';function a205_0x3af2(){const _0x29c064=['16670700Nuyema','\x20available,\x20current\x20','2105810FEyMll','lastNotifiedAt','212465ZaooIL','utf8','24jRyzgx','toLowerCase','true','6365982zYjBFl','update-check.json','gte','stableVersion','674lcstQH','4695384lEnwnQ','now','object','trim','1676mPLjyK','checkedAt','https://www.npmjs.com/package/','yes','number','stringify','3136020CRwUbM','valid','rabetbase-cli'];a205_0x3af2=function(){return _0x29c064;};return a205_0x3af2();}import{dirname,join}from'node:path';import a205_0x5b33d9 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 _0xdecf75=a205_0x931d,_0xc481c0=process.env.RABETBASE_NO_UPDATE_NOTICE?.[_0xdecf75(0x131)]()[_0xdecf75(0x127)]();return _0xc481c0==='1'||_0xc481c0===_0xdecf75(0x128)||_0xc481c0===_0xdecf75(0x135);}function cacheRoot(){return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),'.cache');}export function getUpdateNoticeCachePath(){const _0x124be8=a205_0x931d;return join(cacheRoot(),_0x124be8(0x13a),_0x124be8(0x12a));}async function readUpdateNoticeCache(){const _0x56caa9=a205_0x931d;try{const _0x4672d3=await readFile(getUpdateNoticeCachePath(),_0x56caa9(0x125)),_0x221a04=JSON['parse'](_0x4672d3);if(!_0x221a04||typeof _0x221a04!==_0x56caa9(0x130))return{};return _0x221a04;}catch{return{};}}async function writeUpdateNoticeCache(_0x1c83f5){const _0x208336=a205_0x931d;try{const _0x456670=getUpdateNoticeCachePath();await mkdir(dirname(_0x456670),{'recursive':!![]}),await writeFile(_0x456670,JSON[_0x208336(0x137)](_0x1c83f5,null,0x2)+'\x0a',_0x208336(0x125));}catch{}}function isFreshCheck(_0x2218b9,_0xf6be5c){const _0x41b1e9=a205_0x931d;return typeof _0x2218b9[_0x41b1e9(0x133)]===_0x41b1e9(0x136)&&_0xf6be5c-_0x2218b9[_0x41b1e9(0x133)]<UPDATE_CHECK_TTL_MS;}function isRecentlyNotified(_0x473174,_0x1b0870,_0xe2a407){const _0x124eaf=a205_0x931d;return _0x473174['lastNotifiedVersion']===_0x1b0870&&typeof _0x473174['lastNotifiedAt']===_0x124eaf(0x136)&&_0xe2a407-_0x473174[_0x124eaf(0x13e)]<UPDATE_NOTICE_TTL_MS;}export function buildNpmVersionUrl(_0x53726a){const _0x50619e=a205_0x931d;return _0x50619e(0x134)+NPM_PACKAGE_NAME+'/v/'+_0x53726a;}export async function resolveLatestUpdateNotice(){const _0x44e05e=a205_0x931d;if(isUpdateNoticeDisabled())return null;try{const _0x596584=Date[_0x44e05e(0x12f)](),_0x36b4b3=getCliVersion(),_0x1e41e3=await readUpdateNoticeCache();let _0x4e4423=isFreshCheck(_0x1e41e3,_0x596584)?_0x1e41e3['latest']?.[_0x44e05e(0x131)]():undefined;if(!_0x4e4423&&!isFreshCheck(_0x1e41e3,_0x596584)){const _0x2faf17=await getCliVersionPolicy();_0x4e4423=_0x2faf17?.[_0x44e05e(0x12c)]?.['trim']()||undefined,await writeUpdateNoticeCache({..._0x1e41e3,'checkedAt':_0x596584,'latest':_0x4e4423,'failed':!_0x4e4423});}if(!_0x4e4423||!a205_0x5b33d9[_0x44e05e(0x139)](_0x36b4b3)||!a205_0x5b33d9['valid'](_0x4e4423))return null;if(a205_0x5b33d9[_0x44e05e(0x12b)](_0x36b4b3,_0x4e4423))return null;if(isRecentlyNotified(_0x1e41e3,_0x4e4423,_0x596584))return null;const _0x21d86d=CLI_BIN_NAME+'\x20update';return await writeUpdateNoticeCache({..._0x1e41e3,'checkedAt':isFreshCheck(_0x1e41e3,_0x596584)?_0x1e41e3[_0x44e05e(0x133)]:_0x596584,'latest':_0x4e4423,'failed':![],'lastNotifiedVersion':_0x4e4423,'lastNotifiedAt':_0x596584}),{'command':_0x21d86d,'current':_0x36b4b3,'latest':_0x4e4423,'url':buildNpmVersionUrl(_0x4e4423),'message':CLI_BIN_NAME+'\x20'+_0x4e4423+_0x44e05e(0x13c)+_0x36b4b3+',\x20run:\x20'+_0x21d86d};}catch{return null;}}
@@ -1 +1 @@
1
- (function(_0xb0a99a,_0x1dbd7b){var _0x2e551a=a206_0x77f1,_0x2e0da3=_0xb0a99a();while(!![]){try{var _0x47dd00=parseInt(_0x2e551a(0x75))/0x1*(parseInt(_0x2e551a(0x6f))/0x2)+-parseInt(_0x2e551a(0x6e))/0x3*(-parseInt(_0x2e551a(0x77))/0x4)+parseInt(_0x2e551a(0x74))/0x5+-parseInt(_0x2e551a(0x70))/0x6+parseInt(_0x2e551a(0x76))/0x7+parseInt(_0x2e551a(0x71))/0x8+parseInt(_0x2e551a(0x73))/0x9*(-parseInt(_0x2e551a(0x72))/0xa);if(_0x47dd00===_0x1dbd7b)break;else _0x2e0da3['push'](_0x2e0da3['shift']());}catch(_0x331f8b){_0x2e0da3['push'](_0x2e0da3['shift']());}}}(a206_0x326a,0xa389a));function a206_0x77f1(_0x59f632,_0xd9376b){_0x59f632=_0x59f632-0x6e;var _0x326ac3=a206_0x326a();var _0x77f1e5=_0x326ac3[_0x59f632];return _0x77f1e5;}import{VERSION}from'../generated/build-info.js';export function getCliVersion(){return VERSION;}function a206_0x326a(){var _0xd42fa6=['8207328uGbiTw','18736070EqvAsw','9omPYho','771705wtQIKT','151SkLHAh','1874908Eegzvi','1959956frVsxz','3fGNERS','17020jVacOC','4077858EWSQpO'];a206_0x326a=function(){return _0xd42fa6;};return a206_0x326a();}
1
+ (function(_0x44795c,_0x13bb1b){var _0x1b1adf=a206_0x49a1,_0x584293=_0x44795c();while(!![]){try{var _0x20b430=-parseInt(_0x1b1adf(0x1c7))/0x1*(parseInt(_0x1b1adf(0x1ca))/0x2)+parseInt(_0x1b1adf(0x1cc))/0x3*(parseInt(_0x1b1adf(0x1c2))/0x4)+-parseInt(_0x1b1adf(0x1c8))/0x5*(parseInt(_0x1b1adf(0x1c1))/0x6)+-parseInt(_0x1b1adf(0x1cb))/0x7+parseInt(_0x1b1adf(0x1c5))/0x8*(parseInt(_0x1b1adf(0x1c9))/0x9)+parseInt(_0x1b1adf(0x1c3))/0xa*(-parseInt(_0x1b1adf(0x1c4))/0xb)+parseInt(_0x1b1adf(0x1c6))/0xc;if(_0x20b430===_0x13bb1b)break;else _0x584293['push'](_0x584293['shift']());}catch(_0x40af7a){_0x584293['push'](_0x584293['shift']());}}}(a206_0x4141,0x4033f));import{VERSION}from'../generated/build-info.js';function a206_0x4141(){var _0x358670=['382722KMzSey','4qYPDuo','830KCdofg','1639uwGysB','56tQXvOU','1399320FQDMkv','3Ddmdfs','5fEmPAn','152667wQxBMV','12794ZJkRQe','325339vthWHM','508338rgaVOV'];a206_0x4141=function(){return _0x358670;};return a206_0x4141();}function a206_0x49a1(_0x4b4da9,_0x4829e5){_0x4b4da9=_0x4b4da9-0x1c1;var _0x414103=a206_0x4141();var _0x49a105=_0x414103[_0x4b4da9];return _0x49a105;}export function getCliVersion(){return VERSION;}
@@ -1 +1 @@
1
- (function(_0x437703,_0x2f5153){var _0x5e59dd=a207_0x15fd,_0x4a8034=_0x437703();while(!![]){try{var _0x490e5b=parseInt(_0x5e59dd(0x1ee))/0x1+parseInt(_0x5e59dd(0x1ed))/0x2+-parseInt(_0x5e59dd(0x1eb))/0x3+-parseInt(_0x5e59dd(0x1ef))/0x4+parseInt(_0x5e59dd(0x1ec))/0x5*(parseInt(_0x5e59dd(0x1e8))/0x6)+-parseInt(_0x5e59dd(0x1ea))/0x7*(-parseInt(_0x5e59dd(0x1e9))/0x8)+-parseInt(_0x5e59dd(0x1f0))/0x9;if(_0x490e5b===_0x2f5153)break;else _0x4a8034['push'](_0x4a8034['shift']());}catch(_0x52fce7){_0x4a8034['push'](_0x4a8034['shift']());}}}(a207_0x3eba,0x72d9e));function a207_0x15fd(_0x49539b,_0x1e82d0){_0x49539b=_0x49539b-0x1e8;var _0x3eba6a=a207_0x3eba();var _0x15fd3f=_0x3eba6a[_0x49539b];return _0x15fd3f;}import{setActiveCookie,clearActiveCookie}from'../core/api-client.js';export async function withActiveCookie(_0x4f0a64,_0x305b29){setActiveCookie(_0x4f0a64);try{return await _0x305b29();}finally{clearActiveCookie();}}function a207_0x3eba(){var _0x304842=['2444133eLcOHy','33815mFQoJe','1615574yFXqei','593490XewWRZ','2643720PncSQu','7250175gDZDxK','450wyGYSn','118336tyJmfL','399qXIGCD'];a207_0x3eba=function(){return _0x304842;};return a207_0x3eba();}
1
+ (function(_0x28c2df,_0x3db110){var _0x210df4=a207_0x5d58,_0x5b65e9=_0x28c2df();while(!![]){try{var _0x1db83a=parseInt(_0x210df4(0x70))/0x1+parseInt(_0x210df4(0x77))/0x2*(-parseInt(_0x210df4(0x76))/0x3)+parseInt(_0x210df4(0x71))/0x4*(-parseInt(_0x210df4(0x72))/0x5)+-parseInt(_0x210df4(0x73))/0x6*(parseInt(_0x210df4(0x6d))/0x7)+-parseInt(_0x210df4(0x74))/0x8+parseInt(_0x210df4(0x6e))/0x9+-parseInt(_0x210df4(0x6f))/0xa*(-parseInt(_0x210df4(0x75))/0xb);if(_0x1db83a===_0x3db110)break;else _0x5b65e9['push'](_0x5b65e9['shift']());}catch(_0x3c076b){_0x5b65e9['push'](_0x5b65e9['shift']());}}}(a207_0x10e8,0x320b0));function a207_0x5d58(_0x2cd9dc,_0x3d7d03){_0x2cd9dc=_0x2cd9dc-0x6d;var _0x10e8a8=a207_0x10e8();var _0x5d58b8=_0x10e8a8[_0x2cd9dc];return _0x5d58b8;}import{setActiveCookie,clearActiveCookie}from'../core/api-client.js';export async function withActiveCookie(_0x9c2a52,_0x3baeb0){setActiveCookie(_0x9c2a52);try{return await _0x3baeb0();}finally{clearActiveCookie();}}function a207_0x10e8(){var _0x3e40ae=['709076EngrZb','10dHKcMg','486LcutRg','175992PmCshh','2585fsKvGJ','24DEdZbo','22796zevEfO','22281EFErBD','1459926QeYTPD','18820uCmPjy','326036LeYLPF'];a207_0x10e8=function(){return _0x3e40ae;};return a207_0x10e8();}
@@ -1 +1 @@
1
- function a208_0x1494(_0x59c8fe,_0x47daba){_0x59c8fe=_0x59c8fe-0x1ac;var _0x47e4b3=a208_0x47e4();var _0x149480=_0x47e4b3[_0x59c8fe];return _0x149480;}function a208_0x47e4(){var _0x4a5f52=['3838688xUrgKb','write','59792PAvgVf','502607wgACor','stderr','205xiqPhl','1570404NDiXEF','99946Jcrrut','3458226qFXfGI','135krUWdY','681080SwEWig'];a208_0x47e4=function(){return _0x4a5f52;};return a208_0x47e4();}(function(_0x437787,_0x2e1e91){var _0xf0ca70=a208_0x1494,_0xcaf0ff=_0x437787();while(!![]){try{var _0x169ca6=parseInt(_0xf0ca70(0x1b4))/0x1+parseInt(_0xf0ca70(0x1ad))/0x2+parseInt(_0xf0ca70(0x1ac))/0x3+parseInt(_0xf0ca70(0x1b3))/0x4*(-parseInt(_0xf0ca70(0x1b6))/0x5)+parseInt(_0xf0ca70(0x1ae))/0x6+parseInt(_0xf0ca70(0x1b1))/0x7+-parseInt(_0xf0ca70(0x1b0))/0x8*(parseInt(_0xf0ca70(0x1af))/0x9);if(_0x169ca6===_0x2e1e91)break;else _0xcaf0ff['push'](_0xcaf0ff['shift']());}catch(_0x3f8e6c){_0xcaf0ff['push'](_0xcaf0ff['shift']());}}}(a208_0x47e4,0x4be7e));export function writeCliSideChannelLine(_0x37af1b){var _0x3d279a=a208_0x1494;process[_0x3d279a(0x1b5)][_0x3d279a(0x1b2)](_0x37af1b+'\x0a');}
1
+ function a208_0x120f(){var _0x1722e6=['55048KlCNgC','4JdlksB','stderr','552905YPjlNC','342JCPbYy','102840jUbxKc','2166520CgOedy','18lFQEgD','210823kHGdbG','931pgzCkA','write','346290GbzZss'];a208_0x120f=function(){return _0x1722e6;};return a208_0x120f();}function a208_0x555d(_0x3887c0,_0x450207){_0x3887c0=_0x3887c0-0x99;var _0x120f40=a208_0x120f();var _0x555da3=_0x120f40[_0x3887c0];return _0x555da3;}(function(_0x13eab2,_0x27d934){var _0x222680=a208_0x555d,_0x497790=_0x13eab2();while(!![]){try{var _0x4bb5a1=-parseInt(_0x222680(0x9a))/0x1+-parseInt(_0x222680(0x9d))/0x2+-parseInt(_0x222680(0xa3))/0x3+parseInt(_0x222680(0x9f))/0x4*(parseInt(_0x222680(0xa1))/0x5)+-parseInt(_0x222680(0xa2))/0x6*(-parseInt(_0x222680(0x9b))/0x7)+-parseInt(_0x222680(0x9e))/0x8+parseInt(_0x222680(0x99))/0x9*(parseInt(_0x222680(0xa4))/0xa);if(_0x4bb5a1===_0x27d934)break;else _0x497790['push'](_0x497790['shift']());}catch(_0x38fa70){_0x497790['push'](_0x497790['shift']());}}}(a208_0x120f,0x1ed81));export function writeCliSideChannelLine(_0x341198){var _0x1424cc=a208_0x555d;process[_0x1424cc(0xa0)][_0x1424cc(0x9c)](_0x341198+'\x0a');}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lovrabet/rabetbase-cli",
3
- "version": "2.2.4-beta.1",
3
+ "version": "2.2.4-beta.3",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "repository": {
6
6
  "type": "git",