@lovrabet/rabetbase-cli 2.0.8 → 2.0.10

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 (138) 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/logout.js +1 -1
  11. package/lib/cli-flags.js +1 -1
  12. package/lib/cli.js +1 -1
  13. package/lib/commands/api/doc.js +1 -1
  14. package/lib/commands/api/index.js +1 -1
  15. package/lib/commands/api/list.js +1 -1
  16. package/lib/commands/api/pull.js +1 -1
  17. package/lib/commands/api/shared.js +1 -1
  18. package/lib/commands/app/add.js +1 -1
  19. package/lib/commands/app/index.js +1 -1
  20. package/lib/commands/app/list.js +1 -1
  21. package/lib/commands/app/remote.js +1 -1
  22. package/lib/commands/app/remove.js +1 -1
  23. package/lib/commands/app/shared.js +1 -1
  24. package/lib/commands/app/use.js +1 -1
  25. package/lib/commands/auth/index.js +1 -1
  26. package/lib/commands/bff/delete.js +1 -1
  27. package/lib/commands/bff/detail.js +1 -1
  28. package/lib/commands/bff/index.js +1 -1
  29. package/lib/commands/bff/list.js +1 -1
  30. package/lib/commands/bff/new.js +1 -1
  31. package/lib/commands/bff/pull.js +1 -1
  32. package/lib/commands/bff/push.js +1 -1
  33. package/lib/commands/bff/status.js +1 -1
  34. package/lib/commands/cli-update.js +1 -1
  35. package/lib/commands/codegen/index.js +1 -1
  36. package/lib/commands/codegen/sdk.js +1 -1
  37. package/lib/commands/codegen/sql.js +1 -1
  38. package/lib/commands/common/app-selector.js +1 -1
  39. package/lib/commands/common/flags.js +1 -1
  40. package/lib/commands/common/validate.js +1 -1
  41. package/lib/commands/config/get.js +1 -1
  42. package/lib/commands/config/index.js +1 -1
  43. package/lib/commands/config/list.js +1 -1
  44. package/lib/commands/config/set.js +1 -1
  45. package/lib/commands/config/shared.js +1 -1
  46. package/lib/commands/dataset/detail.js +1 -1
  47. package/lib/commands/dataset/index.js +1 -1
  48. package/lib/commands/dataset/links.js +1 -1
  49. package/lib/commands/dataset/list.js +1 -1
  50. package/lib/commands/dataset/operations.js +1 -1
  51. package/lib/commands/doctor.js +1 -1
  52. package/lib/commands/init/index.js +1 -1
  53. package/lib/commands/logs/index.js +1 -1
  54. package/lib/commands/menu/index.js +1 -1
  55. package/lib/commands/menu/shared/compare-table.js +1 -1
  56. package/lib/commands/menu/shared/index.js +1 -1
  57. package/lib/commands/menu/shared/inquirer.js +1 -1
  58. package/lib/commands/menu/shared/local-pages.js +1 -1
  59. package/lib/commands/menu/shared/logic.js +1 -1
  60. package/lib/commands/menu/shared/service.js +1 -1
  61. package/lib/commands/menu/shared/sync-core.js +1 -1
  62. package/lib/commands/menu/shared/update-core.js +1 -1
  63. package/lib/commands/menu/shared/valid-url.js +1 -1
  64. package/lib/commands/menu/sync.js +1 -1
  65. package/lib/commands/menu/update.js +1 -1
  66. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  67. package/lib/commands/project/create/format-elapsed.js +1 -1
  68. package/lib/commands/project/create/main.js +1 -1
  69. package/lib/commands/project/create/non-interactive.js +1 -1
  70. package/lib/commands/project/create/project-template-path.js +1 -1
  71. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  72. package/lib/commands/project/create/use-format-code.js +1 -1
  73. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  74. package/lib/commands/project/index.js +1 -1
  75. package/lib/commands/project/init.js +1 -1
  76. package/lib/commands/project/upgrade.js +1 -1
  77. package/lib/commands/registry.js +1 -1
  78. package/lib/commands/run/index.js +1 -1
  79. package/lib/commands/schema.js +1 -1
  80. package/lib/commands/skill/index.js +1 -1
  81. package/lib/commands/sql/detail.js +1 -1
  82. package/lib/commands/sql/exec.js +1 -1
  83. package/lib/commands/sql/index.js +1 -1
  84. package/lib/commands/sql/list.js +1 -1
  85. package/lib/commands/sql/save.js +1 -1
  86. package/lib/commands/sql/validate.js +1 -1
  87. package/lib/constant/cli.js +1 -1
  88. package/lib/constant/domain.js +1 -1
  89. package/lib/constant/env.js +1 -1
  90. package/lib/constant/paths.js +1 -0
  91. package/lib/context.js +1 -1
  92. package/lib/core/alias-resolver.js +1 -1
  93. package/lib/core/api-client.js +1 -1
  94. package/lib/core/bff/config.js +1 -1
  95. package/lib/core/bff/file-system.js +1 -1
  96. package/lib/core/bff/hash.js +1 -1
  97. package/lib/core/bff/lock.js +1 -1
  98. package/lib/core/bff/utils.js +1 -1
  99. package/lib/core/db-resolver.js +1 -1
  100. package/lib/core/sql-validator.js +1 -1
  101. package/lib/errors.js +1 -1
  102. package/lib/framework/build-all-flags.js +1 -1
  103. package/lib/framework/flags.js +1 -1
  104. package/lib/framework/help.js +1 -1
  105. package/lib/framework/index.js +1 -1
  106. package/lib/framework/output.js +1 -1
  107. package/lib/framework/response.js +1 -1
  108. package/lib/framework/runner.js +1 -1
  109. package/lib/framework/schema-export.js +1 -1
  110. package/lib/framework/types.js +1 -1
  111. package/lib/generated/build-info.js +1 -1
  112. package/lib/help.js +1 -1
  113. package/lib/skills/main.js +1 -1
  114. package/lib/skills/npx-skills-add.js +1 -1
  115. package/lib/telemetry/cli-command-trace.js +1 -1
  116. package/lib/telemetry/cli-help-trace.js +1 -1
  117. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  118. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  119. package/lib/telemetry/send-cli-trace-log.js +1 -1
  120. package/lib/utils/ai_config.js +1 -1
  121. package/lib/utils/apply-jq-filter.js +1 -1
  122. package/lib/utils/cdn-config.js +1 -1
  123. package/lib/utils/check-sdk-version.js +1 -1
  124. package/lib/utils/cli-version-check.js +1 -1
  125. package/lib/utils/config.js +1 -1
  126. package/lib/utils/copy-directory.js +1 -1
  127. package/lib/utils/file-utils.js +1 -1
  128. package/lib/utils/guides-cdn.js +1 -1
  129. package/lib/utils/http-client.js +1 -1
  130. package/lib/utils/is-non-interactive.js +1 -1
  131. package/lib/utils/logger.js +1 -1
  132. package/lib/utils/platform.js +1 -1
  133. package/lib/utils/rules-cdn.js +1 -1
  134. package/lib/utils/sleep.js +1 -1
  135. package/lib/utils/template-replacer.js +1 -1
  136. package/lib/utils/version.js +1 -1
  137. package/lib/utils/with-active-cookie.js +1 -1
  138. package/package.json +5 -4
@@ -1 +1 @@
1
- function a132_0x5e7e(_0x4b9a11,_0x3276ef){_0x4b9a11=_0x4b9a11-0xd6;const _0xb390a3=a132_0xb390();let _0x5e7e0d=_0xb390a3[_0x4b9a11];return _0x5e7e0d;}const a132_0x19ea64=a132_0x5e7e;function a132_0xb390(){const _0x3e5d35=['3440073IhSzGa','2KJINxM','2556jOSwCr','yellow','map','6762742SzMFAK','error','setRawCommand','失败:\x20','existsSync','initWinstonLogger','logFilePath','readFileSync','message','writeFileSync','readLogs','stringify','clear','Failed\x20to\x20read\x20logs:','createLogger','success','6QKotUr','filter','printf','now','38690BDPkNI','mkdirSync','errors','dirname','logTask','combine','format','Failed\x20to\x20clear\x20logs:','21478140fjacBa','join','currentRawCommand','329934GxNjue','124CLMSDJ','开始执行:\x20','info','clearLogs','details','warn','完成:\x20','green','trim','File','734535InpPnE','blue','rawCommand','40PgEsLl','level','log','winstonLogger','toISOString','getWinstonInstance','utf8','24992jOIBWR','.lovrabet.log'];a132_0xb390=function(){return _0x3e5d35;};return a132_0xb390();}(function(_0x341a8d,_0x20ad57){const _0x4f090c=a132_0x5e7e,_0x1e1f84=_0x341a8d();while(!![]){try{const _0x135acb=-parseInt(_0x4f090c(0xed))/0x1+-parseInt(_0x4f090c(0xfa))/0x2*(-parseInt(_0x4f090c(0xf9))/0x3)+parseInt(_0x4f090c(0xe3))/0x4*(parseInt(_0x4f090c(0xd7))/0x5)+-parseInt(_0x4f090c(0x10e))/0x6*(parseInt(_0x4f090c(0xfe))/0x7)+parseInt(_0x4f090c(0xf7))/0x8*(-parseInt(_0x4f090c(0xfb))/0x9)+parseInt(_0x4f090c(0xf0))/0xa*(parseInt(_0x4f090c(0xe2))/0xb)+parseInt(_0x4f090c(0xdf))/0xc;if(_0x135acb===_0x20ad57)break;else _0x1e1f84['push'](_0x1e1f84['shift']());}catch(_0x5b9de4){_0x1e1f84['push'](_0x1e1f84['shift']());}}}(a132_0xb390,0xacfb5));import a132_0x1d4933 from'winston';import a132_0x1ac914 from'node:fs';import a132_0x406fcd from'node:path';class Logger{['winstonLogger'];['logFilePath'];['currentRawCommand']='';constructor(){this['logFilePath']='';}[a132_0x19ea64(0x100)](_0x4cf8ba){const _0x30abbf=a132_0x19ea64;this[_0x30abbf(0xe1)]=_0x4cf8ba;}['initWinstonLogger'](){const _0x3754bf=a132_0x19ea64,_0x3d9db3=a132_0x406fcd[_0x3754bf(0xda)](this['logFilePath']);!a132_0x1ac914[_0x3754bf(0x102)](_0x3d9db3)&&a132_0x1ac914[_0x3754bf(0xd8)](_0x3d9db3,{'recursive':!![]});const _0x3d81f7=a132_0x1d4933[_0x3754bf(0xdd)][_0x3754bf(0xdc)](a132_0x1d4933[_0x3754bf(0xdd)]['timestamp'](),a132_0x1d4933['format'][_0x3754bf(0xd9)]({'stack':!![]}),a132_0x1d4933[_0x3754bf(0xdd)][_0x3754bf(0x110)](_0x185232=>{const _0x4e6216=_0x3754bf,_0x155a75={'timestamp':_0x185232['timestamp']||new Date()[_0x4e6216(0xf4)](),'level':_0x185232[_0x4e6216(0xf1)]||_0x4e6216(0xe5),'command':_0x185232['command']||'unknown','rawCommand':_0x185232[_0x4e6216(0xef)]||this[_0x4e6216(0xe1)]||undefined,'message':_0x185232[_0x4e6216(0x106)]||'','duration':_0x185232['duration']||undefined,'details':_0x185232[_0x4e6216(0xe7)]||undefined};return JSON[_0x4e6216(0x109)](_0x155a75);}));this[_0x3754bf(0xf3)]=a132_0x1d4933[_0x3754bf(0x10c)]({'level':_0x3754bf(0xe5),'format':_0x3d81f7,'transports':[new a132_0x1d4933['transports'][(_0x3754bf(0xec))]({'filename':this[_0x3754bf(0x104)],'level':_0x3754bf(0xe5)})],'silent':![]}),a132_0x1d4933['addColors']({'success':_0x3754bf(0xea),'error':'red','warn':_0x3754bf(0xfc),'info':_0x3754bf(0xee)});}['setLogPath'](_0x5484e0){const _0x469da3=a132_0x19ea64;this[_0x469da3(0x104)]=a132_0x406fcd[_0x469da3(0xe0)](_0x5484e0,_0x469da3(0xf8)),this[_0x469da3(0xf3)]&&this['winstonLogger'][_0x469da3(0x10a)](),this[_0x469da3(0x103)]();}[a132_0x19ea64(0xe5)](_0xed2026,_0x4b6f6d,_0x3a7e54){const _0x5bbc30=a132_0x19ea64;if(!this[_0x5bbc30(0x104)]||!this[_0x5bbc30(0xf3)])return;this[_0x5bbc30(0xf3)][_0x5bbc30(0xe5)](_0x4b6f6d,{'command':_0xed2026,'details':_0x3a7e54});}['success'](_0x14319e,_0x3bf097,_0x41aa4b,_0x5de62d){const _0x25a13f=a132_0x19ea64;if(!this[_0x25a13f(0x104)]||!this[_0x25a13f(0xf3)])return;this[_0x25a13f(0xf3)][_0x25a13f(0xf2)](_0x25a13f(0xe5),_0x3bf097,{'level':_0x25a13f(0x10d),'command':_0x14319e,'duration':_0x41aa4b,'details':_0x5de62d});}[a132_0x19ea64(0xff)](_0x4bb316,_0x5cd36b,_0x13f812){const _0x528e51=a132_0x19ea64;if(!this[_0x528e51(0x104)]||!this[_0x528e51(0xf3)])return;this[_0x528e51(0xf3)][_0x528e51(0xff)](_0x5cd36b,{'command':_0x4bb316,'details':_0x13f812});}[a132_0x19ea64(0xe8)](_0x110e95,_0x3d969d,_0x15b047){const _0x272a33=a132_0x19ea64;if(!this[_0x272a33(0x104)]||!this[_0x272a33(0xf3)])return;this['winstonLogger'][_0x272a33(0xe8)](_0x3d969d,{'command':_0x110e95,'details':_0x15b047});}async[a132_0x19ea64(0xdb)](_0x1b55c2,_0x65fc18,_0x154969){const _0x22bcc9=a132_0x19ea64,_0x1efd88=Date[_0x22bcc9(0xd6)]();this['info'](_0x1b55c2,_0x22bcc9(0xe4)+_0x65fc18);try{const _0x3683ee=await _0x154969(),_0x4daec6=Date['now']()-_0x1efd88;return this[_0x22bcc9(0x10d)](_0x1b55c2,_0x22bcc9(0xe9)+_0x65fc18,_0x4daec6),_0x3683ee;}catch(_0x964ee2){const _0x556ce9=Date[_0x22bcc9(0xd6)]()-_0x1efd88;this[_0x22bcc9(0xff)](_0x1b55c2,_0x22bcc9(0x101)+_0x65fc18,{'error':_0x964ee2 instanceof Error?_0x964ee2['message']:String(_0x964ee2),'duration':_0x556ce9});throw _0x964ee2;}}[a132_0x19ea64(0x108)](){const _0x231d09=a132_0x19ea64;try{if(!a132_0x1ac914[_0x231d09(0x102)](this['logFilePath']))return[];const _0x2ffaf5=a132_0x1ac914[_0x231d09(0x105)](this[_0x231d09(0x104)],_0x231d09(0xf6));return _0x2ffaf5['split']('\x0a')[_0x231d09(0x10f)](_0x4468bc=>_0x4468bc[_0x231d09(0xeb)]())[_0x231d09(0xfd)](_0x3382fd=>JSON['parse'](_0x3382fd));}catch(_0x4e1094){return console[_0x231d09(0xe8)](_0x231d09(0x10b),_0x4e1094),[];}}[a132_0x19ea64(0xe6)](){const _0x2def7b=a132_0x19ea64;try{a132_0x1ac914['existsSync'](this[_0x2def7b(0x104)])&&a132_0x1ac914[_0x2def7b(0x107)](this[_0x2def7b(0x104)],'',_0x2def7b(0xf6));}catch(_0x75b091){console['warn'](_0x2def7b(0xde),_0x75b091);}}[a132_0x19ea64(0xf5)](){const _0x3b50d1=a132_0x19ea64;return this[_0x3b50d1(0xf3)];}}export const logger=new Logger();
1
+ const a133_0x1f377d=a133_0x17b8;(function(_0x1e93d0,_0x1bd696){const _0x4106d4=a133_0x17b8,_0x4c3282=_0x1e93d0();while(!![]){try{const _0x21fcee=-parseInt(_0x4106d4(0xdc))/0x1*(-parseInt(_0x4106d4(0xcb))/0x2)+-parseInt(_0x4106d4(0xac))/0x3*(parseInt(_0x4106d4(0xba))/0x4)+parseInt(_0x4106d4(0xc5))/0x5*(parseInt(_0x4106d4(0xb4))/0x6)+parseInt(_0x4106d4(0xdd))/0x7+parseInt(_0x4106d4(0xb0))/0x8+-parseInt(_0x4106d4(0xbf))/0x9+parseInt(_0x4106d4(0xb7))/0xa;if(_0x21fcee===_0x1bd696)break;else _0x4c3282['push'](_0x4c3282['shift']());}catch(_0x31e8ea){_0x4c3282['push'](_0x4c3282['shift']());}}}(a133_0x440f,0x28d96));import a133_0x2cecdb from'winston';import a133_0x14af57 from'node:fs';import a133_0x36f83a from'node:path';function a133_0x17b8(_0x16f568,_0x512137){_0x16f568=_0x16f568-0xa3;const _0x440f62=a133_0x440f();let _0x17b89c=_0x440f62[_0x16f568];return _0x17b89c;}class Logger{['winstonLogger'];[a133_0x1f377d(0xd7)];[a133_0x1f377d(0xae)]='';constructor(){const _0x26b5b3=a133_0x1f377d;this[_0x26b5b3(0xd7)]='';}[a133_0x1f377d(0xbd)](_0x32f411){const _0x4cc442=a133_0x1f377d;this[_0x4cc442(0xae)]=_0x32f411;}['initWinstonLogger'](){const _0x4cb9d7=a133_0x1f377d,_0x109fe6=a133_0x36f83a[_0x4cb9d7(0xcd)](this[_0x4cb9d7(0xd7)]);!a133_0x14af57[_0x4cb9d7(0xb6)](_0x109fe6)&&a133_0x14af57[_0x4cb9d7(0xd3)](_0x109fe6,{'recursive':!![]});const _0x46a68e=a133_0x2cecdb['format'][_0x4cb9d7(0xdb)](a133_0x2cecdb['format'][_0x4cb9d7(0xce)](),a133_0x2cecdb[_0x4cb9d7(0xbe)][_0x4cb9d7(0xd8)]({'stack':!![]}),a133_0x2cecdb[_0x4cb9d7(0xbe)][_0x4cb9d7(0xca)](_0x3b549b=>{const _0x1d26f2=_0x4cb9d7,_0x1f13f1={'timestamp':_0x3b549b[_0x1d26f2(0xce)]||new Date()[_0x1d26f2(0xd4)](),'level':_0x3b549b['level']||'info','command':_0x3b549b[_0x1d26f2(0xc3)]||_0x1d26f2(0xde),'rawCommand':_0x3b549b[_0x1d26f2(0xa6)]||this[_0x1d26f2(0xae)]||undefined,'message':_0x3b549b['message']||'','duration':_0x3b549b[_0x1d26f2(0xb2)]||undefined,'details':_0x3b549b[_0x1d26f2(0xa7)]||undefined};return JSON[_0x1d26f2(0xd2)](_0x1f13f1);}));this['winstonLogger']=a133_0x2cecdb['createLogger']({'level':_0x4cb9d7(0xb3),'format':_0x46a68e,'transports':[new a133_0x2cecdb[(_0x4cb9d7(0xc9))][(_0x4cb9d7(0xa5))]({'filename':this['logFilePath'],'level':'info'})],'silent':![]}),a133_0x2cecdb[_0x4cb9d7(0xaf)]({'success':_0x4cb9d7(0xd0),'error':_0x4cb9d7(0xda),'warn':_0x4cb9d7(0xc2),'info':_0x4cb9d7(0xb9)});}[a133_0x1f377d(0xc8)](_0x165330){const _0x11484c=a133_0x1f377d;this[_0x11484c(0xd7)]=a133_0x36f83a['join'](_0x165330,_0x11484c(0xcc)),this[_0x11484c(0xad)]&&this[_0x11484c(0xad)][_0x11484c(0xc6)](),this[_0x11484c(0xb1)]();}[a133_0x1f377d(0xb3)](_0x530660,_0x5eabb9,_0xb07c43){const _0x492a7e=a133_0x1f377d;if(!this[_0x492a7e(0xd7)]||!this['winstonLogger'])return;this[_0x492a7e(0xad)][_0x492a7e(0xb3)](_0x5eabb9,{'command':_0x530660,'details':_0xb07c43});}[a133_0x1f377d(0xd1)](_0x3039be,_0x5c5ff4,_0x1a32f5,_0x547bfb){const _0x87cdf2=a133_0x1f377d;if(!this[_0x87cdf2(0xd7)]||!this[_0x87cdf2(0xad)])return;this[_0x87cdf2(0xad)][_0x87cdf2(0xd5)]('info',_0x5c5ff4,{'level':'success','command':_0x3039be,'duration':_0x1a32f5,'details':_0x547bfb});}['error'](_0x16c8f8,_0x4762b0,_0x1b2f48){const _0x119a5c=a133_0x1f377d;if(!this[_0x119a5c(0xd7)]||!this['winstonLogger'])return;this[_0x119a5c(0xad)][_0x119a5c(0xa9)](_0x4762b0,{'command':_0x16c8f8,'details':_0x1b2f48});}[a133_0x1f377d(0xd9)](_0x9f3acb,_0x291c2e,_0x74aeed){const _0x5b66e8=a133_0x1f377d;if(!this[_0x5b66e8(0xd7)]||!this['winstonLogger'])return;this[_0x5b66e8(0xad)][_0x5b66e8(0xd9)](_0x291c2e,{'command':_0x9f3acb,'details':_0x74aeed});}async[a133_0x1f377d(0xbc)](_0x2de8cb,_0x571fb3,_0xbdb031){const _0x553fbc=a133_0x1f377d,_0x19a269=Date[_0x553fbc(0xc0)]();this[_0x553fbc(0xb3)](_0x2de8cb,_0x553fbc(0xc4)+_0x571fb3);try{const _0x560007=await _0xbdb031(),_0x1692af=Date[_0x553fbc(0xc0)]()-_0x19a269;return this[_0x553fbc(0xd1)](_0x2de8cb,'完成:\x20'+_0x571fb3,_0x1692af),_0x560007;}catch(_0x3409fc){const _0x357103=Date['now']()-_0x19a269;this[_0x553fbc(0xa9)](_0x2de8cb,'失败:\x20'+_0x571fb3,{'error':_0x3409fc instanceof Error?_0x3409fc[_0x553fbc(0xa4)]:String(_0x3409fc),'duration':_0x357103});throw _0x3409fc;}}['readLogs'](){const _0x7be425=a133_0x1f377d;try{if(!a133_0x14af57['existsSync'](this[_0x7be425(0xd7)]))return[];const _0x4d5322=a133_0x14af57['readFileSync'](this[_0x7be425(0xd7)],'utf8');return _0x4d5322[_0x7be425(0xa8)]('\x0a')[_0x7be425(0xa3)](_0x1f7e25=>_0x1f7e25[_0x7be425(0xb5)]())[_0x7be425(0xcf)](_0x149bcb=>JSON[_0x7be425(0xbb)](_0x149bcb));}catch(_0x199904){return console[_0x7be425(0xd9)](_0x7be425(0xd6),_0x199904),[];}}[a133_0x1f377d(0xc7)](){const _0x4a66d2=a133_0x1f377d;try{a133_0x14af57[_0x4a66d2(0xb6)](this['logFilePath'])&&a133_0x14af57[_0x4a66d2(0xc1)](this[_0x4a66d2(0xd7)],'',_0x4a66d2(0xaa));}catch(_0x1691ba){console[_0x4a66d2(0xd9)](_0x4a66d2(0xb8),_0x1691ba);}}[a133_0x1f377d(0xab)](){const _0x183969=a133_0x1f377d;return this[_0x183969(0xad)];}}export const logger=new Logger();function a133_0x440f(){const _0x2c1df0=['blue','4DcgKqc','parse','logTask','setRawCommand','format','1115460ovWgGs','now','writeFileSync','yellow','command','开始执行:\x20','5AcICMv','clear','clearLogs','setLogPath','transports','printf','1342bkzogi','.lovrabet.log','dirname','timestamp','map','green','success','stringify','mkdirSync','toISOString','log','Failed\x20to\x20read\x20logs:','logFilePath','errors','warn','red','combine','267wNUZCs','977424UGExrP','unknown','filter','message','File','rawCommand','details','split','error','utf8','getWinstonInstance','777831slJjOz','winstonLogger','currentRawCommand','addColors','687680KTNLZf','initWinstonLogger','duration','info','376806NoUmvE','trim','existsSync','829850iWxuGr','Failed\x20to\x20clear\x20logs:'];a133_0x440f=function(){return _0x2c1df0;};return a133_0x440f();}
@@ -1 +1 @@
1
- const a133_0x4268a1=a133_0x3012;(function(_0x2c613f,_0x187278){const _0x9712be=a133_0x3012,_0x1717cc=_0x2c613f();while(!![]){try{const _0x4df3a7=parseInt(_0x9712be(0x1a5))/0x1+-parseInt(_0x9712be(0x19d))/0x2+parseInt(_0x9712be(0x1a0))/0x3+-parseInt(_0x9712be(0x1a6))/0x4*(-parseInt(_0x9712be(0x1a3))/0x5)+-parseInt(_0x9712be(0x1a4))/0x6+-parseInt(_0x9712be(0x19c))/0x7*(parseInt(_0x9712be(0x19f))/0x8)+parseInt(_0x9712be(0x1a1))/0x9;if(_0x4df3a7===_0x187278)break;else _0x1717cc['push'](_0x1717cc['shift']());}catch(_0x2a4318){_0x1717cc['push'](_0x1717cc['shift']());}}}(a133_0x241b,0x7900c));export const isWindows=process[a133_0x4268a1(0x19e)]===a133_0x4268a1(0x19b);function a133_0x3012(_0xf22e52,_0x29fe0c){_0xf22e52=_0xf22e52-0x19b;const _0x241b40=a133_0x241b();let _0x30126e=_0x241b40[_0xf22e52];return _0x30126e;}function a133_0x241b(){const _0x2dfad7=['2243043SfFZMF','9998064JgWSlU','.cmd','5295OQPoDr','4892460kroEsc','638666nMxtoA','380riMOmD','win32','4697KBzsmx','850492KkKsWN','platform','10272wNrmol'];a133_0x241b=function(){return _0x2dfad7;};return a133_0x241b();}export function resolveNpmBin(_0x55fd1f){const _0x2e1adf=a133_0x4268a1;return isWindows?_0x55fd1f+_0x2e1adf(0x1a2):_0x55fd1f;}
1
+ const a134_0x1d3405=a134_0x3c27;function a134_0x3c27(_0x2ea515,_0x30f4a7){_0x2ea515=_0x2ea515-0x1f3;const _0x1be218=a134_0x1be2();let _0x3c2766=_0x1be218[_0x2ea515];return _0x3c2766;}(function(_0x506aae,_0x52669a){const _0x594f96=a134_0x3c27,_0xa0575c=_0x506aae();while(!![]){try{const _0x1ec4c1=parseInt(_0x594f96(0x1f3))/0x1+parseInt(_0x594f96(0x1f7))/0x2+-parseInt(_0x594f96(0x1fe))/0x3*(parseInt(_0x594f96(0x1fb))/0x4)+parseInt(_0x594f96(0x1fc))/0x5+parseInt(_0x594f96(0x1fa))/0x6*(parseInt(_0x594f96(0x1f5))/0x7)+parseInt(_0x594f96(0x1ff))/0x8*(-parseInt(_0x594f96(0x1f8))/0x9)+-parseInt(_0x594f96(0x1f6))/0xa*(parseInt(_0x594f96(0x1f9))/0xb);if(_0x1ec4c1===_0x52669a)break;else _0xa0575c['push'](_0xa0575c['shift']());}catch(_0x5cf4a8){_0xa0575c['push'](_0xa0575c['shift']());}}}(a134_0x1be2,0x91a1f));function a134_0x1be2(){const _0x3738f8=['5432082ZQvNZW','21948gjWKKT','1593305lYFiRJ','.cmd','495RlWqDT','142064hpuooA','205522UHkXLr','win32','7AptGXj','704100RjlZXh','2198380pRMNRK','342jOGZNg','55SiutFp'];a134_0x1be2=function(){return _0x3738f8;};return a134_0x1be2();}export const isWindows=process['platform']===a134_0x1d3405(0x1f4);export function resolveNpmBin(_0x2ce6ed){const _0x4c29d5=a134_0x1d3405;return isWindows?_0x2ce6ed+_0x4c29d5(0x1fd):_0x2ce6ed;}
@@ -1 +1 @@
1
- const a134_0x5d5204=a134_0x470e;(function(_0x4869eb,_0xe1e6a8){const _0x4dc3c3=a134_0x470e,_0x4d921e=_0x4869eb();while(!![]){try{const _0x49cd7b=parseInt(_0x4dc3c3(0x12c))/0x1+-parseInt(_0x4dc3c3(0x132))/0x2+-parseInt(_0x4dc3c3(0x124))/0x3+parseInt(_0x4dc3c3(0x133))/0x4*(parseInt(_0x4dc3c3(0x136))/0x5)+-parseInt(_0x4dc3c3(0x137))/0x6*(parseInt(_0x4dc3c3(0x12f))/0x7)+parseInt(_0x4dc3c3(0x130))/0x8*(parseInt(_0x4dc3c3(0x126))/0x9)+parseInt(_0x4dc3c3(0x127))/0xa*(parseInt(_0x4dc3c3(0x12e))/0xb);if(_0x49cd7b===_0xe1e6a8)break;else _0x4d921e['push'](_0x4d921e['shift']());}catch(_0x3a549b){_0x4d921e['push'](_0x4d921e['shift']());}}}(a134_0x236e,0x42b5d));import{existsSync,mkdirSync,readFileSync,writeFileSync}from'node:fs';import{dirname,join,resolve}from'node:path';import{fileURLToPath}from'node:url';import{getTemplateBaseUrl}from'./config.js';import{appendUpdateTime}from'./guides-cdn.js';function a134_0x236e(){const _0x194ef8=['statusText','lastUpdated','string','315517AKXyQW','CDN\x20请求失败:\x20','2783qLHtjE','3997lFmbRp','191320eJejTZ','json','422888MDKvng','4pVyLSr','CDN\x20返回数据格式错误','.cursor/rules','250355jXCwzb','1626Xxwmle','content','358593MQYEih','../../templates/rules/lovrabet_rules.mdc.tpl','117VYRPEb','3260eyFOOZ','utf-8'];a134_0x236e=function(){return _0x194ef8;};return a134_0x236e();}const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function getRulesCdnUrl(){const _0x56bdc5=getTemplateBaseUrl();return _0x56bdc5+'/rules/rules.json';}const LOCAL_TEMPLATE_PATH=resolve(__dirname,a134_0x5d5204(0x125));export async function fetchRulesFromCDN(){const _0x517c05=a134_0x5d5204,_0x3f61e0=getRulesCdnUrl(),_0x446b85=await fetch(_0x3f61e0,{'headers':{'Accept':'application/json'}});if(!_0x446b85['ok'])throw new Error(_0x517c05(0x12d)+_0x446b85['status']+'\x20'+_0x446b85[_0x517c05(0x129)]);const _0x1531f8=await _0x446b85[_0x517c05(0x131)]();if(!_0x1531f8[_0x517c05(0x138)]||typeof _0x1531f8[_0x517c05(0x138)]!==_0x517c05(0x12b))throw new Error(_0x517c05(0x134));return _0x1531f8;}export async function getRulesContent(){const _0x220432=a134_0x5d5204;try{const _0x5a3f82=await fetchRulesFromCDN();return _0x5a3f82[_0x220432(0x138)];}catch{return readLocalTemplate();}}export function readLocalTemplate(){const _0x411feb=a134_0x5d5204;if(existsSync(LOCAL_TEMPLATE_PATH))return readFileSync(LOCAL_TEMPLATE_PATH,_0x411feb(0x128));throw new Error('本地模板文件不存在:\x20'+LOCAL_TEMPLATE_PATH);}export async function writeRulesFile(_0x3ec2f0){const _0x34abbc=a134_0x5d5204,_0x13ce7d=await fetchRulesFromCDN()['catch'](()=>null);let _0x371821;_0x13ce7d?(_0x371821=_0x13ce7d['content'],_0x13ce7d[_0x34abbc(0x12a)]&&(_0x371821=appendUpdateTime(_0x371821,_0x13ce7d[_0x34abbc(0x12a)]))):_0x371821=readLocalTemplate();const _0x498002=dirname(_0x3ec2f0);!existsSync(_0x498002)&&mkdirSync(_0x498002,{'recursive':!![]}),writeFileSync(_0x3ec2f0,_0x371821,_0x34abbc(0x128));}function a134_0x470e(_0x183475,_0x3afeea){_0x183475=_0x183475-0x124;const _0x236eaa=a134_0x236e();let _0x470e3e=_0x236eaa[_0x183475];return _0x470e3e;}export async function copyRulesToCursor(_0x10de1a){const _0x45a49c=a134_0x5d5204,_0x30e5a0=join(_0x10de1a,_0x45a49c(0x135)),_0x2f770e=join(_0x30e5a0,'lovrabet_rules.mdc');if(existsSync(_0x2f770e))return![];return await writeRulesFile(_0x2f770e),!![];}export async function copyRulesToAgentsMd(_0x1d9ae2){const _0x157b35=join(_0x1d9ae2,'agents.md');if(existsSync(_0x157b35))return![];return await writeRulesFile(_0x157b35),!![];}
1
+ const a135_0x429094=a135_0xb8a5;(function(_0x470864,_0x1bac22){const _0x596d15=a135_0xb8a5,_0x1d4250=_0x470864();while(!![]){try{const _0x30793d=-parseInt(_0x596d15(0xde))/0x1+parseInt(_0x596d15(0xe7))/0x2+-parseInt(_0x596d15(0xdf))/0x3*(parseInt(_0x596d15(0xd9))/0x4)+parseInt(_0x596d15(0xd1))/0x5*(parseInt(_0x596d15(0xd7))/0x6)+parseInt(_0x596d15(0xe4))/0x7*(parseInt(_0x596d15(0xe9))/0x8)+parseInt(_0x596d15(0xe0))/0x9*(parseInt(_0x596d15(0xea))/0xa)+parseInt(_0x596d15(0xd8))/0xb;if(_0x30793d===_0x1bac22)break;else _0x1d4250['push'](_0x1d4250['shift']());}catch(_0x4e16ae){_0x1d4250['push'](_0x1d4250['shift']());}}}(a135_0x3cb3,0x43c97));import{existsSync,mkdirSync,readFileSync,writeFileSync}from'node:fs';import{dirname,join,resolve}from'node:path';import{fileURLToPath}from'node:url';import{getTemplateBaseUrl}from'../utils/config.js';import{appendUpdateTime}from'../utils/guides-cdn.js';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function getRulesCdnUrl(){const _0x2fdafa=getTemplateBaseUrl();return _0x2fdafa+'/rules/rules.json';}function a135_0xb8a5(_0x3a9663,_0x435fa2){_0x3a9663=_0x3a9663-0xd1;const _0x3cb354=a135_0x3cb3();let _0xb8a58e=_0x3cb354[_0x3a9663];return _0xb8a58e;}const LOCAL_TEMPLATE_PATH=resolve(__dirname,a135_0x429094(0xd5));function a135_0x3cb3(){const _0xff18e1=['15UIpJLJ','本地模板文件不存在:\x20','CDN\x20返回数据格式错误','CDN\x20请求失败:\x20','../../templates/rules/lovrabet_rules.mdc.tpl','statusText','330384PLjMXR','7922211RKmOdb','6532WDFOcK','utf-8','lastUpdated','lovrabet_rules.mdc','.cursor/rules','539914cCyREb','687FEnCSu','18fOYaZJ','string','application/json','catch','7CjOHBz','json','agents.md','124854TTpARv','content','536928YGnxQk','882950IqOyDc'];a135_0x3cb3=function(){return _0xff18e1;};return a135_0x3cb3();}export async function fetchRulesFromCDN(){const _0x16aa94=a135_0x429094,_0x18b4dc=getRulesCdnUrl(),_0x238bf5=await fetch(_0x18b4dc,{'headers':{'Accept':_0x16aa94(0xe2)}});if(!_0x238bf5['ok'])throw new Error(_0x16aa94(0xd4)+_0x238bf5['status']+'\x20'+_0x238bf5[_0x16aa94(0xd6)]);const _0x16a31d=await _0x238bf5[_0x16aa94(0xe5)]();if(!_0x16a31d['content']||typeof _0x16a31d[_0x16aa94(0xe8)]!==_0x16aa94(0xe1))throw new Error(_0x16aa94(0xd3));return _0x16a31d;}export async function getRulesContent(){const _0x3fd805=a135_0x429094;try{const _0x59f799=await fetchRulesFromCDN();return _0x59f799[_0x3fd805(0xe8)];}catch{return readLocalTemplate();}}export function readLocalTemplate(){const _0x208365=a135_0x429094;if(existsSync(LOCAL_TEMPLATE_PATH))return readFileSync(LOCAL_TEMPLATE_PATH,_0x208365(0xda));throw new Error(_0x208365(0xd2)+LOCAL_TEMPLATE_PATH);}export async function writeRulesFile(_0x451868){const _0x46869c=a135_0x429094,_0x5d7b7e=await fetchRulesFromCDN()[_0x46869c(0xe3)](()=>null);let _0x355670;_0x5d7b7e?(_0x355670=_0x5d7b7e['content'],_0x5d7b7e[_0x46869c(0xdb)]&&(_0x355670=appendUpdateTime(_0x355670,_0x5d7b7e[_0x46869c(0xdb)]))):_0x355670=readLocalTemplate();const _0x2bf797=dirname(_0x451868);!existsSync(_0x2bf797)&&mkdirSync(_0x2bf797,{'recursive':!![]}),writeFileSync(_0x451868,_0x355670,_0x46869c(0xda));}export async function copyRulesToCursor(_0x56340c){const _0x5208d9=a135_0x429094,_0x2b27e2=join(_0x56340c,_0x5208d9(0xdd)),_0x3738e5=join(_0x2b27e2,_0x5208d9(0xdc));if(existsSync(_0x3738e5))return![];return await writeRulesFile(_0x3738e5),!![];}export async function copyRulesToAgentsMd(_0x276ce6){const _0x23513f=a135_0x429094,_0xac12fc=join(_0x276ce6,_0x23513f(0xe6));if(existsSync(_0xac12fc))return![];return await writeRulesFile(_0xac12fc),!![];}
@@ -1 +1 @@
1
- export function sleep(_0x1b9740){return new Promise(_0x408e03=>setTimeout(_0x408e03,_0x1b9740));}
1
+ export function sleep(_0x9deb1b){return new Promise(_0x1dcabd=>setTimeout(_0x1dcabd,_0x9deb1b));}
@@ -1 +1 @@
1
- const a136_0x305ad1=a136_0xb29a;(function(_0x343bee,_0x233be8){const _0x3c485c=a136_0xb29a,_0x1eae49=_0x343bee();while(!![]){try{const _0x47659d=parseInt(_0x3c485c(0x209))/0x1*(parseInt(_0x3c485c(0x1ed))/0x2)+parseInt(_0x3c485c(0x1e7))/0x3+-parseInt(_0x3c485c(0x1f7))/0x4+-parseInt(_0x3c485c(0x222))/0x5*(-parseInt(_0x3c485c(0x1ea))/0x6)+parseInt(_0x3c485c(0x217))/0x7+-parseInt(_0x3c485c(0x1fd))/0x8+parseInt(_0x3c485c(0x227))/0x9*(parseInt(_0x3c485c(0x200))/0xa);if(_0x47659d===_0x233be8)break;else _0x1eae49['push'](_0x1eae49['shift']());}catch(_0x11ef89){_0x1eae49['push'](_0x1eae49['shift']());}}}(a136_0x5313,0x8b528));function a136_0xb29a(_0x199367,_0x5632fb){_0x199367=_0x199367-0x1e6;const _0x531318=a136_0x5313();let _0xb29aa5=_0x531318[_0x199367];return _0xb29aa5;}import a136_0x27a27e from'node:fs';function a136_0x5313(){const _0x1b66e9=['toLocaleDateString','.js','push','6282lJMWjP','template','770346SjJluv','YourModel','now','6btHZdp','alias','开始处理模板内容替换','514tMusQL','processDirectory','replaceApiContent','.json','.scss','default','replace','toComponentName','toLocaleString','utf8','3857396MNmLVa','processTemplate','isFile','info','toUpperCase','datasetCode','888824aXUtyT','slice','endsWith','1740BUrEMb','split','writeFile','name','charAt','.css','promises','tableName','\x0a\x20\x20\x20\x20{\x20','3329LUdkWU','模板内容替换失败','includes','processFile','replaceContent','.jsx','toISOString','map','.tpl','mkdir','alias:\x20\x22','2-digit','.md','pop','1588307DQEKPs','join','numeric','error','LOVRABET','toLowerCase','readdir','datasetCode:\x20\x22','readFile','name:\x20\x22','toDisplayTitle','927140SDcBoA','tableName:\x20\x22'];a136_0x5313=function(){return _0x1b66e9;};return a136_0x5313();}import a136_0x82e33c from'node:path';import{logger}from'./logger.js';import{getCliVersion}from'./version.js';const CLI_VERSION=getCliVersion();export class TemplateReplacer{static[a136_0x305ad1(0x1f4)](_0x3ce191){const _0x3faa3=a136_0x305ad1,_0x24daff=_0x3ce191[_0x3faa3(0x201)]('/')[_0x3faa3(0x216)]()||_0x3ce191;return _0x24daff['split']('-')[_0x3faa3(0x210)](_0x489fe8=>_0x489fe8[_0x3faa3(0x204)](0x0)['toUpperCase']()+_0x489fe8[_0x3faa3(0x1fe)](0x1)['toLowerCase']())[_0x3faa3(0x218)]('');}static[a136_0x305ad1(0x221)](_0x1eb8c9){const _0x20b605=a136_0x305ad1,_0x4bb9aa=_0x1eb8c9[_0x20b605(0x201)]('/')[_0x20b605(0x216)]()||_0x1eb8c9;return _0x4bb9aa[_0x20b605(0x201)]('-')[_0x20b605(0x210)](_0x37983d=>_0x37983d[_0x20b605(0x204)](0x0)[_0x20b605(0x1fb)]()+_0x37983d['slice'](0x1)[_0x20b605(0x21c)]())[_0x20b605(0x218)]('\x20');}static[a136_0x305ad1(0x20d)](_0x560810,_0x158a0c,_0x23cec2){const _0x3c7c1a=a136_0x305ad1,_0x111310=this[_0x3c7c1a(0x1f4)](_0x158a0c),_0x5a5af8=this[_0x3c7c1a(0x221)](_0x158a0c),_0x28b826=new Date(),_0x34922f=_0x28b826[_0x3c7c1a(0x1f5)](undefined,{'year':_0x3c7c1a(0x219),'month':'2-digit','day':_0x3c7c1a(0x214),'hour':_0x3c7c1a(0x214),'minute':'2-digit','second':'2-digit','hour12':![]})[_0x3c7c1a(0x1f3)](/\//g,'-'),_0x32017a=_0x28b826[_0x3c7c1a(0x224)](undefined,{'year':'numeric','month':_0x3c7c1a(0x214),'day':_0x3c7c1a(0x214)})[_0x3c7c1a(0x1f3)](/\//g,'-'),_0x1e662b=_0x28b826['toLocaleTimeString'](undefined,{'hour12':![]});let _0xca481b=_0x560810[_0x3c7c1a(0x1f3)](/\{CliVersion\}/g,CLI_VERSION)[_0x3c7c1a(0x1f3)](/\{ComponentName\}/g,_0x111310)[_0x3c7c1a(0x1f3)](/\{DisplayTitle\}/g,_0x5a5af8)[_0x3c7c1a(0x1f3)](/\{PageName\}/g,_0x158a0c)['replace'](/\{TemplateName\}/g,_0x23cec2)[_0x3c7c1a(0x1f3)](/\{CreatedAt\}/g,_0x34922f)[_0x3c7c1a(0x1f3)](/\{CreatedDate\}/g,_0x32017a)[_0x3c7c1a(0x1f3)](/\{CreatedTime\}/g,_0x1e662b);return _0xca481b;}static[a136_0x305ad1(0x1ef)](_0x2ed6e4,_0x5321c3,_0x2b4a13,_0x5ba0eb,_0x3afb71,_0x46ffaf,_0x3dda74,_0x2cd4f1){const _0x5e1e4c=a136_0x305ad1,_0x51f939=new Date(),_0xce4a09=_0x51f939[_0x5e1e4c(0x20f)](),_0x40f8c6=_0x2b4a13[_0x5e1e4c(0x210)](_0x3e7b68=>{const _0x33cec1=_0x5e1e4c,_0x2a9b4b=[_0x33cec1(0x21e)+_0x3e7b68[_0x33cec1(0x1fc)]+'\x22',_0x33cec1(0x223)+_0x3e7b68[_0x33cec1(0x207)]+'\x22',_0x33cec1(0x220)+_0x3e7b68[_0x33cec1(0x203)]+'\x22'];return _0x3e7b68[_0x33cec1(0x1eb)]&&_0x2a9b4b[_0x33cec1(0x226)](_0x33cec1(0x213)+_0x3e7b68[_0x33cec1(0x1eb)]+'\x22'),_0x33cec1(0x208)+_0x2a9b4b[_0x33cec1(0x218)](',\x20')+'\x20},';})[_0x5e1e4c(0x218)](''),_0x851eb0=_0x5ba0eb||_0x2b4a13[0x0]?.[_0x5e1e4c(0x1eb)]||_0x5e1e4c(0x1e8);let _0x188b0a=_0x2ed6e4[_0x5e1e4c(0x1f3)](/\{AppCode\}/g,_0x5321c3)['replace'](/\{ModelConfigs\}/g,_0x40f8c6)[_0x5e1e4c(0x1f3)](/\{ExampleModelName\}/g,_0x851eb0)[_0x5e1e4c(0x1f3)](/\{ApiFileName\}/g,_0x3afb71||'api')['replace'](/\{ConfigName\}/g,_0x46ffaf||_0x5e1e4c(0x1f2))[_0x5e1e4c(0x1f3)](/\{ClientConfigParam\}/g,_0x3dda74||'')[_0x5e1e4c(0x1f3)](/\{VarPrefix\}/g,_0x2cd4f1||_0x5e1e4c(0x21b))['replace'](/\{CreatedAt\}/g,_0xce4a09);return _0x188b0a;}static async[a136_0x305ad1(0x1f8)](_0x1fade7,_0x534104,_0x1a6f6a,_0x1d4a6b,_0x5a86d8=!![]){const _0x2578de=a136_0x305ad1,_0x528b93=Date[_0x2578de(0x1e9)]();try{_0x5a86d8&&logger[_0x2578de(0x1fa)](_0x2578de(0x1e6),_0x2578de(0x1ec),{'templatePath':_0x1fade7,'targetPath':_0x534104,'pageName':_0x1a6f6a,'templateName':_0x1d4a6b});await a136_0x27a27e['promises'][_0x2578de(0x212)](_0x534104,{'recursive':!![]}),await this[_0x2578de(0x1ee)](_0x1fade7,_0x534104,_0x1a6f6a,_0x1d4a6b);if(_0x5a86d8){const _0x2f7daf=Date[_0x2578de(0x1e9)]()-_0x528b93;logger['success'](_0x2578de(0x1e6),'模板内容替换完成',_0x2f7daf,{'pageName':_0x1a6f6a,'templateName':_0x1d4a6b});}}catch(_0x122cd7){if(_0x5a86d8){const _0x123553=Date[_0x2578de(0x1e9)]()-_0x528b93;logger[_0x2578de(0x21a)](_0x2578de(0x1e6),_0x2578de(0x20a),{'templatePath':_0x1fade7,'targetPath':_0x534104,'pageName':_0x1a6f6a,'templateName':_0x1d4a6b,'error':_0x122cd7 instanceof Error?_0x122cd7['message']:String(_0x122cd7),'duration':_0x123553});}throw _0x122cd7;}}static async[a136_0x305ad1(0x1ee)](_0x2a4579,_0x2e5337,_0x1b323c,_0x4499fb){const _0x4c94b2=a136_0x305ad1,_0x114aa1=await a136_0x27a27e[_0x4c94b2(0x206)][_0x4c94b2(0x21d)](_0x2a4579,{'withFileTypes':!![]});for(const _0x4edcc1 of _0x114aa1){const _0x17113b=a136_0x82e33c[_0x4c94b2(0x218)](_0x2a4579,_0x4edcc1[_0x4c94b2(0x203)]);let _0x50d6b9=a136_0x82e33c[_0x4c94b2(0x218)](_0x2e5337,_0x4edcc1[_0x4c94b2(0x203)]);_0x4edcc1[_0x4c94b2(0x203)]['endsWith'](_0x4c94b2(0x211))&&(_0x50d6b9=a136_0x82e33c[_0x4c94b2(0x218)](_0x2e5337,_0x4edcc1[_0x4c94b2(0x203)][_0x4c94b2(0x1f3)](/\.tpl$/,'')));if(_0x4edcc1['isDirectory']())await a136_0x27a27e['promises'][_0x4c94b2(0x212)](_0x50d6b9,{'recursive':!![]}),await this[_0x4c94b2(0x1ee)](_0x17113b,_0x50d6b9,_0x1b323c,_0x4499fb);else _0x4edcc1[_0x4c94b2(0x1f9)]()&&await this[_0x4c94b2(0x20c)](_0x17113b,_0x50d6b9,_0x1b323c,_0x4499fb);}}static async[a136_0x305ad1(0x20c)](_0x5b4853,_0x28fc06,_0x2d5ad8,_0xe8533f){const _0x3bb1f5=a136_0x305ad1,_0x385ca8=a136_0x82e33c['extname'](_0x5b4853)[_0x3bb1f5(0x21c)]();_0x5b4853[_0x3bb1f5(0x1ff)]('.tpl')&&(_0x28fc06=_0x28fc06[_0x3bb1f5(0x1f3)](/\.tpl$/,''));const _0x59bf81=['.tsx','.ts',_0x3bb1f5(0x20e),_0x3bb1f5(0x225),_0x3bb1f5(0x1f0),_0x3bb1f5(0x215),_0x3bb1f5(0x205),_0x3bb1f5(0x1f1),_0x3bb1f5(0x211)];if(_0x59bf81[_0x3bb1f5(0x20b)](_0x385ca8)||_0x5b4853[_0x3bb1f5(0x1ff)](_0x3bb1f5(0x211))){const _0x5cea28=await a136_0x27a27e[_0x3bb1f5(0x206)][_0x3bb1f5(0x21f)](_0x5b4853,_0x3bb1f5(0x1f6)),_0x4fab74=this[_0x3bb1f5(0x20d)](_0x5cea28,_0x2d5ad8,_0xe8533f);await a136_0x27a27e[_0x3bb1f5(0x206)][_0x3bb1f5(0x202)](_0x28fc06,_0x4fab74,_0x3bb1f5(0x1f6));}else await a136_0x27a27e[_0x3bb1f5(0x206)]['copyFile'](_0x5b4853,_0x28fc06);}}
1
+ const a137_0x28cdc=a137_0x58a7;function a137_0x58a7(_0x51d480,_0x2861f1){_0x51d480=_0x51d480-0x1e1;const _0x466b3d=a137_0x466b();let _0x58a779=_0x466b3d[_0x51d480];return _0x58a779;}(function(_0x22f774,_0x51ec1b){const _0x58afd7=a137_0x58a7,_0x1ddddb=_0x22f774();while(!![]){try{const _0x318fb2=parseInt(_0x58afd7(0x1f8))/0x1*(parseInt(_0x58afd7(0x223))/0x2)+-parseInt(_0x58afd7(0x21e))/0x3*(-parseInt(_0x58afd7(0x1fd))/0x4)+parseInt(_0x58afd7(0x1f5))/0x5+parseInt(_0x58afd7(0x219))/0x6+-parseInt(_0x58afd7(0x200))/0x7+-parseInt(_0x58afd7(0x212))/0x8*(parseInt(_0x58afd7(0x20b))/0x9)+parseInt(_0x58afd7(0x206))/0xa*(-parseInt(_0x58afd7(0x21c))/0xb);if(_0x318fb2===_0x51ec1b)break;else _0x1ddddb['push'](_0x1ddddb['shift']());}catch(_0x453f34){_0x1ddddb['push'](_0x1ddddb['shift']());}}}(a137_0x466b,0xd9702));import a137_0x44a8ae from'node:fs';import a137_0xb728dc from'node:path';import{logger}from'../utils/logger.js';function a137_0x466b(){const _0xe4299b=['24cijMJl','message','success','template','.css','879502DGubAn','name','toLocaleTimeString','.js','promises','.tpl','now','alias:\x20\x22','extname','readFile','toDisplayTitle','\x0a\x20\x20\x20\x20{\x20','mkdir','writeFile','processDirectory','2-digit','模板内容替换失败','.scss','toLocaleDateString','replaceApiContent','split','toUpperCase','3515205qUxZWv','charAt','tableName:\x20\x22','1ayVlTs','toComponentName','YourModel','开始处理模板内容替换','isFile','407180SCMPOV','LOVRABET','isDirectory','4226152vnddjG','endsWith','processTemplate','map','toLowerCase','api','1043110zfYllo','pop','slice','tableName','replace','5364uMVpdT','utf8','includes','replaceContent','datasetCode','.tsx','toISOString','8024ofhTdD','info','copyFile','push','datasetCode:\x20\x22','join','alias','5191050lLuMiO','readdir','default','77TVMFOq','numeric'];a137_0x466b=function(){return _0xe4299b;};return a137_0x466b();}import{getCliVersion}from'../utils/version.js';const CLI_VERSION=getCliVersion();export class TemplateReplacer{static[a137_0x28cdc(0x1f9)](_0x3bdd56){const _0x516a1c=a137_0x28cdc,_0x4c8641=_0x3bdd56['split']('/')['pop']()||_0x3bdd56;return _0x4c8641[_0x516a1c(0x1f3)]('-')[_0x516a1c(0x203)](_0x3c6662=>_0x3c6662[_0x516a1c(0x1f6)](0x0)[_0x516a1c(0x1f4)]()+_0x3c6662[_0x516a1c(0x208)](0x1)[_0x516a1c(0x204)]())[_0x516a1c(0x217)]('');}static[a137_0x28cdc(0x1e9)](_0x276689){const _0x204fa9=a137_0x28cdc,_0x53eb71=_0x276689[_0x204fa9(0x1f3)]('/')[_0x204fa9(0x207)]()||_0x276689;return _0x53eb71['split']('-')['map'](_0x12179e=>_0x12179e[_0x204fa9(0x1f6)](0x0)[_0x204fa9(0x1f4)]()+_0x12179e[_0x204fa9(0x208)](0x1)['toLowerCase']())[_0x204fa9(0x217)]('\x20');}static[a137_0x28cdc(0x20e)](_0x26c19a,_0xd727f2,_0x138edb){const _0x58f363=a137_0x28cdc,_0x9895a2=this['toComponentName'](_0xd727f2),_0x3758b5=this[_0x58f363(0x1e9)](_0xd727f2),_0x4e47a5=new Date(),_0x3be1e0=_0x4e47a5['toLocaleString'](undefined,{'year':'numeric','month':_0x58f363(0x1ee),'day':_0x58f363(0x1ee),'hour':_0x58f363(0x1ee),'minute':_0x58f363(0x1ee),'second':_0x58f363(0x1ee),'hour12':![]})[_0x58f363(0x20a)](/\//g,'-'),_0x47bfef=_0x4e47a5[_0x58f363(0x1f1)](undefined,{'year':_0x58f363(0x21d),'month':_0x58f363(0x1ee),'day':'2-digit'})[_0x58f363(0x20a)](/\//g,'-'),_0x429eb3=_0x4e47a5[_0x58f363(0x1e1)](undefined,{'hour12':![]});let _0x594435=_0x26c19a[_0x58f363(0x20a)](/\{CliVersion\}/g,CLI_VERSION)[_0x58f363(0x20a)](/\{ComponentName\}/g,_0x9895a2)['replace'](/\{DisplayTitle\}/g,_0x3758b5)[_0x58f363(0x20a)](/\{PageName\}/g,_0xd727f2)[_0x58f363(0x20a)](/\{TemplateName\}/g,_0x138edb)[_0x58f363(0x20a)](/\{CreatedAt\}/g,_0x3be1e0)[_0x58f363(0x20a)](/\{CreatedDate\}/g,_0x47bfef)[_0x58f363(0x20a)](/\{CreatedTime\}/g,_0x429eb3);return _0x594435;}static[a137_0x28cdc(0x1f2)](_0x460ccb,_0x1a81e7,_0x46d3bd,_0x181e2f,_0x1d7ceb,_0x507d28,_0x39f31b,_0x2c34c6){const _0x502d2f=a137_0x28cdc,_0x42c1c3=new Date(),_0x53b402=_0x42c1c3[_0x502d2f(0x211)](),_0x36f27b=_0x46d3bd[_0x502d2f(0x203)](_0x2cc15d=>{const _0xe48e42=_0x502d2f,_0x1f8e45=[_0xe48e42(0x216)+_0x2cc15d[_0xe48e42(0x20f)]+'\x22',_0xe48e42(0x1f7)+_0x2cc15d[_0xe48e42(0x209)]+'\x22','name:\x20\x22'+_0x2cc15d['name']+'\x22'];return _0x2cc15d['alias']&&_0x1f8e45[_0xe48e42(0x215)](_0xe48e42(0x1e6)+_0x2cc15d['alias']+'\x22'),_0xe48e42(0x1ea)+_0x1f8e45['join'](',\x20')+'\x20},';})[_0x502d2f(0x217)](''),_0x57786a=_0x181e2f||_0x46d3bd[0x0]?.[_0x502d2f(0x218)]||_0x502d2f(0x1fa);let _0x1d96ed=_0x460ccb[_0x502d2f(0x20a)](/\{AppCode\}/g,_0x1a81e7)['replace'](/\{ModelConfigs\}/g,_0x36f27b)['replace'](/\{ExampleModelName\}/g,_0x57786a)[_0x502d2f(0x20a)](/\{ApiFileName\}/g,_0x1d7ceb||_0x502d2f(0x205))[_0x502d2f(0x20a)](/\{ConfigName\}/g,_0x507d28||_0x502d2f(0x21b))['replace'](/\{ClientConfigParam\}/g,_0x39f31b||'')[_0x502d2f(0x20a)](/\{VarPrefix\}/g,_0x2c34c6||_0x502d2f(0x1fe))[_0x502d2f(0x20a)](/\{CreatedAt\}/g,_0x53b402);return _0x1d96ed;}static async[a137_0x28cdc(0x202)](_0x54e31a,_0x4363ef,_0x572356,_0x305ff9,_0x4d942e=!![]){const _0x155e9f=a137_0x28cdc,_0x1a9d08=Date[_0x155e9f(0x1e5)]();try{_0x4d942e&&logger[_0x155e9f(0x213)]('template',_0x155e9f(0x1fb),{'templatePath':_0x54e31a,'targetPath':_0x4363ef,'pageName':_0x572356,'templateName':_0x305ff9});await a137_0x44a8ae['promises'][_0x155e9f(0x1eb)](_0x4363ef,{'recursive':!![]}),await this[_0x155e9f(0x1ed)](_0x54e31a,_0x4363ef,_0x572356,_0x305ff9);if(_0x4d942e){const _0x2ca4bb=Date['now']()-_0x1a9d08;logger[_0x155e9f(0x220)]('template','模板内容替换完成',_0x2ca4bb,{'pageName':_0x572356,'templateName':_0x305ff9});}}catch(_0x24b1b4){if(_0x4d942e){const _0x550ee6=Date['now']()-_0x1a9d08;logger['error'](_0x155e9f(0x221),_0x155e9f(0x1ef),{'templatePath':_0x54e31a,'targetPath':_0x4363ef,'pageName':_0x572356,'templateName':_0x305ff9,'error':_0x24b1b4 instanceof Error?_0x24b1b4[_0x155e9f(0x21f)]:String(_0x24b1b4),'duration':_0x550ee6});}throw _0x24b1b4;}}static async[a137_0x28cdc(0x1ed)](_0x3a2bcd,_0x36a625,_0x4a737d,_0x49c7a4){const _0x2b2e96=a137_0x28cdc,_0x3e3e2b=await a137_0x44a8ae[_0x2b2e96(0x1e3)][_0x2b2e96(0x21a)](_0x3a2bcd,{'withFileTypes':!![]});for(const _0x1daec9 of _0x3e3e2b){const _0x4d0e9f=a137_0xb728dc[_0x2b2e96(0x217)](_0x3a2bcd,_0x1daec9['name']);let _0x452b1b=a137_0xb728dc[_0x2b2e96(0x217)](_0x36a625,_0x1daec9[_0x2b2e96(0x224)]);_0x1daec9[_0x2b2e96(0x224)][_0x2b2e96(0x201)]('.tpl')&&(_0x452b1b=a137_0xb728dc[_0x2b2e96(0x217)](_0x36a625,_0x1daec9['name']['replace'](/\.tpl$/,'')));if(_0x1daec9[_0x2b2e96(0x1ff)]())await a137_0x44a8ae[_0x2b2e96(0x1e3)][_0x2b2e96(0x1eb)](_0x452b1b,{'recursive':!![]}),await this[_0x2b2e96(0x1ed)](_0x4d0e9f,_0x452b1b,_0x4a737d,_0x49c7a4);else _0x1daec9[_0x2b2e96(0x1fc)]()&&await this['processFile'](_0x4d0e9f,_0x452b1b,_0x4a737d,_0x49c7a4);}}static async['processFile'](_0x9eaff0,_0x14ea4a,_0x3b7aa8,_0x1c3cb9){const _0xe5aaf6=a137_0x28cdc,_0x3bd4b1=a137_0xb728dc[_0xe5aaf6(0x1e7)](_0x9eaff0)[_0xe5aaf6(0x204)]();_0x9eaff0[_0xe5aaf6(0x201)](_0xe5aaf6(0x1e4))&&(_0x14ea4a=_0x14ea4a[_0xe5aaf6(0x20a)](/\.tpl$/,''));const _0x55ada4=[_0xe5aaf6(0x210),'.ts','.jsx',_0xe5aaf6(0x1e2),'.json','.md',_0xe5aaf6(0x222),_0xe5aaf6(0x1f0),'.tpl'];if(_0x55ada4[_0xe5aaf6(0x20d)](_0x3bd4b1)||_0x9eaff0[_0xe5aaf6(0x201)](_0xe5aaf6(0x1e4))){const _0x299b50=await a137_0x44a8ae['promises'][_0xe5aaf6(0x1e8)](_0x9eaff0,_0xe5aaf6(0x20c)),_0x133e89=this[_0xe5aaf6(0x20e)](_0x299b50,_0x3b7aa8,_0x1c3cb9);await a137_0x44a8ae[_0xe5aaf6(0x1e3)][_0xe5aaf6(0x1ec)](_0x14ea4a,_0x133e89,'utf8');}else await a137_0x44a8ae['promises'][_0xe5aaf6(0x214)](_0x9eaff0,_0x14ea4a);}}
@@ -1 +1 @@
1
- function a137_0x59e1(){var _0x25269a=['781856WtQvNb','126yKawDl','6TkKspw','10JTMoyF','8VlyvMo','431832xVSCaJ','4736268CJCCHC','480193PjwNMU','158035LAtRIC','322348kScqLu','4862044ZngPMj'];a137_0x59e1=function(){return _0x25269a;};return a137_0x59e1();}(function(_0x4842a1,_0x1b0f86){var _0x51a664=a137_0x3e63,_0x157133=_0x4842a1();while(!![]){try{var _0x324e99=parseInt(_0x51a664(0x1ca))/0x1+parseInt(_0x51a664(0x1c4))/0x2*(parseInt(_0x51a664(0x1c1))/0x3)+-parseInt(_0x51a664(0x1c8))/0x4+parseInt(_0x51a664(0x1c7))/0x5*(-parseInt(_0x51a664(0x1c0))/0x6)+-parseInt(_0x51a664(0x1c6))/0x7*(parseInt(_0x51a664(0x1c3))/0x8)+parseInt(_0x51a664(0x1c5))/0x9+parseInt(_0x51a664(0x1c2))/0xa*(-parseInt(_0x51a664(0x1c9))/0xb);if(_0x324e99===_0x1b0f86)break;else _0x157133['push'](_0x157133['shift']());}catch(_0x388639){_0x157133['push'](_0x157133['shift']());}}}(a137_0x59e1,0x7668b));function a137_0x3e63(_0x29061b,_0x51be4c){_0x29061b=_0x29061b-0x1c0;var _0x59e1f1=a137_0x59e1();var _0x3e637e=_0x59e1f1[_0x29061b];return _0x3e637e;}import{VERSION}from'../generated/build-info.js';export function getCliVersion(){return VERSION;}
1
+ (function(_0x30fa7f,_0x46268f){var _0xae7f51=a138_0x329d,_0x2a93fe=_0x30fa7f();while(!![]){try{var _0xb97003=-parseInt(_0xae7f51(0x16d))/0x1*(parseInt(_0xae7f51(0x165))/0x2)+parseInt(_0xae7f51(0x166))/0x3+parseInt(_0xae7f51(0x16b))/0x4+-parseInt(_0xae7f51(0x16e))/0x5*(parseInt(_0xae7f51(0x167))/0x6)+parseInt(_0xae7f51(0x169))/0x7*(parseInt(_0xae7f51(0x16c))/0x8)+-parseInt(_0xae7f51(0x16a))/0x9+parseInt(_0xae7f51(0x168))/0xa;if(_0xb97003===_0x46268f)break;else _0x2a93fe['push'](_0x2a93fe['shift']());}catch(_0x57cb1f){_0x2a93fe['push'](_0x2a93fe['shift']());}}}(a138_0xb0b2,0xce4de));function a138_0x329d(_0x2c4dcf,_0x27b24c){_0x2c4dcf=_0x2c4dcf-0x165;var _0xb0b201=a138_0xb0b2();var _0x329d75=_0xb0b201[_0x2c4dcf];return _0x329d75;}import{VERSION}from'../generated/build-info.js';export function getCliVersion(){return VERSION;}function a138_0xb0b2(){var _0x553413=['1THjWCu','835QgZdzQ','2572894cDMVcH','1773840ypcQIS','38274LTYhjW','14826540zgREcu','21jzcaqX','8510067msSrzc','2248280zayLUn','4016856vJfKjA'];a138_0xb0b2=function(){return _0x553413;};return a138_0xb0b2();}
@@ -1 +1 @@
1
- function a138_0x3a3e(_0x500c0f,_0x2342c1){_0x500c0f=_0x500c0f-0xa0;var _0x4c19c2=a138_0x4c19();var _0x3a3e0=_0x4c19c2[_0x500c0f];return _0x3a3e0;}(function(_0x123572,_0x458ad5){var _0x4a945a=a138_0x3a3e,_0x2c0016=_0x123572();while(!![]){try{var _0x426199=-parseInt(_0x4a945a(0xa4))/0x1*(parseInt(_0x4a945a(0xa6))/0x2)+parseInt(_0x4a945a(0xa9))/0x3*(-parseInt(_0x4a945a(0xa2))/0x4)+parseInt(_0x4a945a(0xab))/0x5*(parseInt(_0x4a945a(0xa7))/0x6)+parseInt(_0x4a945a(0xa0))/0x7+parseInt(_0x4a945a(0xaa))/0x8+-parseInt(_0x4a945a(0xa1))/0x9*(-parseInt(_0x4a945a(0xa8))/0xa)+parseInt(_0x4a945a(0xa5))/0xb*(-parseInt(_0x4a945a(0xa3))/0xc);if(_0x426199===_0x458ad5)break;else _0x2c0016['push'](_0x2c0016['shift']());}catch(_0x251a92){_0x2c0016['push'](_0x2c0016['shift']());}}}(a138_0x4c19,0xca99f));import{setActiveCookie,clearActiveCookie}from'../core/api-client.js';export async function withActiveCookie(_0x3bf54f,_0x1158d5){setActiveCookie(_0x3bf54f);try{return await _0x1158d5();}finally{clearActiveCookie();}}function a138_0x4c19(){var _0xf86ff4=['249846tYUajd','2810dRAuEA','3sYymVJ','7052760cYWKdK','95vDdTTq','10370108GdLJYA','18243RTUIyo','4360860XIMfVK','6133476LUMDEa','1CyCGCd','22xaSduD','1562978GKwpKE'];a138_0x4c19=function(){return _0xf86ff4;};return a138_0x4c19();}
1
+ (function(_0x396e5d,_0x47c6f6){var _0x4ad645=a139_0x57f1,_0x548e4c=_0x396e5d();while(!![]){try{var _0x25684b=-parseInt(_0x4ad645(0x1b9))/0x1*(-parseInt(_0x4ad645(0x1ba))/0x2)+parseInt(_0x4ad645(0x1b6))/0x3*(-parseInt(_0x4ad645(0x1b0))/0x4)+-parseInt(_0x4ad645(0x1b7))/0x5*(parseInt(_0x4ad645(0x1b2))/0x6)+parseInt(_0x4ad645(0x1b1))/0x7+-parseInt(_0x4ad645(0x1b3))/0x8+-parseInt(_0x4ad645(0x1b8))/0x9*(-parseInt(_0x4ad645(0x1b4))/0xa)+parseInt(_0x4ad645(0x1b5))/0xb;if(_0x25684b===_0x47c6f6)break;else _0x548e4c['push'](_0x548e4c['shift']());}catch(_0x1e2f49){_0x548e4c['push'](_0x548e4c['shift']());}}}(a139_0x4a7f,0x2fb5d));import{setActiveCookie,clearActiveCookie}from'../core/api-client.js';function a139_0x57f1(_0x515716,_0x1faf65){_0x515716=_0x515716-0x1b0;var _0x4a7fee=a139_0x4a7f();var _0x57f17b=_0x4a7fee[_0x515716];return _0x57f17b;}export async function withActiveCookie(_0x44bcaf,_0x30b2c5){setActiveCookie(_0x44bcaf);try{return await _0x30b2c5();}finally{clearActiveCookie();}}function a139_0x4a7f(){var _0xf5ae3c=['39983IYUqXI','18beMhyA','38552HdzzEm','76797qBBngo','1074fBdbYr','1924136xwkcbp','1427330ZWfQsw','2018929eAXFlx','51dxsRqj','6705HHGfBy','18NvaeTQ'];a139_0x4a7f=function(){return _0xf5ae3c;};return a139_0x4a7f();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lovrabet/rabetbase-cli",
3
- "version": "2.0.8",
3
+ "version": "2.0.10",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "repository": {
6
6
  "type": "git",
@@ -17,9 +17,9 @@
17
17
  },
18
18
  "scripts": {
19
19
  "prebuild": "node scripts/generate-build-info.js",
20
- "build": "rm -rf lib && tsc && javascript-obfuscator lib --output lib",
20
+ "build": "rm -rf lib && tsc && tsc-alias && javascript-obfuscator lib --output lib",
21
21
  "prebuild:dev": "node scripts/generate-build-info.js",
22
- "build:dev": "rm -rf lib && tsc",
22
+ "build:dev": "rm -rf lib && tsc && tsc-alias",
23
23
  "start": "tsc --watch",
24
24
  "sync-template": "node scripts/sync-template.js",
25
25
  "beta-release": "sh scripts/update-beta-version.sh && bun run build && git push && git push origin --tag && bun publish --tag beta",
@@ -72,7 +72,8 @@
72
72
  "@vitest/ui": "^3.2.4",
73
73
  "c8": "^10.1.3",
74
74
  "javascript-obfuscator": "^5.4.1",
75
+ "tsc-alias": "^1.8.10",
75
76
  "typescript": "latest",
76
77
  "vitest": "^3.2.4"
77
78
  }
78
- }
79
+ }