@lovrabet/rabetbase-cli 2.3.16-beta.2 → 2.3.16-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 (287) hide show
  1. package/README.md +1 -1
  2. package/lib/api/api-doc.js +1 -1
  3. package/lib/api/fetch-model-list.js +1 -1
  4. package/lib/api/generate-api-file.js +1 -1
  5. package/lib/auth/auth-server-ui.js +1 -1
  6. package/lib/auth/auth-server.js +1 -1
  7. package/lib/auth/constant.js +1 -1
  8. package/lib/auth/get-cookie.js +1 -1
  9. package/lib/auth/get-session-user.js +1 -1
  10. package/lib/auth/is-session-valid.js +1 -1
  11. package/lib/auth/login-success-html.js +1 -1
  12. package/lib/auth/logout.js +1 -1
  13. package/lib/cli-flags.js +1 -1
  14. package/lib/cli.js +1 -1
  15. package/lib/commands/api/generate.js +1 -1
  16. package/lib/commands/api/index.js +1 -1
  17. package/lib/commands/api/list.js +1 -1
  18. package/lib/commands/api/pull.js +1 -1
  19. package/lib/commands/api/shared.js +1 -1
  20. package/lib/commands/app/index.js +1 -1
  21. package/lib/commands/app/list.js +1 -1
  22. package/lib/commands/app/members-list.js +1 -1
  23. package/lib/commands/app/remote-directory.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app-config/delete.js +1 -1
  26. package/lib/commands/app-config/get.js +1 -1
  27. package/lib/commands/app-config/index.js +1 -1
  28. package/lib/commands/app-config/list.js +1 -1
  29. package/lib/commands/app-config/set.js +1 -1
  30. package/lib/commands/app-config/shared.js +1 -1
  31. package/lib/commands/auth/index.js +1 -1
  32. package/lib/commands/bff/create.js +1 -1
  33. package/lib/commands/bff/delete.js +1 -1
  34. package/lib/commands/bff/detail.js +1 -1
  35. package/lib/commands/bff/index.js +1 -1
  36. package/lib/commands/bff/list.js +1 -1
  37. package/lib/commands/bff/pull.js +1 -1
  38. package/lib/commands/bff/push.js +1 -1
  39. package/lib/commands/bff/status.js +1 -1
  40. package/lib/commands/cli-skill/index.js +1 -1
  41. package/lib/commands/cli-update.js +1 -1
  42. package/lib/commands/codegen/index.js +1 -1
  43. package/lib/commands/codegen/sdk.js +1 -1
  44. package/lib/commands/codegen/sql.js +1 -1
  45. package/lib/commands/common/app-registry.js +1 -1
  46. package/lib/commands/common/app-selector.js +1 -1
  47. package/lib/commands/common/async-task.js +1 -1
  48. package/lib/commands/common/dry-run.js +1 -1
  49. package/lib/commands/common/flags.js +1 -1
  50. package/lib/commands/common/local-file.js +1 -1
  51. package/lib/commands/common/validate.js +1 -1
  52. package/lib/commands/config/get.js +1 -1
  53. package/lib/commands/config/index.js +1 -1
  54. package/lib/commands/config/list.js +1 -1
  55. package/lib/commands/config/set.js +1 -1
  56. package/lib/commands/config/shared.js +1 -1
  57. package/lib/commands/data/filter.js +1 -1
  58. package/lib/commands/data/getOne.js +1 -1
  59. package/lib/commands/data/index.js +1 -1
  60. package/lib/commands/data/shared.js +1 -1
  61. package/lib/commands/dataset/business-group-update.js +1 -1
  62. package/lib/commands/dataset/capability.js +1 -1
  63. package/lib/commands/dataset/delete.js +1 -1
  64. package/lib/commands/dataset/detail.js +1 -1
  65. package/lib/commands/dataset/extend-update.js +1 -1
  66. package/lib/commands/dataset/field-update.js +1 -1
  67. package/lib/commands/dataset/generate.js +1 -1
  68. package/lib/commands/dataset/index.js +1 -1
  69. package/lib/commands/dataset/list.js +1 -1
  70. package/lib/commands/dataset/operations.js +1 -1
  71. package/lib/commands/dataset/relation-audit.js +1 -1
  72. package/lib/commands/dataset/relation-create.js +1 -1
  73. package/lib/commands/dataset/relation-delete.js +1 -1
  74. package/lib/commands/dataset/relation-shared.js +1 -1
  75. package/lib/commands/dataset/relation-update.js +1 -1
  76. package/lib/commands/dataset/relations.js +1 -1
  77. package/lib/commands/dataset/rename.js +1 -1
  78. package/lib/commands/dataset/restore.js +1 -1
  79. package/lib/commands/db/analysis-batching.js +1 -1
  80. package/lib/commands/db/analyze-batch-plan.js +1 -1
  81. package/lib/commands/db/analyze-cancel.js +1 -1
  82. package/lib/commands/db/analyze-start.js +1 -1
  83. package/lib/commands/db/analyze-status.js +1 -1
  84. package/lib/commands/db/create.js +1 -1
  85. package/lib/commands/db/delete.js +1 -1
  86. package/lib/commands/db/detail.js +1 -1
  87. package/lib/commands/db/diff.js +1 -1
  88. package/lib/commands/db/index.js +1 -1
  89. package/lib/commands/db/list.js +1 -1
  90. package/lib/commands/db/shared.js +1 -1
  91. package/lib/commands/db/tables.js +1 -1
  92. package/lib/commands/db/test.js +1 -1
  93. package/lib/commands/db/update.js +1 -1
  94. package/lib/commands/doctor.js +1 -1
  95. package/lib/commands/file/index.js +1 -1
  96. package/lib/commands/init/index.js +1 -1
  97. package/lib/commands/issue/index.js +1 -1
  98. package/lib/commands/issue/nudge.js +1 -1
  99. package/lib/commands/issue/report.js +1 -1
  100. package/lib/commands/issue/shared.js +1 -1
  101. package/lib/commands/kb/create.js +1 -1
  102. package/lib/commands/kb/delete.js +1 -1
  103. package/lib/commands/kb/detail.js +1 -1
  104. package/lib/commands/kb/index.js +1 -1
  105. package/lib/commands/kb/list.js +1 -1
  106. package/lib/commands/kb/shared.js +1 -1
  107. package/lib/commands/kb/update.js +1 -1
  108. package/lib/commands/logs/index.js +1 -1
  109. package/lib/commands/menu/asset-update.js +1 -1
  110. package/lib/commands/menu/delete.js +1 -1
  111. package/lib/commands/menu/external-link-create.js +1 -1
  112. package/lib/commands/menu/external-link-update.js +1 -1
  113. package/lib/commands/menu/group-create.js +1 -1
  114. package/lib/commands/menu/group-update.js +1 -1
  115. package/lib/commands/menu/index.js +1 -1
  116. package/lib/commands/menu/list.js +1 -1
  117. package/lib/commands/menu/move.js +1 -1
  118. package/lib/commands/menu/regroup-start.js +1 -1
  119. package/lib/commands/menu/rename.js +1 -1
  120. package/lib/commands/menu/shared/compare-table.js +1 -1
  121. package/lib/commands/menu/shared/delete-plan.js +1 -1
  122. package/lib/commands/menu/shared/facts.js +1 -1
  123. package/lib/commands/menu/shared/index.js +1 -1
  124. package/lib/commands/menu/shared/inquirer.js +1 -1
  125. package/lib/commands/menu/shared/local-pages.js +1 -1
  126. package/lib/commands/menu/shared/logic.js +1 -1
  127. package/lib/commands/menu/shared/mutations.js +1 -1
  128. package/lib/commands/menu/shared/service.js +1 -1
  129. package/lib/commands/menu/shared/sync-core.js +1 -1
  130. package/lib/commands/menu/shared/update-core.js +1 -1
  131. package/lib/commands/menu/shared/valid-url.js +1 -1
  132. package/lib/commands/menu/sync.js +1 -1
  133. package/lib/commands/notification/config-list.js +1 -1
  134. package/lib/commands/notification/index.js +1 -1
  135. package/lib/commands/ocr/index.js +1 -1
  136. package/lib/commands/page/generate-start.js +1 -1
  137. package/lib/commands/page/generate-status.js +1 -1
  138. package/lib/commands/page/index.js +1 -1
  139. package/lib/commands/page/pull.js +1 -1
  140. package/lib/commands/page/push.js +1 -1
  141. package/lib/commands/page/react/create.js +1 -0
  142. package/lib/commands/page/react/detail.js +1 -0
  143. package/lib/commands/page/react/list.js +1 -0
  144. package/lib/commands/page/react/publish.js +1 -0
  145. package/lib/commands/page/react/shared.js +1 -0
  146. package/lib/commands/page/react/syntax.js +1 -0
  147. package/lib/commands/page/react/template.js +1 -0
  148. package/lib/commands/page/react/update.js +1 -0
  149. package/lib/commands/page/relation-audit.js +1 -1
  150. package/lib/commands/page/restore.js +1 -1
  151. package/lib/commands/page/shared.js +1 -1
  152. package/lib/commands/page/standard-page-status.js +1 -1
  153. package/lib/commands/page/sync.js +1 -1
  154. package/lib/commands/permit/index.js +1 -1
  155. package/lib/commands/permit/page-get.js +1 -1
  156. package/lib/commands/permit/page-set.js +1 -1
  157. package/lib/commands/permit/role-apis-set.js +1 -1
  158. package/lib/commands/permit/role-menus-set.js +1 -1
  159. package/lib/commands/permit/role-menus.js +1 -1
  160. package/lib/commands/permit/shared.js +1 -1
  161. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  162. package/lib/commands/project/create/format-elapsed.js +1 -1
  163. package/lib/commands/project/create/main.js +1 -1
  164. package/lib/commands/project/create/non-interactive.js +1 -1
  165. package/lib/commands/project/create/project-template-path.js +1 -1
  166. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  167. package/lib/commands/project/create/use-format-code.js +1 -1
  168. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  169. package/lib/commands/project/index.js +1 -1
  170. package/lib/commands/project/upgrade.js +1 -1
  171. package/lib/commands/registry.js +1 -1
  172. package/lib/commands/role/create.js +1 -1
  173. package/lib/commands/role/delete.js +1 -1
  174. package/lib/commands/role/detail.js +1 -1
  175. package/lib/commands/role/index.js +1 -1
  176. package/lib/commands/role/list.js +1 -1
  177. package/lib/commands/role/shared.js +1 -1
  178. package/lib/commands/role/update.js +1 -1
  179. package/lib/commands/role/user-add.js +1 -1
  180. package/lib/commands/role/user-remove.js +1 -1
  181. package/lib/commands/role/user-resolve.js +1 -1
  182. package/lib/commands/run/index.js +1 -1
  183. package/lib/commands/schema.js +1 -1
  184. package/lib/commands/sql/create.js +1 -1
  185. package/lib/commands/sql/delete.js +1 -1
  186. package/lib/commands/sql/detail.js +1 -1
  187. package/lib/commands/sql/exec.js +1 -1
  188. package/lib/commands/sql/index.js +1 -1
  189. package/lib/commands/sql/list.js +1 -1
  190. package/lib/commands/sql/pull.js +1 -1
  191. package/lib/commands/sql/push.js +1 -1
  192. package/lib/commands/sql/shared.js +1 -1
  193. package/lib/commands/sql/status.js +1 -1
  194. package/lib/commands/sql/validate.js +1 -1
  195. package/lib/commands/task/index.js +1 -1
  196. package/lib/commands/task/status.js +1 -1
  197. package/lib/commands/tenant/index.js +1 -1
  198. package/lib/commands/tenant/members-list.js +1 -1
  199. package/lib/commands/tenant/shared.js +1 -1
  200. package/lib/commands/workspace/add.js +1 -1
  201. package/lib/commands/workspace/index.js +1 -1
  202. package/lib/commands/workspace/remove.js +1 -1
  203. package/lib/config/schema.js +1 -1
  204. package/lib/constant/cdn.js +1 -1
  205. package/lib/constant/cli.js +1 -1
  206. package/lib/constant/defaults.js +1 -1
  207. package/lib/constant/domain.js +1 -1
  208. package/lib/constant/env.js +1 -1
  209. package/lib/constant/output.js +1 -1
  210. package/lib/constant/paths.js +1 -1
  211. package/lib/constant/risk.js +1 -1
  212. package/lib/context/app-resolver.js +1 -1
  213. package/lib/context/auth-resolver.js +1 -1
  214. package/lib/context/config-loader.js +1 -1
  215. package/lib/context.js +1 -1
  216. package/lib/core/alias-resolver.js +1 -1
  217. package/lib/core/api-client.js +1 -1
  218. package/lib/core/bff/config.js +1 -1
  219. package/lib/core/bff/file-system.js +1 -1
  220. package/lib/core/bff/hash.js +1 -1
  221. package/lib/core/bff/lock.js +1 -1
  222. package/lib/core/bff/utils.js +1 -1
  223. package/lib/core/db-resolver.js +1 -1
  224. package/lib/core/page/file-system.js +1 -1
  225. package/lib/core/page/hash.js +1 -1
  226. package/lib/core/page/lock.js +1 -1
  227. package/lib/core/sql-index-auditor.js +1 -1
  228. package/lib/core/sql-sync/config.js +1 -1
  229. package/lib/core/sql-sync/file-system.js +1 -1
  230. package/lib/core/sql-sync/hash.js +1 -1
  231. package/lib/core/sql-sync/lock.js +1 -1
  232. package/lib/core/sql-sync/utils.js +1 -1
  233. package/lib/core/sql-validator.js +1 -1
  234. package/lib/errors.js +1 -1
  235. package/lib/framework/build-all-flags.js +1 -1
  236. package/lib/framework/error-output.js +1 -1
  237. package/lib/framework/explicit-yes.js +1 -1
  238. package/lib/framework/flags.js +1 -1
  239. package/lib/framework/help.js +1 -1
  240. package/lib/framework/index.js +1 -1
  241. package/lib/framework/output.js +1 -1
  242. package/lib/framework/response.js +1 -1
  243. package/lib/framework/runner-alias.js +1 -1
  244. package/lib/framework/runner.js +1 -1
  245. package/lib/framework/schema-export.js +1 -1
  246. package/lib/framework/types.js +1 -1
  247. package/lib/generated/build-info.js +1 -1
  248. package/lib/help.js +1 -1
  249. package/lib/skills/main.js +1 -1
  250. package/lib/skills/npx-skills-add.js +1 -1
  251. package/lib/skills/skill-presence.js +1 -1
  252. package/lib/telemetry/cli-command-trace.js +1 -1
  253. package/lib/telemetry/cli-help-trace.js +1 -1
  254. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  255. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  256. package/lib/telemetry/send-cli-trace-log.js +1 -1
  257. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  258. package/lib/utils/ai_config.js +1 -1
  259. package/lib/utils/apply-jq-filter.js +1 -1
  260. package/lib/utils/cdn-config.js +1 -1
  261. package/lib/utils/check-sdk-version.js +1 -1
  262. package/lib/utils/cli-version-check.js +1 -1
  263. package/lib/utils/cli-version-policy.js +1 -1
  264. package/lib/utils/config.js +1 -1
  265. package/lib/utils/copy-directory.js +1 -1
  266. package/lib/utils/entity-with-id.js +1 -1
  267. package/lib/utils/file-utils.js +1 -1
  268. package/lib/utils/guides-cdn.js +1 -1
  269. package/lib/utils/http-client.js +1 -1
  270. package/lib/utils/is-non-interactive.js +1 -1
  271. package/lib/utils/logger.js +1 -1
  272. package/lib/utils/params.js +1 -1
  273. package/lib/utils/platform.js +1 -1
  274. package/lib/utils/rules-cdn.js +1 -1
  275. package/lib/utils/sleep.js +1 -1
  276. package/lib/utils/template-replacer.js +1 -1
  277. package/lib/utils/update-notice.js +1 -1
  278. package/lib/utils/version.js +1 -1
  279. package/lib/utils/with-active-cookie.js +1 -1
  280. package/lib/utils/write-cli-side-channel.js +1 -1
  281. package/package.json +1 -1
  282. package/templates/projects/sub-app-react-demo/CHANGELOG.md +1 -1
  283. package/templates/projects/sub-app-react-demo/README.md +1 -1
  284. package/templates/projects/sub-app-react-demo/docs/quick-start.md +1 -1
  285. package/templates/projects/sub-app-react-demo/src/pages/index.tsx +1 -1
  286. package/lib/commands/project/init.js +0 -1
  287. package/lib/commands/sql/save.js +0 -1
@@ -1 +1 @@
1
- (function(_0x7125f9,_0x4200f6){const _0x605371=a264_0x514e,_0x14d4c3=_0x7125f9();while(!![]){try{const _0x47a374=parseInt(_0x605371(0x164))/0x1+parseInt(_0x605371(0x160))/0x2*(-parseInt(_0x605371(0x166))/0x3)+-parseInt(_0x605371(0x15e))/0x4+-parseInt(_0x605371(0x162))/0x5+parseInt(_0x605371(0x15f))/0x6*(-parseInt(_0x605371(0x165))/0x7)+parseInt(_0x605371(0x161))/0x8+-parseInt(_0x605371(0x163))/0x9;if(_0x47a374===_0x4200f6)break;else _0x14d4c3['push'](_0x14d4c3['shift']());}catch(_0x16abb9){_0x14d4c3['push'](_0x14d4c3['shift']());}}}(a264_0x1cf6,0xbe6ed));import{existsSync,mkdirSync,copyFileSync,readdirSync,statSync}from'node:fs';function a264_0x1cf6(){const _0x242cf1=['isDirectory','600456gWVJxG','6GjboNx','10sNCzeq','7617824mhlHWi','589205uHSRCw','6023916XhmdBm','1064766othgpj','1959209lJXhfm','11889ffiXWw'];a264_0x1cf6=function(){return _0x242cf1;};return a264_0x1cf6();}function a264_0x514e(_0x457b88,_0x4a1a1b){_0x457b88=_0x457b88-0x15e;const _0x1cf6fc=a264_0x1cf6();let _0x514e6f=_0x1cf6fc[_0x457b88];return _0x514e6f;}import{join}from'node:path';export async function copyDir(_0x30ca04,_0x2096f8){const _0x2d83a7=a264_0x514e,_0x16f248=statSync(_0x30ca04);if(_0x16f248[_0x2d83a7(0x167)]()){!existsSync(_0x2096f8)&&mkdirSync(_0x2096f8,{'recursive':!![]});const _0x397079=readdirSync(_0x30ca04);for(const _0x441e07 of _0x397079){await copyDir(join(_0x30ca04,_0x441e07),join(_0x2096f8,_0x441e07));}}else copyFileSync(_0x30ca04,_0x2096f8);}export function ensureDir(_0x198a37){!existsSync(_0x198a37)&&mkdirSync(_0x198a37,{'recursive':!![]});}export function pathExists(_0x5d02b6){return existsSync(_0x5d02b6);}
1
+ (function(_0x267fb7,_0x10d75b){const _0x37c7e3=a270_0x2722,_0x211632=_0x267fb7();while(!![]){try{const _0x54f4f6=-parseInt(_0x37c7e3(0x1bb))/0x1+parseInt(_0x37c7e3(0x1c0))/0x2*(-parseInt(_0x37c7e3(0x1c2))/0x3)+-parseInt(_0x37c7e3(0x1bd))/0x4+-parseInt(_0x37c7e3(0x1bc))/0x5+parseInt(_0x37c7e3(0x1b9))/0x6*(parseInt(_0x37c7e3(0x1b8))/0x7)+-parseInt(_0x37c7e3(0x1be))/0x8*(parseInt(_0x37c7e3(0x1c1))/0x9)+-parseInt(_0x37c7e3(0x1bf))/0xa*(-parseInt(_0x37c7e3(0x1ba))/0xb);if(_0x54f4f6===_0x10d75b)break;else _0x211632['push'](_0x211632['shift']());}catch(_0x3aa6cd){_0x211632['push'](_0x211632['shift']());}}}(a270_0x123b,0x61b60));import{existsSync,mkdirSync,copyFileSync,readdirSync,statSync}from'node:fs';import{join}from'node:path';function a270_0x2722(_0x2ddf71,_0x3eb958){_0x2ddf71=_0x2ddf71-0x1b8;const _0x123b57=a270_0x123b();let _0x27228a=_0x123b57[_0x2ddf71];return _0x27228a;}function a270_0x123b(){const _0x2057e8=['463707HnjOZi','1947786oUyWOR','41545TbZdFG','294TrizRh','23744941JGVOwL','621242dmMukl','3405880mAiuZe','184076CwLBCJ','8jFhpAb','10nhZdVc','2hIcQjN'];a270_0x123b=function(){return _0x2057e8;};return a270_0x123b();}export async function copyDir(_0x329bd1,_0x59998f){const _0x5103d0=statSync(_0x329bd1);if(_0x5103d0['isDirectory']()){!existsSync(_0x59998f)&&mkdirSync(_0x59998f,{'recursive':!![]});const _0x8e25ca=readdirSync(_0x329bd1);for(const _0x3de24c of _0x8e25ca){await copyDir(join(_0x329bd1,_0x3de24c),join(_0x59998f,_0x3de24c));}}else copyFileSync(_0x329bd1,_0x59998f);}export function ensureDir(_0x306bbd){!existsSync(_0x306bbd)&&mkdirSync(_0x306bbd,{'recursive':!![]});}export function pathExists(_0xf895bf){return existsSync(_0xf895bf);}
@@ -1 +1 @@
1
- const a265_0x63602a=a265_0x5a8a;(function(_0x8b3c8a,_0x40bb73){const _0x3cfc94=a265_0x5a8a,_0x249ffa=_0x8b3c8a();while(!![]){try{const _0x367ee2=parseInt(_0x3cfc94(0x118))/0x1+parseInt(_0x3cfc94(0x11d))/0x2*(-parseInt(_0x3cfc94(0x11c))/0x3)+parseInt(_0x3cfc94(0x115))/0x4+parseInt(_0x3cfc94(0x116))/0x5+-parseInt(_0x3cfc94(0x119))/0x6+-parseInt(_0x3cfc94(0xfd))/0x7+parseInt(_0x3cfc94(0x10c))/0x8;if(_0x367ee2===_0x40bb73)break;else _0x249ffa['push'](_0x249ffa['shift']());}catch(_0x1a57a7){_0x249ffa['push'](_0x249ffa['shift']());}}}(a265_0xe192,0x861a6));function a265_0x5a8a(_0x56c189,_0xff89ac){_0x56c189=_0x56c189-0xfd;const _0xe192e5=a265_0xe192();let _0x5a8aca=_0xe192e5[_0x56c189];return _0x5a8aca;}import{mkdirSync,writeFileSync}from'node:fs';import{dirname,join}from'node:path';import{homedir}from'node:os';import{getTemplateBaseUrl}from'../utils/config.js';function getGuidesCdnUrl(){const _0xe1bc94=a265_0x5a8a,_0xe41bcd=getTemplateBaseUrl();return _0xe41bcd+_0xe1bc94(0x103);}const CACHE_DIR=join(homedir(),a265_0x63602a(0x109),a265_0x63602a(0x112));export async function fetchGuidesFromCDN(){const _0x59160f=a265_0x63602a,_0xabfcce=getGuidesCdnUrl(),_0x3f2cf7=await fetch(_0xabfcce,{'headers':{'Accept':_0x59160f(0x10a)}});if(!_0x3f2cf7['ok'])throw new Error(_0x59160f(0x104)+_0x3f2cf7[_0x59160f(0x100)]+'\x20'+_0x3f2cf7[_0x59160f(0x10f)]);const _0x444952=await _0x3f2cf7['json']();if(!_0x444952[_0x59160f(0xff)]||typeof _0x444952[_0x59160f(0xff)]!==_0x59160f(0x114))throw new Error('CDN\x20返回数据格式错误');return _0x444952;}export function writeGuidesToProject(_0x185a93,_0x1261f8,_0x4771c3=a265_0x63602a(0x108),_0x4d665d){const _0x5abd06=a265_0x63602a,_0x5012ee=join(_0x1261f8,_0x4771c3);mkdirSync(_0x5012ee,{'recursive':!![]});for(const [_0xf9de26,_0x3d9988]of Object[_0x5abd06(0x111)](_0x185a93[_0x5abd06(0xff)])){let _0x48acc3=_0x3d9988[_0x5abd06(0x105)];_0x3d9988[_0x5abd06(0x107)]&&(_0x48acc3=appendUpdateTime(_0x48acc3,_0x3d9988['lastUpdated'])),writeFileSync(join(_0x5012ee,_0xf9de26+_0x5abd06(0x113)),_0x48acc3,'utf-8');}}export function appendUpdateTime(_0x3f1b27,_0x467cef){const _0x32b18c=a265_0x63602a;return _0x3f1b27=_0x3f1b27[_0x32b18c(0x11b)](/\n*>更新时间:.*$/m,''),_0x3f1b27[_0x32b18c(0x101)]()+('\x0a\x0a>更新时间:'+_0x467cef);}export function getSkillTemplate(_0x31fcb3){const _0x3891f3=a265_0x63602a;return _0x31fcb3[_0x3891f3(0x117)]?.['content']||'';}function a265_0xe192(){const _0x3e1889=['2196054TqUYvn','join','guides','status','trimEnd','utf-8','/skills/guides.json','CDN\x20请求失败:\x20','content','push','lastUpdated','.lovrabet/skill/guides','.lovrabet','application/json','length','16656920ExBVQN','keys','CDN\x20数据中缺少\x20skillTemplate','statusText','map','entries','cache','.md','object','42636PGoEps','376890FOZNJD','skillTemplate','187565oldltv','2698968wBCfhN','extendContent','replace','148983xiIlfK','42Flhavx'];a265_0xe192=function(){return _0x3e1889;};return a265_0xe192();}export function appendExtendContents(_0x3bb24a,_0x3a7adc,_0x5c1894){const _0x4e9b09=a265_0x63602a,_0x2a020f=[];for(const [,_0x4498f4]of Object[_0x4e9b09(0x111)](_0x3a7adc[_0x4e9b09(0xff)])){_0x4498f4[_0x4e9b09(0x11a)]&&_0x2a020f[_0x4e9b09(0x106)](_0x4498f4['extendContent'][_0x4e9b09(0x101)]());}if(_0x2a020f[_0x4e9b09(0x10b)]===0x0)return _0x3bb24a;return _0x3bb24a[_0x4e9b09(0x101)]()+'\x0a\x0a'+_0x2a020f[_0x4e9b09(0xfe)]('\x0a\x0a')+'\x0a';}export function writeSkillFile(_0x347fff,_0xcf1a7f,_0x2306ed){const _0x50167f=a265_0x63602a,_0xa1ce59=getSkillTemplate(_0x347fff);if(!_0xa1ce59)throw new Error(_0x50167f(0x10e));const _0x1e5938=dirname(_0xcf1a7f);mkdirSync(_0x1e5938,{'recursive':!![]});let _0x44106e=_0xa1ce59[_0x50167f(0x11b)](/\{\{IDE_NAME\}\}/g,_0x2306ed);_0x44106e=appendExtendContents(_0x44106e,_0x347fff),_0x347fff[_0x50167f(0x117)][_0x50167f(0x107)]&&(_0x44106e=appendUpdateTime(_0x44106e,_0x347fff[_0x50167f(0x117)][_0x50167f(0x107)])),writeFileSync(_0xcf1a7f,_0x44106e,_0x50167f(0x102));}export async function installGuides(_0x57c21c){const _0x3fe18f=a265_0x63602a,_0x5dc42a=await fetchGuidesFromCDN();return writeGuidesToProject(_0x5dc42a,_0x57c21c),Object[_0x3fe18f(0x10d)](_0x5dc42a[_0x3fe18f(0xff)])[_0x3fe18f(0x10b)];}export function getGuidesSummary(_0x20745e){const _0x115b99=a265_0x63602a;return Object['entries'](_0x20745e[_0x115b99(0xff)])[_0x115b99(0x110)](([_0x27996b,_0x6a3e34])=>({'key':_0x27996b,'title':_0x6a3e34['title'],'path':_0x6a3e34['path']}));}
1
+ const a271_0x294bf0=a271_0x3e2e;(function(_0x99478a,_0x510bad){const _0x551682=a271_0x3e2e,_0x493dd5=_0x99478a();while(!![]){try{const _0x5c1949=parseInt(_0x551682(0x1fa))/0x1+-parseInt(_0x551682(0x1eb))/0x2+-parseInt(_0x551682(0x1f5))/0x3*(parseInt(_0x551682(0x1ef))/0x4)+parseInt(_0x551682(0x1f0))/0x5+-parseInt(_0x551682(0x1fe))/0x6+-parseInt(_0x551682(0x205))/0x7+-parseInt(_0x551682(0x1ee))/0x8*(-parseInt(_0x551682(0x1f2))/0x9);if(_0x5c1949===_0x510bad)break;else _0x493dd5['push'](_0x493dd5['shift']());}catch(_0x4cf271){_0x493dd5['push'](_0x493dd5['shift']());}}}(a271_0x5ca7,0xe2bc8));import{mkdirSync,writeFileSync}from'node:fs';function a271_0x3e2e(_0x5495fe,_0x2d0893){_0x5495fe=_0x5495fe-0x1e8;const _0x5ca761=a271_0x5ca7();let _0x3e2e39=_0x5ca761[_0x5495fe];return _0x3e2e39;}import{dirname,join}from'node:path';import{homedir}from'node:os';import{getTemplateBaseUrl}from'../utils/config.js';function getGuidesCdnUrl(){const _0x48a6a3=a271_0x3e2e,_0x26eceb=getTemplateBaseUrl();return _0x26eceb+_0x48a6a3(0x1f9);}const CACHE_DIR=join(homedir(),a271_0x294bf0(0x200),'cache');function a271_0x5ca7(){const _0x3d7699=['6rqMQzj','replace','skillTemplate','CDN\x20请求失败:\x20','/skills/guides.json','280671EEFdcg','path','trimEnd','.md','10698252TcmLzU','object','.lovrabet','map','content','push','.lovrabet/skill/guides','6099464PuCQSo','statusText','CDN\x20数据中缺少\x20skillTemplate','CDN\x20返回数据格式错误','lastUpdated','2936462zMfTmG','extendContent','length','400NwTCGb','2321324hbgJfO','5650640mGEErM','utf-8','864216VjZcqs','entries','guides'];a271_0x5ca7=function(){return _0x3d7699;};return a271_0x5ca7();}export async function fetchGuidesFromCDN(){const _0x579d32=a271_0x294bf0,_0x30eeb0=getGuidesCdnUrl(),_0x1a33b3=await fetch(_0x30eeb0,{'headers':{'Accept':'application/json'}});if(!_0x1a33b3['ok'])throw new Error(_0x579d32(0x1f8)+_0x1a33b3['status']+'\x20'+_0x1a33b3[_0x579d32(0x206)]);const _0x541a85=await _0x1a33b3['json']();if(!_0x541a85['guides']||typeof _0x541a85[_0x579d32(0x1f4)]!==_0x579d32(0x1ff))throw new Error(_0x579d32(0x1e9));return _0x541a85;}export function writeGuidesToProject(_0x377f43,_0xddd0e5,_0x509ebc=a271_0x294bf0(0x204),_0x3b6cdf){const _0x7ac19d=a271_0x294bf0,_0x25b5c1=join(_0xddd0e5,_0x509ebc);mkdirSync(_0x25b5c1,{'recursive':!![]});for(const [_0x3f0d29,_0x17a1ab]of Object['entries'](_0x377f43[_0x7ac19d(0x1f4)])){let _0x125d47=_0x17a1ab[_0x7ac19d(0x202)];_0x17a1ab[_0x7ac19d(0x1ea)]&&(_0x125d47=appendUpdateTime(_0x125d47,_0x17a1ab['lastUpdated'])),writeFileSync(join(_0x25b5c1,_0x3f0d29+_0x7ac19d(0x1fd)),_0x125d47,_0x7ac19d(0x1f1));}}export function appendUpdateTime(_0x2cafe3,_0x13d756){const _0xa1e76a=a271_0x294bf0;return _0x2cafe3=_0x2cafe3[_0xa1e76a(0x1f6)](/\n*>更新时间:.*$/m,''),_0x2cafe3['trimEnd']()+('\x0a\x0a>更新时间:'+_0x13d756);}export function getSkillTemplate(_0x52908b){const _0x4e3d54=a271_0x294bf0;return _0x52908b['skillTemplate']?.[_0x4e3d54(0x202)]||'';}export function appendExtendContents(_0x2bed36,_0x240c16,_0xcab8e2){const _0x163c85=a271_0x294bf0,_0x1a7a8a=[];for(const [,_0x417845]of Object[_0x163c85(0x1f3)](_0x240c16[_0x163c85(0x1f4)])){_0x417845[_0x163c85(0x1ec)]&&_0x1a7a8a[_0x163c85(0x203)](_0x417845['extendContent']['trimEnd']());}if(_0x1a7a8a[_0x163c85(0x1ed)]===0x0)return _0x2bed36;return _0x2bed36[_0x163c85(0x1fc)]()+'\x0a\x0a'+_0x1a7a8a['join']('\x0a\x0a')+'\x0a';}export function writeSkillFile(_0x49aa14,_0x335496,_0x5a925a){const _0x25c3eb=a271_0x294bf0,_0x3c7840=getSkillTemplate(_0x49aa14);if(!_0x3c7840)throw new Error(_0x25c3eb(0x1e8));const _0x3a571d=dirname(_0x335496);mkdirSync(_0x3a571d,{'recursive':!![]});let _0x2d1209=_0x3c7840['replace'](/\{\{IDE_NAME\}\}/g,_0x5a925a);_0x2d1209=appendExtendContents(_0x2d1209,_0x49aa14),_0x49aa14[_0x25c3eb(0x1f7)]['lastUpdated']&&(_0x2d1209=appendUpdateTime(_0x2d1209,_0x49aa14[_0x25c3eb(0x1f7)]['lastUpdated'])),writeFileSync(_0x335496,_0x2d1209,_0x25c3eb(0x1f1));}export async function installGuides(_0x355e68){const _0x52c455=a271_0x294bf0,_0x5ed514=await fetchGuidesFromCDN();return writeGuidesToProject(_0x5ed514,_0x355e68),Object['keys'](_0x5ed514[_0x52c455(0x1f4)])[_0x52c455(0x1ed)];}export function getGuidesSummary(_0xb02db0){const _0x2cade0=a271_0x294bf0;return Object[_0x2cade0(0x1f3)](_0xb02db0[_0x2cade0(0x1f4)])[_0x2cade0(0x201)](([_0x3921d2,_0x298a12])=>({'key':_0x3921d2,'title':_0x298a12['title'],'path':_0x298a12[_0x2cade0(0x1fb)]}));}
@@ -1 +1 @@
1
- function a266_0x2800(_0x22552c,_0x1a037d){_0x22552c=_0x22552c-0x1b5;const _0x5a3ba7=a266_0x5a3b();let _0x2800b8=_0x5a3ba7[_0x22552c];return _0x2800b8;}(function(_0x115798,_0x4be149){const _0x5991d0=a266_0x2800,_0x35c0e9=_0x115798();while(!![]){try{const _0x2f7b92=-parseInt(_0x5991d0(0x1c8))/0x1*(parseInt(_0x5991d0(0x1bd))/0x2)+parseInt(_0x5991d0(0x1cf))/0x3*(parseInt(_0x5991d0(0x1cb))/0x4)+parseInt(_0x5991d0(0x1b7))/0x5+parseInt(_0x5991d0(0x1c2))/0x6+-parseInt(_0x5991d0(0x1bf))/0x7*(parseInt(_0x5991d0(0x1ba))/0x8)+parseInt(_0x5991d0(0x1c3))/0x9*(-parseInt(_0x5991d0(0x1c6))/0xa)+parseInt(_0x5991d0(0x1bc))/0xb;if(_0x2f7b92===_0x4be149)break;else _0x35c0e9['push'](_0x35c0e9['shift']());}catch(_0x419dcf){_0x35c0e9['push'](_0x35c0e9['shift']());}}}(a266_0x5a3b,0xab964));export async function httpRequest(_0x3124ac,_0x539e60={}){const _0x5bd4f9=a266_0x2800,{timeout:timeout=0x7530,retries:retries=0x3,retryDelay:retryDelay=0x3e8,headers:headers={}}=_0x539e60;let _0x1b35f9=null;for(let _0xc25e01=0x0;_0xc25e01<=retries;_0xc25e01++){try{const _0x4d28bf=new AbortController(),_0x287e45=setTimeout(()=>_0x4d28bf[_0x5bd4f9(0x1c5)](),timeout),_0x559acc=await fetch(_0x3124ac,{'headers':headers,'signal':_0x4d28bf['signal']});clearTimeout(_0x287e45);let _0x184895;const _0x455d12=_0x559acc['headers'][_0x5bd4f9(0x1b9)]('content-type');return _0x455d12?.[_0x5bd4f9(0x1cc)](_0x5bd4f9(0x1bb))?_0x184895=await _0x559acc['json']():_0x184895=await _0x559acc[_0x5bd4f9(0x1cd)](),{'ok':_0x559acc['ok'],'status':_0x559acc[_0x5bd4f9(0x1b6)],'statusText':_0x559acc[_0x5bd4f9(0x1c0)],'data':_0x184895,'headers':_0x559acc['headers'],'url':_0x559acc[_0x5bd4f9(0x1c4)],'text':()=>_0x559acc[_0x5bd4f9(0x1cd)]()};}catch(_0x282a5b){_0x1b35f9=_0x282a5b instanceof Error?_0x282a5b:new Error(String(_0x282a5b));if(_0xc25e01===retries)break;if(shouldRetry(_0x282a5b)){console[_0x5bd4f9(0x1c7)](_0x5bd4f9(0x1ce)+retryDelay+'ms\x20后进行第\x20'+(_0xc25e01+0x1)+'\x20次重试...'),await sleep(retryDelay);continue;}else break;}}throw _0x1b35f9||new Error(_0x5bd4f9(0x1be));}function shouldRetry(_0x2a0548){const _0x365878=a266_0x2800;if(_0x2a0548 instanceof Error){if(_0x2a0548[_0x365878(0x1c9)]==='AbortError')return![];if(_0x2a0548[_0x365878(0x1c9)]===_0x365878(0x1ca)&&_0x2a0548[_0x365878(0x1b5)][_0x365878(0x1cc)](_0x365878(0x1b8)))return!![];if(_0x2a0548[_0x365878(0x1b5)][_0x365878(0x1cc)](_0x365878(0x1c1)))return!![];if(_0x2a0548['message'][_0x365878(0x1cc)]('ENOTFOUND'))return![];}return![];}function a266_0x5a3b(){const _0x31d107=['ECONNRESET','187452PbWMMd','1683esMMVQ','url','abort','7340efrIjT','log','23QPnMhM','name','TypeError','32sOIZSV','includes','text','*\x20请求失败,','510054sQUsTe','message','status','1125930OEdrgw','fetch','get','6872HUFTKq','application/json','11276672FMleCK','104602vcjmSc','Request\x20failed','4879EhIoLN','statusText'];a266_0x5a3b=function(){return _0x31d107;};return a266_0x5a3b();}function sleep(_0x4e0318){return new Promise(_0x316813=>setTimeout(_0x316813,_0x4e0318));}export function validateUrl(_0x1711c8){try{return new URL(_0x1711c8),!![];}catch{return![];}}
1
+ function a272_0x3b63(){const _0x8b0ae0=['TypeError','222FmXRNx','Request\x20failed','2909578VdIZee','44224020qmWDBO','json','1448212LWLpQP','fetch','ms\x20后进行第\x20','AbortError','name','\x20次重试...','1340863cGqOKt','*\x20请求失败,','abort','log','5153795QqpJkL','includes','ECONNRESET','content-type','24Ghcpgd','headers','message','49896JOdAPB','application/json','url','text','statusText','status','2652880ZTiMvh'];a272_0x3b63=function(){return _0x8b0ae0;};return a272_0x3b63();}(function(_0xf9d5ac,_0x30832b){const _0x5bdf9e=a272_0x80e4,_0x11c817=_0xf9d5ac();while(!![]){try{const _0x31a67e=parseInt(_0x5bdf9e(0x92))/0x1+-parseInt(_0x5bdf9e(0x9d))/0x2*(-parseInt(_0x5bdf9e(0xa5))/0x3)+parseInt(_0x5bdf9e(0xaa))/0x4+parseInt(_0x5bdf9e(0x96))/0x5+-parseInt(_0x5bdf9e(0x9a))/0x6*(-parseInt(_0x5bdf9e(0xa7))/0x7)+-parseInt(_0x5bdf9e(0xa3))/0x8+-parseInt(_0x5bdf9e(0xa8))/0x9;if(_0x31a67e===_0x30832b)break;else _0x11c817['push'](_0x11c817['shift']());}catch(_0x441aec){_0x11c817['push'](_0x11c817['shift']());}}}(a272_0x3b63,0xf36bd));export async function httpRequest(_0x556a84,_0x4501db={}){const _0x1e5057=a272_0x80e4,{timeout:timeout=0x7530,retries:retries=0x3,retryDelay:retryDelay=0x3e8,headers:headers={}}=_0x4501db;let _0x3da6cd=null;for(let _0x94fa3=0x0;_0x94fa3<=retries;_0x94fa3++){try{const _0x107257=new AbortController(),_0x264706=setTimeout(()=>_0x107257[_0x1e5057(0x94)](),timeout),_0x3f6033=await fetch(_0x556a84,{'headers':headers,'signal':_0x107257['signal']});clearTimeout(_0x264706);let _0x4641be;const _0x23d2e2=_0x3f6033[_0x1e5057(0x9b)]['get'](_0x1e5057(0x99));return _0x23d2e2?.[_0x1e5057(0x97)](_0x1e5057(0x9e))?_0x4641be=await _0x3f6033[_0x1e5057(0xa9)]():_0x4641be=await _0x3f6033[_0x1e5057(0xa0)](),{'ok':_0x3f6033['ok'],'status':_0x3f6033[_0x1e5057(0xa2)],'statusText':_0x3f6033[_0x1e5057(0xa1)],'data':_0x4641be,'headers':_0x3f6033[_0x1e5057(0x9b)],'url':_0x3f6033[_0x1e5057(0x9f)],'text':()=>_0x3f6033[_0x1e5057(0xa0)]()};}catch(_0x107799){_0x3da6cd=_0x107799 instanceof Error?_0x107799:new Error(String(_0x107799));if(_0x94fa3===retries)break;if(shouldRetry(_0x107799)){console[_0x1e5057(0x95)](_0x1e5057(0x93)+retryDelay+_0x1e5057(0x8e)+(_0x94fa3+0x1)+_0x1e5057(0x91)),await sleep(retryDelay);continue;}else break;}}throw _0x3da6cd||new Error(_0x1e5057(0xa6));}function shouldRetry(_0x56bf6d){const _0x32dec5=a272_0x80e4;if(_0x56bf6d instanceof Error){if(_0x56bf6d[_0x32dec5(0x90)]===_0x32dec5(0x8f))return![];if(_0x56bf6d[_0x32dec5(0x90)]===_0x32dec5(0xa4)&&_0x56bf6d[_0x32dec5(0x9c)]['includes'](_0x32dec5(0x8d)))return!![];if(_0x56bf6d[_0x32dec5(0x9c)][_0x32dec5(0x97)](_0x32dec5(0x98)))return!![];if(_0x56bf6d['message'][_0x32dec5(0x97)]('ENOTFOUND'))return![];}return![];}function a272_0x80e4(_0x52a80d,_0x1b15b6){_0x52a80d=_0x52a80d-0x8d;const _0x3b63bb=a272_0x3b63();let _0x80e46=_0x3b63bb[_0x52a80d];return _0x80e46;}function sleep(_0x139bee){return new Promise(_0x47135a=>setTimeout(_0x47135a,_0x139bee));}export function validateUrl(_0xa8e4f4){try{return new URL(_0xa8e4f4),!![];}catch{return![];}}
@@ -1 +1 @@
1
- function a267_0x417f(_0x14bd8e,_0x1222fe){_0x14bd8e=_0x14bd8e-0xee;const _0x197f2d=a267_0x197f();let _0x417fe0=_0x197f2d[_0x14bd8e];return _0x417fe0;}(function(_0x272144,_0x15b509){const _0x7eddca=a267_0x417f,_0x521add=_0x272144();while(!![]){try{const _0x2e6099=parseInt(_0x7eddca(0xfc))/0x1+-parseInt(_0x7eddca(0xee))/0x2*(parseInt(_0x7eddca(0xf2))/0x3)+-parseInt(_0x7eddca(0xf6))/0x4*(parseInt(_0x7eddca(0xf3))/0x5)+-parseInt(_0x7eddca(0xef))/0x6*(-parseInt(_0x7eddca(0xf8))/0x7)+-parseInt(_0x7eddca(0xf9))/0x8+-parseInt(_0x7eddca(0xf7))/0x9+parseInt(_0x7eddca(0xf4))/0xa;if(_0x2e6099===_0x15b509)break;else _0x521add['push'](_0x521add['shift']());}catch(_0x1a3eec){_0x521add['push'](_0x521add['shift']());}}}(a267_0x197f,0xc5005));function a267_0x197f(){const _0x359eb0=['7692IywjJC','true','isTTY','3VCnFfl','3300485LFzHXa','26998240juGuZB','nonInteractive','4cVhAoD','12485898dbjccS','6377RUgMGm','8162528bWxdEF','setRawMode','stdin','155439FjjNVz','297026VFYzSh'];a267_0x197f=function(){return _0x359eb0;};return a267_0x197f();}function env(_0x3f93e1){return process.env[`RABETBASE_${_0x3f93e1}`]||process.env[`LOVRABET_${_0x3f93e1}`]||undefined;}export function isNonInteractive(_0x593a37){const _0x36a55e=a267_0x417f;return!!(_0x593a37[_0x36a55e(0xf5)]||_0x593a37['ci']||env('CI')===_0x36a55e(0xf0)||process.env.CI===_0x36a55e(0xf0)||!process['stdout'][_0x36a55e(0xf1)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x2123af=a267_0x417f;if(!process[_0x2123af(0xfb)][_0x2123af(0xf1)])return![];try{const _0x247453=process['stdin']['isRaw'];return process[_0x2123af(0xfb)][_0x2123af(0xfa)](!![]),process[_0x2123af(0xfb)]['setRawMode'](_0x247453??![]),!![];}catch{return![];}}
1
+ (function(_0x230176,_0x3b21e6){const _0x3460aa=a273_0x1da1,_0x515666=_0x230176();while(!![]){try{const _0x3770c1=parseInt(_0x3460aa(0x90))/0x1+-parseInt(_0x3460aa(0x95))/0x2+-parseInt(_0x3460aa(0x94))/0x3*(-parseInt(_0x3460aa(0x91))/0x4)+parseInt(_0x3460aa(0x8d))/0x5*(parseInt(_0x3460aa(0x88))/0x6)+-parseInt(_0x3460aa(0x98))/0x7+-parseInt(_0x3460aa(0x92))/0x8*(parseInt(_0x3460aa(0x97))/0x9)+parseInt(_0x3460aa(0x96))/0xa*(parseInt(_0x3460aa(0x8a))/0xb);if(_0x3770c1===_0x3b21e6)break;else _0x515666['push'](_0x515666['shift']());}catch(_0x48cfd5){_0x515666['push'](_0x515666['shift']());}}}(a273_0x3edb,0x8b4d3));function a273_0x1da1(_0x1b2350,_0x26af48){_0x1b2350=_0x1b2350-0x88;const _0x3edb33=a273_0x3edb();let _0x1da1e1=_0x3edb33[_0x1b2350];return _0x1da1e1;}function a273_0x3edb(){const _0x5ea8ce=['stdout','isTTY','375ibYdXs','setRawMode','true','365332VRhvJl','7628DZwbJY','27000qExeyH','isRaw','321RZjDrh','781248OgHXbl','10zBgdEA','396xLAMyq','122654nTAIGY','24684YxncjK','stdin','2742234psNcDl'];a273_0x3edb=function(){return _0x5ea8ce;};return a273_0x3edb();}function env(_0x4ac5ef){return process.env[`RABETBASE_${_0x4ac5ef}`]||process.env[`LOVRABET_${_0x4ac5ef}`]||undefined;}export function isNonInteractive(_0x2591b2){const _0x542415=a273_0x1da1;return!!(_0x2591b2['nonInteractive']||_0x2591b2['ci']||env('CI')==='true'||process.env.CI===_0x542415(0x8f)||!process[_0x542415(0x8b)][_0x542415(0x8c)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x4ec373=a273_0x1da1;if(!process[_0x4ec373(0x89)]['isTTY'])return![];try{const _0x583f0=process[_0x4ec373(0x89)][_0x4ec373(0x93)];return process[_0x4ec373(0x89)][_0x4ec373(0x8e)](!![]),process['stdin'][_0x4ec373(0x8e)](_0x583f0??![]),!![];}catch{return![];}}
@@ -1 +1 @@
1
- const a268_0x430b55=a268_0x4e51;(function(_0x5b24b4,_0x2303db){const _0x1d3bee=a268_0x4e51,_0x7d665f=_0x5b24b4();while(!![]){try{const _0x538371=parseInt(_0x1d3bee(0xe5))/0x1+parseInt(_0x1d3bee(0xff))/0x2*(-parseInt(_0x1d3bee(0x105))/0x3)+parseInt(_0x1d3bee(0xdc))/0x4*(-parseInt(_0x1d3bee(0xef))/0x5)+-parseInt(_0x1d3bee(0xda))/0x6*(parseInt(_0x1d3bee(0xea))/0x7)+parseInt(_0x1d3bee(0x106))/0x8+parseInt(_0x1d3bee(0x10b))/0x9+parseInt(_0x1d3bee(0x109))/0xa;if(_0x538371===_0x2303db)break;else _0x7d665f['push'](_0x7d665f['shift']());}catch(_0x456fa3){_0x7d665f['push'](_0x7d665f['shift']());}}}(a268_0x1abd,0x27102));import a268_0x326eb5 from'winston';function a268_0x1abd(){const _0x44269c=['setLogPath','clearLogs','3XpwXuk','1433736ctzjuz','mkdirSync','now','3121850JAvZWQ','unknown','1361232TFfUJE','parse','失败:\x20','611706JVPFju','split','113144GiKDGP','details','utf8','printf','filter','initWinstonLogger','timestamp','addColors','.lovrabet.log','27971grfKZC','format','完成:\x20','readFileSync','toISOString','7uExQvM','command','winstonLogger','开始执行:\x20','clear','20ZGSXrG','existsSync','dirname','red','info','message','success','blue','yellow','combine','currentRawCommand','map','trim','error','logFilePath','Failed\x20to\x20clear\x20logs:','591048ZlMCWw','duration','join','warn'];a268_0x1abd=function(){return _0x44269c;};return a268_0x1abd();}import a268_0x3b8b05 from'node:fs';import a268_0x56feae from'node:path';class Logger{[a268_0x430b55(0xec)];['logFilePath'];['currentRawCommand']='';constructor(){const _0x4408b4=a268_0x430b55;this[_0x4408b4(0xfd)]='';}['setRawCommand'](_0xc05095){const _0x278647=a268_0x430b55;this[_0x278647(0xf9)]=_0xc05095;}[a268_0x430b55(0xe1)](){const _0x23296e=a268_0x430b55,_0xe28d24=a268_0x56feae[_0x23296e(0xf1)](this[_0x23296e(0xfd)]);!a268_0x3b8b05[_0x23296e(0xf0)](_0xe28d24)&&a268_0x3b8b05[_0x23296e(0x107)](_0xe28d24,{'recursive':!![]});const _0x2bd2c3=a268_0x326eb5[_0x23296e(0xe6)][_0x23296e(0xf8)](a268_0x326eb5[_0x23296e(0xe6)][_0x23296e(0xe2)](),a268_0x326eb5[_0x23296e(0xe6)]['errors']({'stack':!![]}),a268_0x326eb5['format'][_0x23296e(0xdf)](_0x42687d=>{const _0x2a3cbe=_0x23296e,_0x32cf0b={'timestamp':_0x42687d[_0x2a3cbe(0xe2)]||new Date()[_0x2a3cbe(0xe9)](),'level':_0x42687d['level']||'info','command':_0x42687d[_0x2a3cbe(0xeb)]||_0x2a3cbe(0x10a),'rawCommand':_0x42687d['rawCommand']||this[_0x2a3cbe(0xf9)]||undefined,'message':_0x42687d[_0x2a3cbe(0xf4)]||'','duration':_0x42687d[_0x2a3cbe(0x100)]||undefined,'details':_0x42687d[_0x2a3cbe(0xdd)]||undefined};return JSON['stringify'](_0x32cf0b);}));this['winstonLogger']=a268_0x326eb5['createLogger']({'level':_0x23296e(0xf3),'format':_0x2bd2c3,'transports':[new a268_0x326eb5['transports']['File']({'filename':this['logFilePath'],'level':_0x23296e(0xf3)})],'silent':![]}),a268_0x326eb5[_0x23296e(0xe3)]({'success':'green','error':_0x23296e(0xf2),'warn':_0x23296e(0xf7),'info':_0x23296e(0xf6)});}[a268_0x430b55(0x103)](_0x4e34dc){const _0x3a9f0b=a268_0x430b55;this[_0x3a9f0b(0xfd)]=a268_0x56feae[_0x3a9f0b(0x101)](_0x4e34dc,_0x3a9f0b(0xe4)),this[_0x3a9f0b(0xec)]&&this[_0x3a9f0b(0xec)][_0x3a9f0b(0xee)](),this['initWinstonLogger']();}['info'](_0x2cb34c,_0x431738,_0x3ff243){const _0x2e1f70=a268_0x430b55;if(!this[_0x2e1f70(0xfd)]||!this[_0x2e1f70(0xec)])return;this['winstonLogger']['info'](_0x431738,{'command':_0x2cb34c,'details':_0x3ff243});}['success'](_0x5dc0b9,_0x2c3b3c,_0x2451ad,_0x5f3f0b){const _0x4718cd=a268_0x430b55;if(!this[_0x4718cd(0xfd)]||!this['winstonLogger'])return;this[_0x4718cd(0xec)]['log'](_0x4718cd(0xf3),_0x2c3b3c,{'level':_0x4718cd(0xf5),'command':_0x5dc0b9,'duration':_0x2451ad,'details':_0x5f3f0b});}[a268_0x430b55(0xfc)](_0x2afcae,_0x4e8ab9,_0x4c19d5){const _0x55ac82=a268_0x430b55;if(!this[_0x55ac82(0xfd)]||!this[_0x55ac82(0xec)])return;this['winstonLogger'][_0x55ac82(0xfc)](_0x4e8ab9,{'command':_0x2afcae,'details':_0x4c19d5});}[a268_0x430b55(0x102)](_0x56f3ac,_0x406e9b,_0x5d4f0c){const _0x4fca5c=a268_0x430b55;if(!this[_0x4fca5c(0xfd)]||!this[_0x4fca5c(0xec)])return;this[_0x4fca5c(0xec)][_0x4fca5c(0x102)](_0x406e9b,{'command':_0x56f3ac,'details':_0x5d4f0c});}async['logTask'](_0xf6ede1,_0x36de11,_0x5f26d0){const _0x20e0dc=a268_0x430b55,_0x1c635f=Date[_0x20e0dc(0x108)]();this[_0x20e0dc(0xf3)](_0xf6ede1,_0x20e0dc(0xed)+_0x36de11);try{const _0x57c28e=await _0x5f26d0(),_0x3de672=Date[_0x20e0dc(0x108)]()-_0x1c635f;return this['success'](_0xf6ede1,_0x20e0dc(0xe7)+_0x36de11,_0x3de672),_0x57c28e;}catch(_0x2a776b){const _0xf98804=Date[_0x20e0dc(0x108)]()-_0x1c635f;this['error'](_0xf6ede1,_0x20e0dc(0xd9)+_0x36de11,{'error':_0x2a776b instanceof Error?_0x2a776b['message']:String(_0x2a776b),'duration':_0xf98804});throw _0x2a776b;}}['readLogs'](){const _0x581810=a268_0x430b55;try{if(!a268_0x3b8b05[_0x581810(0xf0)](this[_0x581810(0xfd)]))return[];const _0x58dac7=a268_0x3b8b05[_0x581810(0xe8)](this[_0x581810(0xfd)],_0x581810(0xde));return _0x58dac7[_0x581810(0xdb)]('\x0a')[_0x581810(0xe0)](_0x22e959=>_0x22e959[_0x581810(0xfb)]())[_0x581810(0xfa)](_0x2af293=>JSON[_0x581810(0xd8)](_0x2af293));}catch(_0xf0b23e){return console[_0x581810(0x102)]('Failed\x20to\x20read\x20logs:',_0xf0b23e),[];}}[a268_0x430b55(0x104)](){const _0x159d82=a268_0x430b55;try{a268_0x3b8b05[_0x159d82(0xf0)](this['logFilePath'])&&a268_0x3b8b05['writeFileSync'](this[_0x159d82(0xfd)],'',_0x159d82(0xde));}catch(_0x73a249){console['warn'](_0x159d82(0xfe),_0x73a249);}}['getWinstonInstance'](){const _0x842f50=a268_0x430b55;return this[_0x842f50(0xec)];}}function a268_0x4e51(_0x22e3f3,_0x25400f){_0x22e3f3=_0x22e3f3-0xd8;const _0x1abdbb=a268_0x1abd();let _0x4e5162=_0x1abdbb[_0x22e3f3];return _0x4e5162;}export const logger=new Logger();
1
+ const a274_0x5e12fb=a274_0x5200;(function(_0xc08667,_0x2be717){const _0x3e8323=a274_0x5200,_0x4514ad=_0xc08667();while(!![]){try{const _0x404eae=-parseInt(_0x3e8323(0x12a))/0x1+-parseInt(_0x3e8323(0x12b))/0x2*(-parseInt(_0x3e8323(0x130))/0x3)+-parseInt(_0x3e8323(0x157))/0x4*(-parseInt(_0x3e8323(0x12e))/0x5)+-parseInt(_0x3e8323(0x14d))/0x6*(-parseInt(_0x3e8323(0x151))/0x7)+parseInt(_0x3e8323(0x141))/0x8+parseInt(_0x3e8323(0x135))/0x9*(parseInt(_0x3e8323(0x150))/0xa)+parseInt(_0x3e8323(0x155))/0xb*(-parseInt(_0x3e8323(0x131))/0xc);if(_0x404eae===_0x2be717)break;else _0x4514ad['push'](_0x4514ad['shift']());}catch(_0x5a544c){_0x4514ad['push'](_0x4514ad['shift']());}}}(a274_0x532b,0x610c0));import a274_0x3ac139 from'winston';import a274_0x2738ad from'node:fs';import a274_0x2e11c4 from'node:path';function a274_0x532b(){const _0x5ea08f=['yellow','warn','2046144WmqRMw','writeFileSync','Failed\x20to\x20clear\x20logs:','message','完成:\x20','red','level','error','parse','toISOString','green','getWinstonInstance','546fBChww','Failed\x20to\x20read\x20logs:','readFileSync','71560LjTUGZ','30044nxlOms','info','unknown','now','7260oiUOee','setRawCommand','4jrvzJT','stringify','map','readLogs','format','logFilePath','utf8','clearLogs','setLogPath','rawCommand','duration','command','失败:\x20','436661wjKCEN','32576GsSPRM','File','winstonLogger','1493025Enfrah','initWinstonLogger','93EHdqer','12756bDAxIj','blue','currentRawCommand','existsSync','108PSIsnh','log','.lovrabet.log','details','printf','trim','addColors','success','timestamp','split'];a274_0x532b=function(){return _0x5ea08f;};return a274_0x532b();}function a274_0x5200(_0x5e449c,_0x2c4137){_0x5e449c=_0x5e449c-0x126;const _0x532b19=a274_0x532b();let _0x520061=_0x532b19[_0x5e449c];return _0x520061;}class Logger{[a274_0x5e12fb(0x12d)];[a274_0x5e12fb(0x15c)];[a274_0x5e12fb(0x133)]='';constructor(){const _0x3cda7d=a274_0x5e12fb;this[_0x3cda7d(0x15c)]='';}[a274_0x5e12fb(0x156)](_0x2df498){const _0x1697d3=a274_0x5e12fb;this[_0x1697d3(0x133)]=_0x2df498;}[a274_0x5e12fb(0x12f)](){const _0x210f46=a274_0x5e12fb,_0xd90cc7=a274_0x2e11c4['dirname'](this[_0x210f46(0x15c)]);!a274_0x2738ad[_0x210f46(0x134)](_0xd90cc7)&&a274_0x2738ad['mkdirSync'](_0xd90cc7,{'recursive':!![]});const _0x42ad99=a274_0x3ac139[_0x210f46(0x15b)]['combine'](a274_0x3ac139[_0x210f46(0x15b)]['timestamp'](),a274_0x3ac139[_0x210f46(0x15b)]['errors']({'stack':!![]}),a274_0x3ac139[_0x210f46(0x15b)][_0x210f46(0x139)](_0x5f1ec2=>{const _0x5a8e50=_0x210f46,_0x4d3b00={'timestamp':_0x5f1ec2[_0x5a8e50(0x13d)]||new Date()[_0x5a8e50(0x14a)](),'level':_0x5f1ec2[_0x5a8e50(0x147)]||_0x5a8e50(0x152),'command':_0x5f1ec2[_0x5a8e50(0x128)]||_0x5a8e50(0x153),'rawCommand':_0x5f1ec2[_0x5a8e50(0x126)]||this[_0x5a8e50(0x133)]||undefined,'message':_0x5f1ec2[_0x5a8e50(0x144)]||'','duration':_0x5f1ec2[_0x5a8e50(0x127)]||undefined,'details':_0x5f1ec2[_0x5a8e50(0x138)]||undefined};return JSON[_0x5a8e50(0x158)](_0x4d3b00);}));this[_0x210f46(0x12d)]=a274_0x3ac139['createLogger']({'level':_0x210f46(0x152),'format':_0x42ad99,'transports':[new a274_0x3ac139['transports'][(_0x210f46(0x12c))]({'filename':this[_0x210f46(0x15c)],'level':_0x210f46(0x152)})],'silent':![]}),a274_0x3ac139[_0x210f46(0x13b)]({'success':_0x210f46(0x14b),'error':_0x210f46(0x146),'warn':_0x210f46(0x13f),'info':_0x210f46(0x132)});}[a274_0x5e12fb(0x15f)](_0x1ad070){const _0x3736c7=a274_0x5e12fb;this[_0x3736c7(0x15c)]=a274_0x2e11c4['join'](_0x1ad070,_0x3736c7(0x137)),this[_0x3736c7(0x12d)]&&this['winstonLogger']['clear'](),this[_0x3736c7(0x12f)]();}[a274_0x5e12fb(0x152)](_0x36bb84,_0xd8583d,_0xe52566){const _0x1bea35=a274_0x5e12fb;if(!this[_0x1bea35(0x15c)]||!this[_0x1bea35(0x12d)])return;this[_0x1bea35(0x12d)][_0x1bea35(0x152)](_0xd8583d,{'command':_0x36bb84,'details':_0xe52566});}[a274_0x5e12fb(0x13c)](_0x4277d5,_0x2a9605,_0x16880c,_0x3a324b){const _0x1baa77=a274_0x5e12fb;if(!this[_0x1baa77(0x15c)]||!this[_0x1baa77(0x12d)])return;this[_0x1baa77(0x12d)][_0x1baa77(0x136)](_0x1baa77(0x152),_0x2a9605,{'level':'success','command':_0x4277d5,'duration':_0x16880c,'details':_0x3a324b});}['error'](_0x40f25e,_0x151e68,_0x2de7e3){const _0x702f51=a274_0x5e12fb;if(!this[_0x702f51(0x15c)]||!this['winstonLogger'])return;this[_0x702f51(0x12d)]['error'](_0x151e68,{'command':_0x40f25e,'details':_0x2de7e3});}[a274_0x5e12fb(0x140)](_0x277c65,_0x36e67d,_0x4e4c33){const _0x4cf843=a274_0x5e12fb;if(!this[_0x4cf843(0x15c)]||!this[_0x4cf843(0x12d)])return;this[_0x4cf843(0x12d)]['warn'](_0x36e67d,{'command':_0x277c65,'details':_0x4e4c33});}async['logTask'](_0x16d27b,_0x253c9e,_0x394585){const _0x3b165b=a274_0x5e12fb,_0x5704bc=Date[_0x3b165b(0x154)]();this['info'](_0x16d27b,'开始执行:\x20'+_0x253c9e);try{const _0x38eb2e=await _0x394585(),_0x347e60=Date[_0x3b165b(0x154)]()-_0x5704bc;return this[_0x3b165b(0x13c)](_0x16d27b,_0x3b165b(0x145)+_0x253c9e,_0x347e60),_0x38eb2e;}catch(_0x2c312c){const _0x6fb3d8=Date[_0x3b165b(0x154)]()-_0x5704bc;this[_0x3b165b(0x148)](_0x16d27b,_0x3b165b(0x129)+_0x253c9e,{'error':_0x2c312c instanceof Error?_0x2c312c[_0x3b165b(0x144)]:String(_0x2c312c),'duration':_0x6fb3d8});throw _0x2c312c;}}[a274_0x5e12fb(0x15a)](){const _0x14f50a=a274_0x5e12fb;try{if(!a274_0x2738ad[_0x14f50a(0x134)](this[_0x14f50a(0x15c)]))return[];const _0x20d434=a274_0x2738ad[_0x14f50a(0x14f)](this[_0x14f50a(0x15c)],_0x14f50a(0x15d));return _0x20d434[_0x14f50a(0x13e)]('\x0a')['filter'](_0x1bea4a=>_0x1bea4a[_0x14f50a(0x13a)]())[_0x14f50a(0x159)](_0x1c08a4=>JSON[_0x14f50a(0x149)](_0x1c08a4));}catch(_0xd8d860){return console[_0x14f50a(0x140)](_0x14f50a(0x14e),_0xd8d860),[];}}[a274_0x5e12fb(0x15e)](){const _0x4237e0=a274_0x5e12fb;try{a274_0x2738ad[_0x4237e0(0x134)](this[_0x4237e0(0x15c)])&&a274_0x2738ad[_0x4237e0(0x142)](this[_0x4237e0(0x15c)],'',_0x4237e0(0x15d));}catch(_0x554b0a){console['warn'](_0x4237e0(0x143),_0x554b0a);}}[a274_0x5e12fb(0x14c)](){return this['winstonLogger'];}}export const logger=new Logger();
@@ -1 +1 @@
1
- function a269_0x534f(_0x51821b,_0x424899){_0x51821b=_0x51821b-0x77;const _0x1e0675=a269_0x1e06();let _0x534fdb=_0x1e0675[_0x51821b];return _0x534fdb;}function a269_0x1e06(){const _0x362db5=['47397fYtygA','Invalid\x20JSON\x20for\x20--params:\x20','validation','6132800HNVYWT','10SjbswO','object','3702fpSFjW','4038488euuEIA','--params\x20must\x20be\x20a\x20JSON\x20object','11795EWlkBW','19470951qRiGes','8820910RkZHQJ','1063581qzvvsE','parse','62CRQQwz','isArray'];a269_0x1e06=function(){return _0x362db5;};return a269_0x1e06();}(function(_0x213f98,_0x4060aa){const _0x3f511c=a269_0x534f,_0x2468d0=_0x213f98();while(!![]){try{const _0xf19a96=parseInt(_0x3f511c(0x7b))/0x1+-parseInt(_0x3f511c(0x7d))/0x2*(parseInt(_0x3f511c(0x7f))/0x3)+-parseInt(_0x3f511c(0x86))/0x4+parseInt(_0x3f511c(0x7a))/0x5+parseInt(_0x3f511c(0x85))/0x6*(parseInt(_0x3f511c(0x78))/0x7)+parseInt(_0x3f511c(0x82))/0x8+-parseInt(_0x3f511c(0x79))/0x9*(parseInt(_0x3f511c(0x83))/0xa);if(_0xf19a96===_0x4060aa)break;else _0x2468d0['push'](_0x2468d0['shift']());}catch(_0x2620c5){_0x2468d0['push'](_0x2468d0['shift']());}}}(a269_0x1e06,0xed1aa));import{CliErrors}from'../errors.js';export function parseJsonParams(_0x5054f1){const _0x3f004f=a269_0x534f;if(!_0x5054f1)return undefined;let _0x39c7fe;try{_0x39c7fe=JSON[_0x3f004f(0x7c)](_0x5054f1);}catch{throw CliErrors[_0x3f004f(0x81)](_0x3f004f(0x80)+_0x5054f1);}if(!_0x39c7fe||typeof _0x39c7fe!==_0x3f004f(0x84)||Array[_0x3f004f(0x7e)](_0x39c7fe))throw CliErrors['validation'](_0x3f004f(0x77),'Example:\x20--params\x20\x27{\x22id\x22:123}\x27');return _0x39c7fe;}
1
+ (function(_0x4d2313,_0xe25b80){const _0x50026e=a275_0x5e24,_0x555624=_0x4d2313();while(!![]){try{const _0x2a611b=parseInt(_0x50026e(0x1e0))/0x1*(-parseInt(_0x50026e(0x1ee))/0x2)+parseInt(_0x50026e(0x1ea))/0x3+-parseInt(_0x50026e(0x1e8))/0x4*(parseInt(_0x50026e(0x1eb))/0x5)+parseInt(_0x50026e(0x1e1))/0x6*(parseInt(_0x50026e(0x1ef))/0x7)+parseInt(_0x50026e(0x1e9))/0x8*(parseInt(_0x50026e(0x1e6))/0x9)+-parseInt(_0x50026e(0x1e4))/0xa*(parseInt(_0x50026e(0x1e2))/0xb)+parseInt(_0x50026e(0x1ed))/0xc;if(_0x2a611b===_0xe25b80)break;else _0x555624['push'](_0x555624['shift']());}catch(_0x24fa5e){_0x555624['push'](_0x555624['shift']());}}}(a275_0x4fd1,0x66762));function a275_0x5e24(_0x57cf31,_0x158e69){_0x57cf31=_0x57cf31-0x1df;const _0x4fd197=a275_0x4fd1();let _0x5e2471=_0x4fd197[_0x57cf31];return _0x5e2471;}function a275_0x4fd1(){const _0x1612ea=['16216tLyXVU','2294064PndjoT','26245vbhCKT','--params\x20must\x20be\x20a\x20JSON\x20object','1951860qNFaWC','1649506hgwaXp','95543cUfqoB','Invalid\x20JSON\x20for\x20--params:\x20','parse','1eMDtHd','348RRmPzB','184514nCsjVb','validation','230PTJevR','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','981ZnZFKZ','object','236yADary'];a275_0x4fd1=function(){return _0x1612ea;};return a275_0x4fd1();}import{CliErrors}from'../errors.js';export function parseJsonParams(_0x19243b){const _0x58b334=a275_0x5e24;if(!_0x19243b)return undefined;let _0x3b14c8;try{_0x3b14c8=JSON[_0x58b334(0x1df)](_0x19243b);}catch{throw CliErrors['validation'](_0x58b334(0x1f0)+_0x19243b);}if(!_0x3b14c8||typeof _0x3b14c8!==_0x58b334(0x1e7)||Array['isArray'](_0x3b14c8))throw CliErrors[_0x58b334(0x1e3)](_0x58b334(0x1ec),_0x58b334(0x1e5));return _0x3b14c8;}
@@ -1 +1 @@
1
- function a270_0x2437(_0x301f15,_0x58516c){_0x301f15=_0x301f15-0x190;const _0x552710=a270_0x5527();let _0x2437f7=_0x552710[_0x301f15];return _0x2437f7;}const a270_0x3846d6=a270_0x2437;(function(_0x2b375c,_0x4c8d7b){const _0x2e5feb=a270_0x2437,_0x330d06=_0x2b375c();while(!![]){try{const _0x1eba6b=-parseInt(_0x2e5feb(0x19a))/0x1*(-parseInt(_0x2e5feb(0x190))/0x2)+parseInt(_0x2e5feb(0x191))/0x3+-parseInt(_0x2e5feb(0x198))/0x4*(parseInt(_0x2e5feb(0x19b))/0x5)+parseInt(_0x2e5feb(0x192))/0x6+-parseInt(_0x2e5feb(0x197))/0x7*(parseInt(_0x2e5feb(0x194))/0x8)+parseInt(_0x2e5feb(0x196))/0x9+-parseInt(_0x2e5feb(0x195))/0xa;if(_0x1eba6b===_0x4c8d7b)break;else _0x330d06['push'](_0x330d06['shift']());}catch(_0x4b57ad){_0x330d06['push'](_0x330d06['shift']());}}}(a270_0x5527,0xe91aa));export const isWindows=process[a270_0x3846d6(0x193)]===a270_0x3846d6(0x199);function a270_0x5527(){const _0x693f1e=['9877224QEcqTt','platform','2661944jbjsSa','31525510bHevGQ','10688985EaTmbT','7oQpCNe','290236hkVQyk','win32','1ccGyTc','65TrLOKq','2503598LCQpey','3893061eUhcfh'];a270_0x5527=function(){return _0x693f1e;};return a270_0x5527();}export function resolveNpmBin(_0x539f1d){return isWindows?_0x539f1d+'.cmd':_0x539f1d;}
1
+ const a276_0x5e2be2=a276_0x1125;function a276_0x1125(_0x347bd0,_0x3c3511){_0x347bd0=_0x347bd0-0x15e;const _0x47442f=a276_0x4744();let _0x11252e=_0x47442f[_0x347bd0];return _0x11252e;}(function(_0x283b90,_0x32b612){const _0x4d6025=a276_0x1125,_0x21e3b9=_0x283b90();while(!![]){try{const _0xeddb63=parseInt(_0x4d6025(0x165))/0x1+-parseInt(_0x4d6025(0x168))/0x2+parseInt(_0x4d6025(0x15e))/0x3+parseInt(_0x4d6025(0x161))/0x4+parseInt(_0x4d6025(0x15f))/0x5+-parseInt(_0x4d6025(0x166))/0x6*(parseInt(_0x4d6025(0x162))/0x7)+-parseInt(_0x4d6025(0x167))/0x8;if(_0xeddb63===_0x32b612)break;else _0x21e3b9['push'](_0x21e3b9['shift']());}catch(_0x8feca6){_0x21e3b9['push'](_0x21e3b9['shift']());}}}(a276_0x4744,0x8eed9));function a276_0x4744(){const _0x2d2f2e=['272517cuVvTB','platform','.cmd','868525vHntrP','6yJkaVQ','13266656YJkiNt','1324058owfttO','1779768YsvcQO','2684535kIVhGC','win32','3784148NlRezQ'];a276_0x4744=function(){return _0x2d2f2e;};return a276_0x4744();}export const isWindows=process[a276_0x5e2be2(0x163)]===a276_0x5e2be2(0x160);export function resolveNpmBin(_0x289978){const _0x1bc2ef=a276_0x5e2be2;return isWindows?_0x289978+_0x1bc2ef(0x164):_0x289978;}
@@ -1 +1 @@
1
- function a271_0x6f3b(){const _0x2c38c8=['.cursor/rules','lastUpdated','27guTbCO','5343EuGWBS','8RUJkIm','981687rPGGEW','string','50677ZCQPMD','2768314gYenKl','json','CDN\x20返回数据格式错误','application/json','157962AHNMhp','status','4eoPXjY','1hOIrkz','本地模板文件不存在:\x20','6vihuxw','2304CwrtaQ','4336185GbPZJm','lovrabet_rules.mdc','utf-8','catch','content','2732261PGERuT','4915970UawwGk','../../templates/rules/lovrabet_rules.mdc.tpl','statusText','agents.md'];a271_0x6f3b=function(){return _0x2c38c8;};return a271_0x6f3b();}const a271_0x3c57b8=a271_0x5de4;(function(_0xc29961,_0x28e62b){const _0x527413=a271_0x5de4,_0x1bf280=_0xc29961();while(!![]){try{const _0x20ebcb=parseInt(_0x527413(0xe1))/0x1*(-parseInt(_0x527413(0xda))/0x2)+parseInt(_0x527413(0xd7))/0x3*(parseInt(_0x527413(0xe0))/0x4)+-parseInt(_0x527413(0xe5))/0x5*(parseInt(_0x527413(0xe3))/0x6)+-parseInt(_0x527413(0xcd))/0x7*(-parseInt(_0x527413(0xd6))/0x8)+-parseInt(_0x527413(0xd4))/0x9*(parseInt(_0x527413(0xce))/0xa)+parseInt(_0x527413(0xd9))/0xb*(-parseInt(_0x527413(0xe4))/0xc)+parseInt(_0x527413(0xd5))/0xd*(parseInt(_0x527413(0xde))/0xe);if(_0x20ebcb===_0x28e62b)break;else _0x1bf280['push'](_0x1bf280['shift']());}catch(_0x275ee0){_0x1bf280['push'](_0x1bf280['shift']());}}}(a271_0x6f3b,0xb5ac8));function a271_0x5de4(_0x2d074b,_0x4cf38a){_0x2d074b=_0x2d074b-0xcd;const _0x6f3b4e=a271_0x6f3b();let _0x5de4fa=_0x6f3b4e[_0x2d074b];return _0x5de4fa;}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 _0x239e70=getTemplateBaseUrl();return _0x239e70+'/rules/rules.json';}const LOCAL_TEMPLATE_PATH=resolve(__dirname,a271_0x3c57b8(0xcf));export async function fetchRulesFromCDN(){const _0x15a403=a271_0x3c57b8,_0xfb404=getRulesCdnUrl(),_0x212b42=await fetch(_0xfb404,{'headers':{'Accept':_0x15a403(0xdd)}});if(!_0x212b42['ok'])throw new Error('CDN\x20请求失败:\x20'+_0x212b42[_0x15a403(0xdf)]+'\x20'+_0x212b42[_0x15a403(0xd0)]);const _0x31ac62=await _0x212b42[_0x15a403(0xdb)]();if(!_0x31ac62['content']||typeof _0x31ac62[_0x15a403(0xe9)]!==_0x15a403(0xd8))throw new Error(_0x15a403(0xdc));return _0x31ac62;}export async function getRulesContent(){const _0xa38385=a271_0x3c57b8;try{const _0x3e4126=await fetchRulesFromCDN();return _0x3e4126[_0xa38385(0xe9)];}catch{return readLocalTemplate();}}export function readLocalTemplate(){const _0x162a93=a271_0x3c57b8;if(existsSync(LOCAL_TEMPLATE_PATH))return readFileSync(LOCAL_TEMPLATE_PATH,_0x162a93(0xe7));throw new Error(_0x162a93(0xe2)+LOCAL_TEMPLATE_PATH);}export async function writeRulesFile(_0x9c2d){const _0x34b459=a271_0x3c57b8,_0x4fb87c=await fetchRulesFromCDN()[_0x34b459(0xe8)](()=>null);let _0x3e623c;_0x4fb87c?(_0x3e623c=_0x4fb87c[_0x34b459(0xe9)],_0x4fb87c['lastUpdated']&&(_0x3e623c=appendUpdateTime(_0x3e623c,_0x4fb87c[_0x34b459(0xd3)]))):_0x3e623c=readLocalTemplate();const _0x5f2d3a=dirname(_0x9c2d);!existsSync(_0x5f2d3a)&&mkdirSync(_0x5f2d3a,{'recursive':!![]}),writeFileSync(_0x9c2d,_0x3e623c,_0x34b459(0xe7));}export async function copyRulesToCursor(_0x339ab1){const _0x1808fc=a271_0x3c57b8,_0xaef3a9=join(_0x339ab1,_0x1808fc(0xd2)),_0x5609a8=join(_0xaef3a9,_0x1808fc(0xe6));if(existsSync(_0x5609a8))return![];return await writeRulesFile(_0x5609a8),!![];}export async function copyRulesToAgentsMd(_0xa47cb5){const _0xe3a802=a271_0x3c57b8,_0x1c5691=join(_0xa47cb5,_0xe3a802(0xd1));if(existsSync(_0x1c5691))return![];return await writeRulesFile(_0x1c5691),!![];}
1
+ function a277_0x3fe2(_0x24b5c2,_0x696547){_0x24b5c2=_0x24b5c2-0x76;const _0x11771a=a277_0x1177();let _0x3fe28b=_0x11771a[_0x24b5c2];return _0x3fe28b;}(function(_0x2648b9,_0xe63a35){const _0x2dc0d3=a277_0x3fe2,_0x5dac37=_0x2648b9();while(!![]){try{const _0x3a12fe=-parseInt(_0x2dc0d3(0x85))/0x1+-parseInt(_0x2dc0d3(0x80))/0x2*(-parseInt(_0x2dc0d3(0x77))/0x3)+-parseInt(_0x2dc0d3(0x7b))/0x4+-parseInt(_0x2dc0d3(0x87))/0x5*(-parseInt(_0x2dc0d3(0x76))/0x6)+-parseInt(_0x2dc0d3(0x7f))/0x7*(-parseInt(_0x2dc0d3(0x79))/0x8)+parseInt(_0x2dc0d3(0x81))/0x9+-parseInt(_0x2dc0d3(0x86))/0xa;if(_0x3a12fe===_0xe63a35)break;else _0x5dac37['push'](_0x5dac37['shift']());}catch(_0x354473){_0x5dac37['push'](_0x5dac37['shift']());}}}(a277_0x1177,0x8816e));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 _0x2e93cc=a277_0x3fe2,_0x4d8d06=getTemplateBaseUrl();return _0x4d8d06+_0x2e93cc(0x84);}const LOCAL_TEMPLATE_PATH=resolve(__dirname,'../../templates/rules/lovrabet_rules.mdc.tpl');export async function fetchRulesFromCDN(){const _0x3c4e8d=a277_0x3fe2,_0x2327e4=getRulesCdnUrl(),_0x3462e6=await fetch(_0x2327e4,{'headers':{'Accept':'application/json'}});if(!_0x3462e6['ok'])throw new Error(_0x3c4e8d(0x78)+_0x3462e6['status']+'\x20'+_0x3462e6['statusText']);const _0x4f6fd0=await _0x3462e6[_0x3c4e8d(0x89)]();if(!_0x4f6fd0[_0x3c4e8d(0x7a)]||typeof _0x4f6fd0['content']!=='string')throw new Error('CDN\x20返回数据格式错误');return _0x4f6fd0;}export async function getRulesContent(){const _0x1990e8=a277_0x3fe2;try{const _0xa27e76=await fetchRulesFromCDN();return _0xa27e76[_0x1990e8(0x7a)];}catch{return readLocalTemplate();}}export function readLocalTemplate(){const _0x34453f=a277_0x3fe2;if(existsSync(LOCAL_TEMPLATE_PATH))return readFileSync(LOCAL_TEMPLATE_PATH,_0x34453f(0x82));throw new Error(_0x34453f(0x83)+LOCAL_TEMPLATE_PATH);}export async function writeRulesFile(_0x4e1687){const _0x100f52=a277_0x3fe2,_0x5e77bc=await fetchRulesFromCDN()[_0x100f52(0x7e)](()=>null);let _0x9bfe40;_0x5e77bc?(_0x9bfe40=_0x5e77bc[_0x100f52(0x7a)],_0x5e77bc[_0x100f52(0x88)]&&(_0x9bfe40=appendUpdateTime(_0x9bfe40,_0x5e77bc[_0x100f52(0x88)]))):_0x9bfe40=readLocalTemplate();const _0x2efd99=dirname(_0x4e1687);!existsSync(_0x2efd99)&&mkdirSync(_0x2efd99,{'recursive':!![]}),writeFileSync(_0x4e1687,_0x9bfe40,'utf-8');}export async function copyRulesToCursor(_0x135788){const _0x15bc13=a277_0x3fe2,_0xf366c0=join(_0x135788,_0x15bc13(0x7c)),_0xcd910d=join(_0xf366c0,_0x15bc13(0x7d));if(existsSync(_0xcd910d))return![];return await writeRulesFile(_0xcd910d),!![];}function a277_0x1177(){const _0x37d87d=['1551360lHKoGD','130jiVkTN','lastUpdated','json','12972mcvxTG','6036yltKAo','CDN\x20请求失败:\x20','6866536wcIGLZ','content','3488480oQvHYw','.cursor/rules','lovrabet_rules.mdc','catch','7lHXKba','956IjoJFv','7366257UfBPBi','utf-8','本地模板文件不存在:\x20','/rules/rules.json','1110060zqkrsK'];a277_0x1177=function(){return _0x37d87d;};return a277_0x1177();}export async function copyRulesToAgentsMd(_0xc160c1){const _0x3ff2a6=join(_0xc160c1,'agents.md');if(existsSync(_0x3ff2a6))return![];return await writeRulesFile(_0x3ff2a6),!![];}
@@ -1 +1 @@
1
- export function sleep(_0x77165d){return new Promise(_0x21ffad=>setTimeout(_0x21ffad,_0x77165d));}
1
+ export function sleep(_0x5ec9ee){return new Promise(_0x421ab1=>setTimeout(_0x421ab1,_0x5ec9ee));}
@@ -1 +1 @@
1
- const a273_0x2ec76a=a273_0x3543;function a273_0x10e7(){const _0x1648c8=['pad','join','toISOString','1992626meQLuf','LOVRABET','name','pop','.tsx','getHours','toComponentName','toDisplayTitle','1602156vFHBWE','isDirectory','replaceApiContent','default','toUpperCase','utf8','942036dmdqUK','模板内容替换完成','.json','processTemplate','includes','split','template','开始处理模板内容替换','toLowerCase','.jsx','getMinutes','info','458740tneMeK','alias','模板内容替换失败','success','3000501LUnMPO','.css','padStart','48WRIKSM','readFile','error','tableName','.scss','1891280vXTsDr','formatLocalTimestamp','now','promises','api','datasetCode:\x20\x22','.md','tableName:\x20\x22','\x0a\x20\x20\x20\x20{\x20','153730LEICci','processFile','mkdir','getFullYear','YourModel','writeFile','.tpl','map','getMonth','replace','.js','slice','endsWith','processDirectory','replaceContent'];a273_0x10e7=function(){return _0x1648c8;};return a273_0x10e7();}(function(_0xa73cc2,_0x5b97de){const _0xa0b389=a273_0x3543,_0x3e6f8e=_0xa73cc2();while(!![]){try{const _0x475b96=parseInt(_0xa0b389(0x1a1))/0x1+-parseInt(_0xa0b389(0x187))/0x2+parseInt(_0xa0b389(0x195))/0x3+-parseInt(_0xa0b389(0x1a8))/0x4*(-parseInt(_0xa0b389(0x1b6))/0x5)+parseInt(_0xa0b389(0x18f))/0x6+parseInt(_0xa0b389(0x1a5))/0x7+-parseInt(_0xa0b389(0x1ad))/0x8;if(_0x475b96===_0x5b97de)break;else _0x3e6f8e['push'](_0x3e6f8e['shift']());}catch(_0x9b638d){_0x3e6f8e['push'](_0x3e6f8e['shift']());}}}(a273_0x10e7,0x939ea));import a273_0x1a72d9 from'node:fs';import a273_0x28524c from'node:path';function a273_0x3543(_0x31e684,_0x16845c){_0x31e684=_0x31e684-0x184;const _0x10e73c=a273_0x10e7();let _0x35430b=_0x10e73c[_0x31e684];return _0x35430b;}import{logger}from'../utils/logger.js';import{getCliVersion}from'../utils/version.js';const CLI_VERSION=getCliVersion();export class TemplateReplacer{static[a273_0x2ec76a(0x184)](_0x52810b){const _0x5659a4=a273_0x2ec76a;return String(_0x52810b)[_0x5659a4(0x1a7)](0x2,'0');}static[a273_0x2ec76a(0x1ae)](_0x1310b0){const _0x165d4d=a273_0x2ec76a,_0x12f2fd=_0x1310b0[_0x165d4d(0x1b9)](),_0x574b07=this[_0x165d4d(0x184)](_0x1310b0[_0x165d4d(0x1be)]()+0x1),_0x3c0433=this[_0x165d4d(0x184)](_0x1310b0['getDate']()),_0x22ae6a=this['pad'](_0x1310b0[_0x165d4d(0x18c)]()),_0x5ee1c1=this[_0x165d4d(0x184)](_0x1310b0[_0x165d4d(0x19f)]()),_0x11bee5=this[_0x165d4d(0x184)](_0x1310b0['getSeconds']());return{'createdAt':_0x12f2fd+'-'+_0x574b07+'-'+_0x3c0433+'\x20'+_0x22ae6a+':'+_0x5ee1c1+':'+_0x11bee5,'createdDate':_0x12f2fd+'-'+_0x574b07+'-'+_0x3c0433,'createdTime':_0x22ae6a+':'+_0x5ee1c1+':'+_0x11bee5};}static['toComponentName'](_0x453d0f){const _0x836d29=a273_0x2ec76a,_0x3fd8b4=_0x453d0f[_0x836d29(0x19a)]('/')[_0x836d29(0x18a)]()||_0x453d0f;return _0x3fd8b4[_0x836d29(0x19a)]('-')[_0x836d29(0x1bd)](_0x10594d=>_0x10594d['charAt'](0x0)[_0x836d29(0x193)]()+_0x10594d[_0x836d29(0x1c1)](0x1)[_0x836d29(0x19d)]())[_0x836d29(0x185)]('');}static[a273_0x2ec76a(0x18e)](_0x6b9de9){const _0x1f6e59=a273_0x2ec76a,_0x30fef4=_0x6b9de9[_0x1f6e59(0x19a)]('/')[_0x1f6e59(0x18a)]()||_0x6b9de9;return _0x30fef4[_0x1f6e59(0x19a)]('-')[_0x1f6e59(0x1bd)](_0x4f5411=>_0x4f5411['charAt'](0x0)[_0x1f6e59(0x193)]()+_0x4f5411[_0x1f6e59(0x1c1)](0x1)[_0x1f6e59(0x19d)]())[_0x1f6e59(0x185)]('\x20');}static['replaceContent'](_0xdab9db,_0xb21965,_0x3a7b21){const _0x2143e5=a273_0x2ec76a,_0x1ca9e1=this[_0x2143e5(0x18d)](_0xb21965),_0x5beb9b=this[_0x2143e5(0x18e)](_0xb21965),{createdAt:_0x37be87,createdDate:_0x5898f6,createdTime:_0x1ddaa3}=this['formatLocalTimestamp'](new Date());let _0x531ebc=_0xdab9db[_0x2143e5(0x1bf)](/\{CliVersion\}/g,CLI_VERSION)[_0x2143e5(0x1bf)](/\{ComponentName\}/g,_0x1ca9e1)[_0x2143e5(0x1bf)](/\{DisplayTitle\}/g,_0x5beb9b)[_0x2143e5(0x1bf)](/\{PageName\}/g,_0xb21965)[_0x2143e5(0x1bf)](/\{TemplateName\}/g,_0x3a7b21)[_0x2143e5(0x1bf)](/\{CreatedAt\}/g,_0x37be87)['replace'](/\{CreatedDate\}/g,_0x5898f6)['replace'](/\{CreatedTime\}/g,_0x1ddaa3);return _0x531ebc;}static[a273_0x2ec76a(0x191)](_0x74c487,_0x324271,_0x45ee51,_0x54fa61,_0x5a1fa2,_0x567d3a,_0x3a6dab,_0x1d7fea){const _0x3abb26=a273_0x2ec76a,_0x197acc=new Date(),_0x5d90a3=_0x197acc[_0x3abb26(0x186)](),_0x15815d=_0x45ee51[_0x3abb26(0x1bd)](_0x47a096=>{const _0x5a0250=_0x3abb26,_0x2ebea1=[_0x5a0250(0x1b2)+_0x47a096['datasetCode']+'\x22',_0x5a0250(0x1b4)+_0x47a096[_0x5a0250(0x1ab)]+'\x22','name:\x20\x22'+_0x47a096[_0x5a0250(0x189)]+'\x22'];return _0x47a096[_0x5a0250(0x1a2)]&&_0x2ebea1['push']('alias:\x20\x22'+_0x47a096[_0x5a0250(0x1a2)]+'\x22'),_0x5a0250(0x1b5)+_0x2ebea1[_0x5a0250(0x185)](',\x20')+'\x20},';})[_0x3abb26(0x185)](''),_0x44ef80=_0x54fa61||_0x45ee51[0x0]?.[_0x3abb26(0x1a2)]||_0x3abb26(0x1ba);let _0xcea84a=_0x74c487[_0x3abb26(0x1bf)](/\{AppCode\}/g,_0x324271)['replace'](/\{ModelConfigs\}/g,_0x15815d)['replace'](/\{ExampleModelName\}/g,_0x44ef80)['replace'](/\{ApiFileName\}/g,_0x5a1fa2||_0x3abb26(0x1b1))['replace'](/\{ConfigName\}/g,_0x567d3a||_0x3abb26(0x192))[_0x3abb26(0x1bf)](/\{ClientConfigParam\}/g,_0x3a6dab||'')[_0x3abb26(0x1bf)](/\{VarPrefix\}/g,_0x1d7fea||_0x3abb26(0x188))[_0x3abb26(0x1bf)](/\{CreatedAt\}/g,_0x5d90a3);return _0xcea84a;}static async[a273_0x2ec76a(0x198)](_0x50db7e,_0xa2e418,_0x5b1ac5,_0x3a4936,_0xb3fdad=!![]){const _0x9a6b85=a273_0x2ec76a,_0x3bf563=Date[_0x9a6b85(0x1af)]();try{_0xb3fdad&&logger[_0x9a6b85(0x1a0)](_0x9a6b85(0x19b),_0x9a6b85(0x19c),{'templatePath':_0x50db7e,'targetPath':_0xa2e418,'pageName':_0x5b1ac5,'templateName':_0x3a4936});await a273_0x1a72d9[_0x9a6b85(0x1b0)][_0x9a6b85(0x1b8)](_0xa2e418,{'recursive':!![]}),await this[_0x9a6b85(0x1c3)](_0x50db7e,_0xa2e418,_0x5b1ac5,_0x3a4936);if(_0xb3fdad){const _0x5aae05=Date[_0x9a6b85(0x1af)]()-_0x3bf563;logger[_0x9a6b85(0x1a4)]('template',_0x9a6b85(0x196),_0x5aae05,{'pageName':_0x5b1ac5,'templateName':_0x3a4936});}}catch(_0x487ee3){if(_0xb3fdad){const _0x4e4216=Date[_0x9a6b85(0x1af)]()-_0x3bf563;logger[_0x9a6b85(0x1aa)]('template',_0x9a6b85(0x1a3),{'templatePath':_0x50db7e,'targetPath':_0xa2e418,'pageName':_0x5b1ac5,'templateName':_0x3a4936,'error':_0x487ee3 instanceof Error?_0x487ee3['message']:String(_0x487ee3),'duration':_0x4e4216});}throw _0x487ee3;}}static async[a273_0x2ec76a(0x1c3)](_0x47606a,_0x489f2e,_0x2a7219,_0x1d0ef8){const _0x41684f=a273_0x2ec76a,_0x1d02eb=await a273_0x1a72d9['promises']['readdir'](_0x47606a,{'withFileTypes':!![]});for(const _0x576a01 of _0x1d02eb){const _0x26078d=a273_0x28524c[_0x41684f(0x185)](_0x47606a,_0x576a01[_0x41684f(0x189)]);let _0x2f05dd=a273_0x28524c[_0x41684f(0x185)](_0x489f2e,_0x576a01[_0x41684f(0x189)]);_0x576a01[_0x41684f(0x189)][_0x41684f(0x1c2)](_0x41684f(0x1bc))&&(_0x2f05dd=a273_0x28524c[_0x41684f(0x185)](_0x489f2e,_0x576a01[_0x41684f(0x189)]['replace'](/\.tpl$/,'')));if(_0x576a01[_0x41684f(0x190)]())await a273_0x1a72d9['promises'][_0x41684f(0x1b8)](_0x2f05dd,{'recursive':!![]}),await this[_0x41684f(0x1c3)](_0x26078d,_0x2f05dd,_0x2a7219,_0x1d0ef8);else _0x576a01['isFile']()&&await this['processFile'](_0x26078d,_0x2f05dd,_0x2a7219,_0x1d0ef8);}}static async[a273_0x2ec76a(0x1b7)](_0x2ee8df,_0x130fe2,_0x54f974,_0x2750d3){const _0x21a450=a273_0x2ec76a,_0x2c447d=a273_0x28524c['extname'](_0x2ee8df)['toLowerCase']();_0x2ee8df[_0x21a450(0x1c2)]('.tpl')&&(_0x130fe2=_0x130fe2['replace'](/\.tpl$/,''));const _0x50f1e1=[_0x21a450(0x18b),'.ts',_0x21a450(0x19e),_0x21a450(0x1c0),_0x21a450(0x197),_0x21a450(0x1b3),_0x21a450(0x1a6),_0x21a450(0x1ac),_0x21a450(0x1bc)];if(_0x50f1e1[_0x21a450(0x199)](_0x2c447d)||_0x2ee8df['endsWith'](_0x21a450(0x1bc))){const _0x1cf27e=await a273_0x1a72d9[_0x21a450(0x1b0)][_0x21a450(0x1a9)](_0x2ee8df,_0x21a450(0x194)),_0x5bd546=this[_0x21a450(0x1c4)](_0x1cf27e,_0x54f974,_0x2750d3);await a273_0x1a72d9['promises'][_0x21a450(0x1bb)](_0x130fe2,_0x5bd546,_0x21a450(0x194));}else await a273_0x1a72d9[_0x21a450(0x1b0)]['copyFile'](_0x2ee8df,_0x130fe2);}}
1
+ const a279_0x462793=a279_0x1687;(function(_0x2f1899,_0x511b71){const _0x751e21=a279_0x1687,_0x47f5f7=_0x2f1899();while(!![]){try{const _0x4517ca=-parseInt(_0x751e21(0x16a))/0x1+-parseInt(_0x751e21(0x18d))/0x2*(-parseInt(_0x751e21(0x181))/0x3)+parseInt(_0x751e21(0x17b))/0x4*(parseInt(_0x751e21(0x157))/0x5)+-parseInt(_0x751e21(0x165))/0x6*(-parseInt(_0x751e21(0x172))/0x7)+-parseInt(_0x751e21(0x154))/0x8+-parseInt(_0x751e21(0x171))/0x9*(-parseInt(_0x751e21(0x162))/0xa)+-parseInt(_0x751e21(0x175))/0xb;if(_0x4517ca===_0x511b71)break;else _0x47f5f7['push'](_0x47f5f7['shift']());}catch(_0x2d5e00){_0x47f5f7['push'](_0x47f5f7['shift']());}}}(a279_0x4c4f,0x22772));import a279_0x651b64 from'node:fs';import a279_0x39bd4c from'node:path';function a279_0x4c4f(){const _0x1218df=['3889754YPPZaf','slice','模板内容替换完成','padStart','getMonth','tableName:\x20\x22','48CxBcFQ','success','datasetCode','writeFile','template','getMinutes','32898zYmZej','message','replaceApiContent','toISOString','getHours','processFile','toDisplayTitle','pop','getSeconds','\x20},','formatLocalTimestamp','.tpl','32goEeXO','.ts','toLowerCase','.md','alias','.jsx','map','.tsx','charAt','name:\x20\x22','name','模板内容替换失败','856696dHntJo','开始处理模板内容替换','pad','20165qoSygD','error','replace','endsWith','includes','toComponentName','LOVRABET','tableName','promises','processDirectory','replaceContent','79710xNDOrq','readdir','info','1276218tBNAWe','toUpperCase','alias:\x20\x22','join','utf8','81785JisikD','now','split','isFile','datasetCode:\x20\x22','extname','processTemplate','279kfqoto','7uPaNuF','isDirectory','mkdir'];a279_0x4c4f=function(){return _0x1218df;};return a279_0x4c4f();}import{logger}from'../utils/logger.js';function a279_0x1687(_0x373d6b,_0x158ca8){_0x373d6b=_0x373d6b-0x151;const _0x4c4fb4=a279_0x4c4f();let _0x168707=_0x4c4fb4[_0x373d6b];return _0x168707;}import{getCliVersion}from'../utils/version.js';const CLI_VERSION=getCliVersion();export class TemplateReplacer{static[a279_0x462793(0x156)](_0x547d88){const _0x45e13a=a279_0x462793;return String(_0x547d88)[_0x45e13a(0x178)](0x2,'0');}static[a279_0x462793(0x18b)](_0x50b16b){const _0x39dc98=a279_0x462793,_0xa21cf5=_0x50b16b['getFullYear'](),_0x4e545a=this['pad'](_0x50b16b[_0x39dc98(0x179)]()+0x1),_0x3be532=this[_0x39dc98(0x156)](_0x50b16b['getDate']()),_0xb753ac=this[_0x39dc98(0x156)](_0x50b16b[_0x39dc98(0x185)]()),_0x4e3874=this[_0x39dc98(0x156)](_0x50b16b[_0x39dc98(0x180)]()),_0x474bb3=this[_0x39dc98(0x156)](_0x50b16b[_0x39dc98(0x189)]());return{'createdAt':_0xa21cf5+'-'+_0x4e545a+'-'+_0x3be532+'\x20'+_0xb753ac+':'+_0x4e3874+':'+_0x474bb3,'createdDate':_0xa21cf5+'-'+_0x4e545a+'-'+_0x3be532,'createdTime':_0xb753ac+':'+_0x4e3874+':'+_0x474bb3};}static[a279_0x462793(0x15c)](_0x1d5273){const _0x11c6ee=a279_0x462793,_0x89bdb2=_0x1d5273[_0x11c6ee(0x16c)]('/')[_0x11c6ee(0x188)]()||_0x1d5273;return _0x89bdb2[_0x11c6ee(0x16c)]('-')[_0x11c6ee(0x193)](_0x3de648=>_0x3de648[_0x11c6ee(0x195)](0x0)[_0x11c6ee(0x166)]()+_0x3de648['slice'](0x1)['toLowerCase']())[_0x11c6ee(0x168)]('');}static[a279_0x462793(0x187)](_0x5bd3c5){const _0x4cfb3d=a279_0x462793,_0x3bff83=_0x5bd3c5[_0x4cfb3d(0x16c)]('/')[_0x4cfb3d(0x188)]()||_0x5bd3c5;return _0x3bff83[_0x4cfb3d(0x16c)]('-')[_0x4cfb3d(0x193)](_0x10a488=>_0x10a488[_0x4cfb3d(0x195)](0x0)[_0x4cfb3d(0x166)]()+_0x10a488[_0x4cfb3d(0x176)](0x1)['toLowerCase']())['join']('\x20');}static[a279_0x462793(0x161)](_0x3ebdc5,_0x39fba3,_0x162278){const _0x401090=a279_0x462793,_0x98886f=this[_0x401090(0x15c)](_0x39fba3),_0x1d2405=this['toDisplayTitle'](_0x39fba3),{createdAt:_0x5049a3,createdDate:_0x19b0ba,createdTime:_0x185f45}=this[_0x401090(0x18b)](new Date());let _0x5d238e=_0x3ebdc5[_0x401090(0x159)](/\{CliVersion\}/g,CLI_VERSION)['replace'](/\{ComponentName\}/g,_0x98886f)['replace'](/\{DisplayTitle\}/g,_0x1d2405)[_0x401090(0x159)](/\{PageName\}/g,_0x39fba3)[_0x401090(0x159)](/\{TemplateName\}/g,_0x162278)['replace'](/\{CreatedAt\}/g,_0x5049a3)[_0x401090(0x159)](/\{CreatedDate\}/g,_0x19b0ba)[_0x401090(0x159)](/\{CreatedTime\}/g,_0x185f45);return _0x5d238e;}static[a279_0x462793(0x183)](_0x28707f,_0xd09e9e,_0x36ea1e,_0x4d4d54,_0x365e53,_0x29129b,_0x2d1957,_0x17bdc4){const _0x21f2f3=a279_0x462793,_0x3e6bbf=new Date(),_0x324f8a=_0x3e6bbf[_0x21f2f3(0x184)](),_0x1cd04b=_0x36ea1e[_0x21f2f3(0x193)](_0x38baf6=>{const _0x410bfd=_0x21f2f3,_0x154e45=[_0x410bfd(0x16e)+_0x38baf6[_0x410bfd(0x17d)]+'\x22',_0x410bfd(0x17a)+_0x38baf6[_0x410bfd(0x15e)]+'\x22',_0x410bfd(0x151)+_0x38baf6[_0x410bfd(0x152)]+'\x22'];return _0x38baf6[_0x410bfd(0x191)]&&_0x154e45['push'](_0x410bfd(0x167)+_0x38baf6[_0x410bfd(0x191)]+'\x22'),'\x0a\x20\x20\x20\x20{\x20'+_0x154e45[_0x410bfd(0x168)](',\x20')+_0x410bfd(0x18a);})[_0x21f2f3(0x168)](''),_0x5e8918=_0x4d4d54||_0x36ea1e[0x0]?.[_0x21f2f3(0x191)]||'YourModel';let _0x1d076e=_0x28707f[_0x21f2f3(0x159)](/\{AppCode\}/g,_0xd09e9e)[_0x21f2f3(0x159)](/\{ModelConfigs\}/g,_0x1cd04b)[_0x21f2f3(0x159)](/\{ExampleModelName\}/g,_0x5e8918)[_0x21f2f3(0x159)](/\{ApiFileName\}/g,_0x365e53||'api')[_0x21f2f3(0x159)](/\{ConfigName\}/g,_0x29129b||'default')['replace'](/\{ClientConfigParam\}/g,_0x2d1957||'')[_0x21f2f3(0x159)](/\{VarPrefix\}/g,_0x17bdc4||_0x21f2f3(0x15d))[_0x21f2f3(0x159)](/\{CreatedAt\}/g,_0x324f8a);return _0x1d076e;}static async[a279_0x462793(0x170)](_0x5a9332,_0x1bd71d,_0x6c813e,_0x4818c1,_0x156730=!![]){const _0x259c92=a279_0x462793,_0x5e551e=Date['now']();try{_0x156730&&logger[_0x259c92(0x164)](_0x259c92(0x17f),_0x259c92(0x155),{'templatePath':_0x5a9332,'targetPath':_0x1bd71d,'pageName':_0x6c813e,'templateName':_0x4818c1});await a279_0x651b64[_0x259c92(0x15f)][_0x259c92(0x174)](_0x1bd71d,{'recursive':!![]}),await this[_0x259c92(0x160)](_0x5a9332,_0x1bd71d,_0x6c813e,_0x4818c1);if(_0x156730){const _0x667194=Date[_0x259c92(0x16b)]()-_0x5e551e;logger[_0x259c92(0x17c)]('template',_0x259c92(0x177),_0x667194,{'pageName':_0x6c813e,'templateName':_0x4818c1});}}catch(_0x3f8a64){if(_0x156730){const _0xedd212=Date[_0x259c92(0x16b)]()-_0x5e551e;logger[_0x259c92(0x158)](_0x259c92(0x17f),_0x259c92(0x153),{'templatePath':_0x5a9332,'targetPath':_0x1bd71d,'pageName':_0x6c813e,'templateName':_0x4818c1,'error':_0x3f8a64 instanceof Error?_0x3f8a64[_0x259c92(0x182)]:String(_0x3f8a64),'duration':_0xedd212});}throw _0x3f8a64;}}static async[a279_0x462793(0x160)](_0x4be36a,_0x110b28,_0x42b8a0,_0x1901df){const _0x1deb71=a279_0x462793,_0x3c3c99=await a279_0x651b64[_0x1deb71(0x15f)][_0x1deb71(0x163)](_0x4be36a,{'withFileTypes':!![]});for(const _0x290de6 of _0x3c3c99){const _0x431bb0=a279_0x39bd4c[_0x1deb71(0x168)](_0x4be36a,_0x290de6[_0x1deb71(0x152)]);let _0x84996b=a279_0x39bd4c[_0x1deb71(0x168)](_0x110b28,_0x290de6['name']);_0x290de6[_0x1deb71(0x152)][_0x1deb71(0x15a)](_0x1deb71(0x18c))&&(_0x84996b=a279_0x39bd4c[_0x1deb71(0x168)](_0x110b28,_0x290de6['name'][_0x1deb71(0x159)](/\.tpl$/,'')));if(_0x290de6[_0x1deb71(0x173)]())await a279_0x651b64[_0x1deb71(0x15f)][_0x1deb71(0x174)](_0x84996b,{'recursive':!![]}),await this[_0x1deb71(0x160)](_0x431bb0,_0x84996b,_0x42b8a0,_0x1901df);else _0x290de6[_0x1deb71(0x16d)]()&&await this[_0x1deb71(0x186)](_0x431bb0,_0x84996b,_0x42b8a0,_0x1901df);}}static async[a279_0x462793(0x186)](_0x5d4be2,_0x1d7208,_0x352af2,_0xa446b2){const _0x21b364=a279_0x462793,_0x1eaef2=a279_0x39bd4c[_0x21b364(0x16f)](_0x5d4be2)[_0x21b364(0x18f)]();_0x5d4be2['endsWith'](_0x21b364(0x18c))&&(_0x1d7208=_0x1d7208['replace'](/\.tpl$/,''));const _0x266de2=[_0x21b364(0x194),_0x21b364(0x18e),_0x21b364(0x192),'.js','.json',_0x21b364(0x190),'.css','.scss',_0x21b364(0x18c)];if(_0x266de2[_0x21b364(0x15b)](_0x1eaef2)||_0x5d4be2[_0x21b364(0x15a)](_0x21b364(0x18c))){const _0x5c71e1=await a279_0x651b64[_0x21b364(0x15f)]['readFile'](_0x5d4be2,_0x21b364(0x169)),_0x2b403c=this[_0x21b364(0x161)](_0x5c71e1,_0x352af2,_0xa446b2);await a279_0x651b64['promises'][_0x21b364(0x17e)](_0x1d7208,_0x2b403c,_0x21b364(0x169));}else await a279_0x651b64['promises']['copyFile'](_0x5d4be2,_0x1d7208);}}
@@ -1 +1 @@
1
- (function(_0x2a316f,_0xced512){const _0x14ce8b=a274_0x4d0f,_0x46f665=_0x2a316f();while(!![]){try{const _0x11d6d8=parseInt(_0x14ce8b(0x131))/0x1*(-parseInt(_0x14ce8b(0x124))/0x2)+-parseInt(_0x14ce8b(0x134))/0x3*(-parseInt(_0x14ce8b(0x133))/0x4)+-parseInt(_0x14ce8b(0x122))/0x5+parseInt(_0x14ce8b(0x12c))/0x6+parseInt(_0x14ce8b(0x132))/0x7*(parseInt(_0x14ce8b(0x117))/0x8)+parseInt(_0x14ce8b(0x119))/0x9+-parseInt(_0x14ce8b(0x116))/0xa;if(_0x11d6d8===_0xced512)break;else _0x46f665['push'](_0x46f665['shift']());}catch(_0x59e764){_0x46f665['push'](_0x46f665['shift']());}}}(a274_0x1136,0x22cab));import{mkdir,readFile,writeFile}from'node:fs/promises';function a274_0x4d0f(_0x442f12,_0x92f751){_0x442f12=_0x442f12-0x115;const _0x1136a7=a274_0x1136();let _0x4d0f32=_0x1136a7[_0x442f12];return _0x4d0f32;}import{homedir}from'node:os';function a274_0x1136(){const _0x3f50ee=['lastNotifiedAt','\x20available,\x20current\x20','https://www.npmjs.com/package/','574260bmjyfP','trim','stringify','toLowerCase','utf8','1Sosptd','147ZWSKcc','370676vmDWgr','6nkZCkA','object','rabetbase-cli','2078910YgPtSn','94352qFXpRy','parse','1419489gcIIzl','checkedAt','/v/','number','.cache','true','now','\x20update','latest','330860XhItXK','stableVersion','539746TaTOTz','valid',',\x20run:\x20','lastNotifiedVersion','yes'];a274_0x1136=function(){return _0x3f50ee;};return a274_0x1136();}import{dirname,join}from'node:path';import a274_0x401bb0 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 _0x59462d=a274_0x4d0f,_0x46b13e=process.env.RABETBASE_NO_UPDATE_NOTICE?.['trim']()[_0x59462d(0x12f)]();return _0x46b13e==='1'||_0x46b13e===_0x59462d(0x11e)||_0x46b13e===_0x59462d(0x128);}function cacheRoot(){const _0x373374=a274_0x4d0f;return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),_0x373374(0x11d));}export function getUpdateNoticeCachePath(){const _0x5f5684=a274_0x4d0f;return join(cacheRoot(),_0x5f5684(0x115),'update-check.json');}async function readUpdateNoticeCache(){const _0x513fd2=a274_0x4d0f;try{const _0x2ddeca=await readFile(getUpdateNoticeCachePath(),'utf8'),_0x1b8c00=JSON[_0x513fd2(0x118)](_0x2ddeca);if(!_0x1b8c00||typeof _0x1b8c00!==_0x513fd2(0x135))return{};return _0x1b8c00;}catch{return{};}}async function writeUpdateNoticeCache(_0x3841b4){const _0x48ac3c=a274_0x4d0f;try{const _0x2c4ba2=getUpdateNoticeCachePath();await mkdir(dirname(_0x2c4ba2),{'recursive':!![]}),await writeFile(_0x2c4ba2,JSON[_0x48ac3c(0x12e)](_0x3841b4,null,0x2)+'\x0a',_0x48ac3c(0x130));}catch{}}function isFreshCheck(_0x2530ec,_0x9dacba){const _0x462846=a274_0x4d0f;return typeof _0x2530ec[_0x462846(0x11a)]===_0x462846(0x11c)&&_0x9dacba-_0x2530ec['checkedAt']<UPDATE_CHECK_TTL_MS;}function isRecentlyNotified(_0x323dae,_0x14c917,_0x3fb5ca){const _0x28a102=a274_0x4d0f;return _0x323dae[_0x28a102(0x127)]===_0x14c917&&typeof _0x323dae[_0x28a102(0x129)]===_0x28a102(0x11c)&&_0x3fb5ca-_0x323dae[_0x28a102(0x129)]<UPDATE_NOTICE_TTL_MS;}export function buildNpmVersionUrl(_0xed4689){const _0x38d425=a274_0x4d0f;return _0x38d425(0x12b)+NPM_PACKAGE_NAME+_0x38d425(0x11b)+_0xed4689;}export async function resolveLatestUpdateNotice(){const _0x17aaf3=a274_0x4d0f;if(isUpdateNoticeDisabled())return null;try{const _0x49ae6f=Date[_0x17aaf3(0x11f)](),_0x5dfe9d=getCliVersion(),_0x27b782=await readUpdateNoticeCache();let _0x591580=isFreshCheck(_0x27b782,_0x49ae6f)?_0x27b782[_0x17aaf3(0x121)]?.[_0x17aaf3(0x12d)]():undefined;if(!_0x591580&&!isFreshCheck(_0x27b782,_0x49ae6f)){const _0x77552c=await getCliVersionPolicy();_0x591580=_0x77552c?.[_0x17aaf3(0x123)]?.['trim']()||undefined,await writeUpdateNoticeCache({..._0x27b782,'checkedAt':_0x49ae6f,'latest':_0x591580,'failed':!_0x591580});}if(!_0x591580||!a274_0x401bb0[_0x17aaf3(0x125)](_0x5dfe9d)||!a274_0x401bb0[_0x17aaf3(0x125)](_0x591580))return null;if(a274_0x401bb0['gte'](_0x5dfe9d,_0x591580))return null;if(isRecentlyNotified(_0x27b782,_0x591580,_0x49ae6f))return null;const _0xcdcb0f=CLI_BIN_NAME+_0x17aaf3(0x120);return await writeUpdateNoticeCache({..._0x27b782,'checkedAt':isFreshCheck(_0x27b782,_0x49ae6f)?_0x27b782[_0x17aaf3(0x11a)]:_0x49ae6f,'latest':_0x591580,'failed':![],'lastNotifiedVersion':_0x591580,'lastNotifiedAt':_0x49ae6f}),{'command':_0xcdcb0f,'current':_0x5dfe9d,'latest':_0x591580,'url':buildNpmVersionUrl(_0x591580),'message':CLI_BIN_NAME+'\x20'+_0x591580+_0x17aaf3(0x12a)+_0x5dfe9d+_0x17aaf3(0x126)+_0xcdcb0f};}catch{return null;}}
1
+ (function(_0x4818d9,_0x3631ef){const _0x59ca33=a280_0x2aad,_0x549310=_0x4818d9();while(!![]){try{const _0x4c4b18=-parseInt(_0x59ca33(0x80))/0x1+parseInt(_0x59ca33(0x6a))/0x2+-parseInt(_0x59ca33(0x77))/0x3+-parseInt(_0x59ca33(0x71))/0x4+-parseInt(_0x59ca33(0x7e))/0x5+-parseInt(_0x59ca33(0x6e))/0x6*(parseInt(_0x59ca33(0x6d))/0x7)+-parseInt(_0x59ca33(0x6c))/0x8*(-parseInt(_0x59ca33(0x73))/0x9);if(_0x4c4b18===_0x3631ef)break;else _0x549310['push'](_0x549310['shift']());}catch(_0x311ea3){_0x549310['push'](_0x549310['shift']());}}}(a280_0x5a74,0xa9ad7));import{mkdir,readFile,writeFile}from'node:fs/promises';import{homedir}from'node:os';import{dirname,join}from'node:path';import a280_0x15bc62 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';function a280_0x5a74(){const _0xac958f=['update-check.json','now','3095932bhDkzU','toLowerCase','1791AmHYpy','trim',',\x20run:\x20','valid','2757816ruqgJz','\x20update','stringify','stableVersion','gte','latest','number','122160LOOlLN','.cache','1311936rsRXqm','parse','utf8','2280416pfPmyx','checkedAt','143472wnGUHY','14oqxTUq','2953356JHqwKN'];a280_0x5a74=function(){return _0xac958f;};return a280_0x5a74();}const UPDATE_CHECK_TTL_MS=0xc*0x3c*0x3c*0x3e8,UPDATE_NOTICE_TTL_MS=0x18*0x3c*0x3c*0x3e8;function isUpdateNoticeDisabled(){const _0x303886=a280_0x2aad,_0x4662d2=process.env.RABETBASE_NO_UPDATE_NOTICE?.[_0x303886(0x74)]()[_0x303886(0x72)]();return _0x4662d2==='1'||_0x4662d2==='true'||_0x4662d2==='yes';}function cacheRoot(){const _0x4d96bd=a280_0x2aad;return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),_0x4d96bd(0x7f));}export function getUpdateNoticeCachePath(){const _0x23f5af=a280_0x2aad;return join(cacheRoot(),'rabetbase-cli',_0x23f5af(0x6f));}async function readUpdateNoticeCache(){const _0x203e93=a280_0x2aad;try{const _0x1114c3=await readFile(getUpdateNoticeCachePath(),_0x203e93(0x82)),_0x45a272=JSON[_0x203e93(0x81)](_0x1114c3);if(!_0x45a272||typeof _0x45a272!=='object')return{};return _0x45a272;}catch{return{};}}function a280_0x2aad(_0x330455,_0x50efe8){_0x330455=_0x330455-0x6a;const _0x5a74df=a280_0x5a74();let _0x2aadd9=_0x5a74df[_0x330455];return _0x2aadd9;}async function writeUpdateNoticeCache(_0x5b0b7c){const _0x45526e=a280_0x2aad;try{const _0x2559b1=getUpdateNoticeCachePath();await mkdir(dirname(_0x2559b1),{'recursive':!![]}),await writeFile(_0x2559b1,JSON[_0x45526e(0x79)](_0x5b0b7c,null,0x2)+'\x0a',_0x45526e(0x82));}catch{}}function isFreshCheck(_0x2625d7,_0x2ff459){const _0x4481c1=a280_0x2aad;return typeof _0x2625d7[_0x4481c1(0x6b)]===_0x4481c1(0x7d)&&_0x2ff459-_0x2625d7['checkedAt']<UPDATE_CHECK_TTL_MS;}function isRecentlyNotified(_0x24f476,_0x2ed3f7,_0x3fabc6){return _0x24f476['lastNotifiedVersion']===_0x2ed3f7&&typeof _0x24f476['lastNotifiedAt']==='number'&&_0x3fabc6-_0x24f476['lastNotifiedAt']<UPDATE_NOTICE_TTL_MS;}export function buildNpmVersionUrl(_0x42bda3){return'https://www.npmjs.com/package/'+NPM_PACKAGE_NAME+'/v/'+_0x42bda3;}export async function resolveLatestUpdateNotice(){const _0x31beb5=a280_0x2aad;if(isUpdateNoticeDisabled())return null;try{const _0x178ccc=Date[_0x31beb5(0x70)](),_0x2bd1ff=getCliVersion(),_0x7321e4=await readUpdateNoticeCache();let _0x2f5be3=isFreshCheck(_0x7321e4,_0x178ccc)?_0x7321e4[_0x31beb5(0x7c)]?.[_0x31beb5(0x74)]():undefined;if(!_0x2f5be3&&!isFreshCheck(_0x7321e4,_0x178ccc)){const _0x325d3=await getCliVersionPolicy();_0x2f5be3=_0x325d3?.[_0x31beb5(0x7a)]?.[_0x31beb5(0x74)]()||undefined,await writeUpdateNoticeCache({..._0x7321e4,'checkedAt':_0x178ccc,'latest':_0x2f5be3,'failed':!_0x2f5be3});}if(!_0x2f5be3||!a280_0x15bc62['valid'](_0x2bd1ff)||!a280_0x15bc62[_0x31beb5(0x76)](_0x2f5be3))return null;if(a280_0x15bc62[_0x31beb5(0x7b)](_0x2bd1ff,_0x2f5be3))return null;if(isRecentlyNotified(_0x7321e4,_0x2f5be3,_0x178ccc))return null;const _0x3fc77c=CLI_BIN_NAME+_0x31beb5(0x78);return await writeUpdateNoticeCache({..._0x7321e4,'checkedAt':isFreshCheck(_0x7321e4,_0x178ccc)?_0x7321e4[_0x31beb5(0x6b)]:_0x178ccc,'latest':_0x2f5be3,'failed':![],'lastNotifiedVersion':_0x2f5be3,'lastNotifiedAt':_0x178ccc}),{'command':_0x3fc77c,'current':_0x2bd1ff,'latest':_0x2f5be3,'url':buildNpmVersionUrl(_0x2f5be3),'message':CLI_BIN_NAME+'\x20'+_0x2f5be3+'\x20available,\x20current\x20'+_0x2bd1ff+_0x31beb5(0x75)+_0x3fc77c};}catch{return null;}}
@@ -1 +1 @@
1
- function a275_0x177c(_0x3379a9,_0x1d220b){_0x3379a9=_0x3379a9-0xa8;var _0x5687f1=a275_0x5687();var _0x177c6c=_0x5687f1[_0x3379a9];return _0x177c6c;}(function(_0x459e97,_0x3777f0){var _0x519c97=a275_0x177c,_0x11a97d=_0x459e97();while(!![]){try{var _0x56a439=parseInt(_0x519c97(0xae))/0x1+parseInt(_0x519c97(0xaa))/0x2+-parseInt(_0x519c97(0xa9))/0x3*(-parseInt(_0x519c97(0xac))/0x4)+parseInt(_0x519c97(0xa8))/0x5*(parseInt(_0x519c97(0xaf))/0x6)+parseInt(_0x519c97(0xb0))/0x7+-parseInt(_0x519c97(0xab))/0x8+-parseInt(_0x519c97(0xad))/0x9;if(_0x56a439===_0x3777f0)break;else _0x11a97d['push'](_0x11a97d['shift']());}catch(_0x5d4af2){_0x11a97d['push'](_0x11a97d['shift']());}}}(a275_0x5687,0x6c416));import{VERSION}from'../generated/build-info.js';export function getCliVersion(){return VERSION;}function a275_0x5687(){var _0x4963fe=['4WOSaQQ','9899064JFSlKo','161948OJNdjH','6LkiJiN','1120322JBCjfA','1855220RslfFI','1187409RalMNr','1412836cAKUbD','2015592FmIiOP'];a275_0x5687=function(){return _0x4963fe;};return a275_0x5687();}
1
+ function a281_0x51fd(){var _0x1722cd=['5559256WgAezs','68734eYnHDT','9QCaYrs','5077751kthrLn','6iqYVrD','43230oHHnCk','92199putqvv','196mbAMEx','6syPdGE','3835970IdycxI','26339599VGlOOI'];a281_0x51fd=function(){return _0x1722cd;};return a281_0x51fd();}(function(_0xb25281,_0x551f8e){var _0x580a42=a281_0x5b7c,_0x3ac94a=_0xb25281();while(!![]){try{var _0x1078d3=parseInt(_0x580a42(0x152))/0x1*(parseInt(_0x580a42(0x14f))/0x2)+parseInt(_0x580a42(0x154))/0x3+-parseInt(_0x580a42(0x14a))/0x4*(parseInt(_0x580a42(0x153))/0x5)+-parseInt(_0x580a42(0x14b))/0x6*(parseInt(_0x580a42(0x151))/0x7)+-parseInt(_0x580a42(0x14e))/0x8+parseInt(_0x580a42(0x150))/0x9*(-parseInt(_0x580a42(0x14c))/0xa)+parseInt(_0x580a42(0x14d))/0xb;if(_0x1078d3===_0x551f8e)break;else _0x3ac94a['push'](_0x3ac94a['shift']());}catch(_0x5516de){_0x3ac94a['push'](_0x3ac94a['shift']());}}}(a281_0x51fd,0x629b5));import{VERSION}from'../generated/build-info.js';function a281_0x5b7c(_0x14aac3,_0x1d4d17){_0x14aac3=_0x14aac3-0x14a;var _0x51fdb4=a281_0x51fd();var _0x5b7c28=_0x51fdb4[_0x14aac3];return _0x5b7c28;}export function getCliVersion(){return VERSION;}
@@ -1 +1 @@
1
- function a276_0x4791(_0xd74b7c,_0x3f5333){_0xd74b7c=_0xd74b7c-0x119;var _0x311d2c=a276_0x311d();var _0x47918e=_0x311d2c[_0xd74b7c];return _0x47918e;}(function(_0xc4e2dd,_0x58494a){var _0x478ea4=a276_0x4791,_0x4d56e6=_0xc4e2dd();while(!![]){try{var _0xc353c6=parseInt(_0x478ea4(0x121))/0x1+-parseInt(_0x478ea4(0x122))/0x2+parseInt(_0x478ea4(0x11c))/0x3+-parseInt(_0x478ea4(0x120))/0x4+parseInt(_0x478ea4(0x11e))/0x5*(-parseInt(_0x478ea4(0x11b))/0x6)+parseInt(_0x478ea4(0x11a))/0x7*(parseInt(_0x478ea4(0x11d))/0x8)+-parseInt(_0x478ea4(0x11f))/0x9*(-parseInt(_0x478ea4(0x119))/0xa);if(_0xc353c6===_0x58494a)break;else _0x4d56e6['push'](_0x4d56e6['shift']());}catch(_0x32057a){_0x4d56e6['push'](_0x4d56e6['shift']());}}}(a276_0x311d,0x7372d));import{setActiveCookie,clearActiveCookie}from'../core/api-client.js';function a276_0x311d(){var _0x3c2408=['2616lvxPOE','1732662RqCEur','10816BjWuQi','8670OhzOvl','162423PjQhHk','791648tiqgdG','2710JhbGtR','1635540EEWdJg','890fuEWiI','301ggdUDl'];a276_0x311d=function(){return _0x3c2408;};return a276_0x311d();}export async function withActiveCookie(_0x2d6765,_0x226ec5){setActiveCookie(_0x2d6765);try{return await _0x226ec5();}finally{clearActiveCookie();}}
1
+ function a282_0x4867(){var _0x2ca6ec=['1492QTYxIF','57RsUdFO','4250034MHYiSW','4366586YLkOMM','16615NDACjH','2939768sCzHwQ','2021690ioIrQJ','5934768dVAABh','18ZeApRD','54452mNeCLb'];a282_0x4867=function(){return _0x2ca6ec;};return a282_0x4867();}(function(_0x22bf2f,_0x5a69ed){var _0x26b2d7=a282_0x165c,_0x122f18=_0x22bf2f();while(!![]){try{var _0x3ee0d0=-parseInt(_0x26b2d7(0x74))/0x1*(parseInt(_0x26b2d7(0x72))/0x2)+-parseInt(_0x26b2d7(0x75))/0x3+-parseInt(_0x26b2d7(0x73))/0x4*(-parseInt(_0x26b2d7(0x6d))/0x5)+parseInt(_0x26b2d7(0x70))/0x6+parseInt(_0x26b2d7(0x6c))/0x7+-parseInt(_0x26b2d7(0x6e))/0x8*(-parseInt(_0x26b2d7(0x71))/0x9)+parseInt(_0x26b2d7(0x6f))/0xa;if(_0x3ee0d0===_0x5a69ed)break;else _0x122f18['push'](_0x122f18['shift']());}catch(_0x20e1be){_0x122f18['push'](_0x122f18['shift']());}}}(a282_0x4867,0xc86dc));function a282_0x165c(_0xcb7242,_0x18c85a){_0xcb7242=_0xcb7242-0x6c;var _0x486753=a282_0x4867();var _0x165cef=_0x486753[_0xcb7242];return _0x165cef;}import{setActiveCookie,clearActiveCookie}from'../core/api-client.js';export async function withActiveCookie(_0x200d47,_0x3f782a){setActiveCookie(_0x200d47);try{return await _0x3f782a();}finally{clearActiveCookie();}}
@@ -1 +1 @@
1
- (function(_0x1ef99f,_0x172073){var _0x26eb8c=a277_0x49ae,_0x24115f=_0x1ef99f();while(!![]){try{var _0x222030=-parseInt(_0x26eb8c(0x104))/0x1*(parseInt(_0x26eb8c(0xfa))/0x2)+parseInt(_0x26eb8c(0x102))/0x3*(-parseInt(_0x26eb8c(0x106))/0x4)+parseInt(_0x26eb8c(0xff))/0x5+parseInt(_0x26eb8c(0x100))/0x6+-parseInt(_0x26eb8c(0xfe))/0x7+-parseInt(_0x26eb8c(0xfb))/0x8*(-parseInt(_0x26eb8c(0x101))/0x9)+parseInt(_0x26eb8c(0xfc))/0xa*(parseInt(_0x26eb8c(0x103))/0xb);if(_0x222030===_0x172073)break;else _0x24115f['push'](_0x24115f['shift']());}catch(_0x5cb6e3){_0x24115f['push'](_0x24115f['shift']());}}}(a277_0x51be,0xdd8a6));function a277_0x51be(){var _0x2a0b7c=['9uWOMmE','1733112tnrJhG','2585XiygSO','223219zWWXIV','write','4RNpofX','12xypCwd','8724656paBKXj','52870TyIipQ','stderr','11153989rnWFOs','3512230wVcxmz','8294412jIIwlw'];a277_0x51be=function(){return _0x2a0b7c;};return a277_0x51be();}function a277_0x49ae(_0x5e62a1,_0x501417){_0x5e62a1=_0x5e62a1-0xfa;var _0x51be52=a277_0x51be();var _0x49ae7c=_0x51be52[_0x5e62a1];return _0x49ae7c;}export function writeCliSideChannelLine(_0x261bb7){var _0x2ab7f3=a277_0x49ae;process[_0x2ab7f3(0xfd)][_0x2ab7f3(0x105)](_0x261bb7+'\x0a');}
1
+ function a283_0xd982(_0x1403cd,_0x5002f2){_0x1403cd=_0x1403cd-0x105;var _0x3a720b=a283_0x3a72();var _0xd982b5=_0x3a720b[_0x1403cd];return _0xd982b5;}function a283_0x3a72(){var _0x5471ab=['1171098oIFedF','175994LVZceE','194934NwkUrQ','4191qaIcYr','932054xBARhK','812WOcUME','5945376JTZvmx','5taSQPS','532439Jelgtz','stderr','write'];a283_0x3a72=function(){return _0x5471ab;};return a283_0x3a72();}(function(_0x31cadd,_0x5b124b){var _0x2b08e2=a283_0xd982,_0x39e21f=_0x31cadd();while(!![]){try{var _0x200faf=parseInt(_0x2b08e2(0x109))/0x1+parseInt(_0x2b08e2(0x105))/0x2+-parseInt(_0x2b08e2(0x10f))/0x3*(-parseInt(_0x2b08e2(0x106))/0x4)+-parseInt(_0x2b08e2(0x108))/0x5*(-parseInt(_0x2b08e2(0x10e))/0x6)+-parseInt(_0x2b08e2(0x10d))/0x7+-parseInt(_0x2b08e2(0x107))/0x8+-parseInt(_0x2b08e2(0x10c))/0x9;if(_0x200faf===_0x5b124b)break;else _0x39e21f['push'](_0x39e21f['shift']());}catch(_0x3c3cd4){_0x39e21f['push'](_0x39e21f['shift']());}}}(a283_0x3a72,0x6596e));export function writeCliSideChannelLine(_0x20b59b){var _0x29c7c3=a283_0xd982;process[_0x29c7c3(0x10a)][_0x29c7c3(0x10b)](_0x20b59b+'\x0a');}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lovrabet/rabetbase-cli",
3
- "version": "2.3.16-beta.2",
3
+ "version": "2.3.16-beta.3",
4
4
  "description": "Developer CLI for Lovrabet apps, datasets, pages, SQL, BFF, database connections, skills, and AI agent workflows.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "keywords": [
@@ -10,7 +10,7 @@
10
10
 
11
11
  - 移除旧 `/hello-world`、`/chart-fetch`、`/intro` 实操路径,改为当前 `src/pages` 自动路由页面。
12
12
  - 统一本地启动、构建、预览命令为 `rabetbase run start/build/preview`。
13
- - 补充 `rabetbase project create`、`rabetbase config set appcode`、`rabetbase project init`、`rabetbase api pull` 的使用时机。
13
+ - 补充 `rabetbase project create`、`rabetbase config set appcode`、`rabetbase workspace init`、`rabetbase api pull` 的使用时机。
14
14
  - 补充 SDK 配置、微前端接入、CDN 产物和 Lovrabet 主应用页面配置说明。
15
15
  - 重做首页为 Prompt 开发入口,展示 AppCode 状态、Agent 场景示例、飞书文库导航、内置页面入口和主应用接入检查清单。
16
16
 
@@ -126,7 +126,7 @@ rabetbase api pull
126
126
  如果你是直接克隆模板源码,且当前目录还没有 `.rabetbase.json`,先执行:
127
127
 
128
128
  ```bash
129
- rabetbase project init --appcode YOUR_APP_CODE
129
+ rabetbase workspace init --appcode YOUR_APP_CODE
130
130
  rabetbase api pull
131
131
  ```
132
132
 
@@ -103,7 +103,7 @@ rabetbase api pull
103
103
  如果你是直接克隆模板源码,且当前目录还没有 `.rabetbase.json`,执行:
104
104
 
105
105
  ```bash
106
- rabetbase project init --appcode app-xxxx
106
+ rabetbase workspace init --appcode app-xxxx
107
107
  rabetbase api pull
108
108
  ```
109
109
 
@@ -205,7 +205,7 @@ function HomePage() {
205
205
  tags: ["项目配置", "模型同步"],
206
206
  prompt: setupPrompt,
207
207
  commands: [
208
- "rabetbase project init",
208
+ "rabetbase workspace init --appcode <code>",
209
209
  "rabetbase config get",
210
210
  "rabetbase api pull",
211
211
  ],
@@ -1 +0,0 @@
1
- (function(_0x30aea1,_0x5c7f9c){const _0x46b991=a161_0x4846,_0x5687cc=_0x30aea1();while(!![]){try{const _0x26c001=-parseInt(_0x46b991(0x123))/0x1+-parseInt(_0x46b991(0x106))/0x2+parseInt(_0x46b991(0x10c))/0x3*(-parseInt(_0x46b991(0x110))/0x4)+parseInt(_0x46b991(0xff))/0x5*(-parseInt(_0x46b991(0x128))/0x6)+parseInt(_0x46b991(0x125))/0x7*(-parseInt(_0x46b991(0xf9))/0x8)+-parseInt(_0x46b991(0x111))/0x9+parseInt(_0x46b991(0x100))/0xa;if(_0x26c001===_0x5c7f9c)break;else _0x5687cc['push'](_0x5687cc['shift']());}catch(_0x1f240c){_0x5687cc['push'](_0x5687cc['shift']());}}}(a161_0x477e,0x465d9));import{readFileSync,existsSync,renameSync}from'node:fs';import{resolve,dirname,basename}from'node:path';import{fileURLToPath}from'node:url';function a161_0x4846(_0x15db03,_0x3344b0){_0x15db03=_0x15db03-0xf7;const _0x477e63=a161_0x477e();let _0x4846b7=_0x477e63[_0x15db03];return _0x4846b7;}import a161_0x5db4fa from'chalk';import{input,confirm}from'@inquirer/prompts';import{CLI_BIN_NAME}from'../../constant/cli.js';import{logger}from'../../utils/logger.js';import{readRawConfig,getProjectConfigPath,writeConfigFile,NEW_CONFIG_NAME,LEGACY_CONFIG_NAMES}from'../../context.js';import{validateAppcode}from'../../commands/common/validate.js';function a161_0x477e(){const _0x420d86=['169187pdKSwG','Upgrade\x20it\x20to\x20','374283YcvVZZ','init','⚠\x20Found\x20legacy\x20configuration\x20file:\x20','146868QgWmFj','\x20\x20Apps:\x20','.rabetbase.json','?\x20(Old\x20file\x20→\x20*.bak)','72ppvYPm','✓\x20Upgraded\x20','log','bold','appcode','\x20\x20Default:\x20','10oWhseR','18692530cEQsNu','defaultApp','parse','App\x20Code\x20cannot\x20be\x20empty','cwd','gray','987466vJwuex','package.json','trim','\x20api\x20pull\x27','join','\x20workspace\x20init`\x20to\x20start\x20fresh.','3ymomib','\x20→\x20.rabetbase.json','Please\x20enter\x20App\x20Code:','Invalid\x20App\x20Code','1536048rLlcsN','35343YDNZZH','apps','string','1.0.0','\x20api\x20generate\x27\x20and\x20\x27','toLocaleString','utf8','\x20\x20Old\x20file\x20backed\x20up\x20as\x20','green','app','✓\x20Successfully\x20initialized\x20.rabetbase.json\x20in\x20current\x20directory','setLogPath','env','.bak','初始化项目配置文件成功','cyan','version','info'];a161_0x477e=function(){return _0x420d86;};return a161_0x477e();}import{buildCanonicalProjectConfig}from'../../config/schema.js';export async function initConfig(_0x389c36){const _0x7ed70d=a161_0x4846,{appcode:_0x428224,env:_0x4c355b,autoYes:_0x3490d6}=_0x389c36,_0x3453e9=process[_0x7ed70d(0x104)]();if(getProjectConfigPath())throw new Error('.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.\x20Nothing\x20to\x20do.');let _0x2aac2c;for(const _0x31ba6b of LEGACY_CONFIG_NAMES){const _0x2efa18=resolve(_0x3453e9,_0x31ba6b);if(existsSync(_0x2efa18)){_0x2aac2c=_0x2efa18;break;}}if(_0x2aac2c){let _0x2a141c={};try{_0x2a141c=JSON[_0x7ed70d(0x102)](readFileSync(_0x2aac2c,'utf8'));}catch{}const _0xbec3ab=basename(_0x2aac2c),_0x1ef899=_0x2a141c?.[_0x7ed70d(0xfd)]||_0x2a141c?.[_0x7ed70d(0x11a)];let _0x4c1844=_0x3490d6;!_0x3490d6&&(console[_0x7ed70d(0xfb)](a161_0x5db4fa['yellow'](_0x7ed70d(0x127)+a161_0x5db4fa[_0x7ed70d(0xfc)](_0xbec3ab))),_0x1ef899&&console[_0x7ed70d(0xfb)](a161_0x5db4fa['cyan']('\x20\x20appcode:\x20'+_0x1ef899)),_0x4c1844=await confirm({'message':_0x7ed70d(0x124)+a161_0x5db4fa[_0x7ed70d(0xfc)](_0x7ed70d(0xf7))+_0x7ed70d(0xf8),'default':!![]}));if(!_0x4c1844){console[_0x7ed70d(0xfb)]('Migration\x20cancelled.\x20Run\x20`'+CLI_BIN_NAME+_0x7ed70d(0x10b));return;}const _0x4a19d3=resolve(_0x3453e9,NEW_CONFIG_NAME),_0x3875c9=getCliVersionFromPkg(),_0x5c9406=readRawConfig(),_0x2eeed1=_0x428224||(typeof _0x2a141c?.['appcode']===_0x7ed70d(0x113)?_0x2a141c[_0x7ed70d(0xfd)]:undefined)||(typeof _0x2a141c?.[_0x7ed70d(0x11a)]===_0x7ed70d(0x113)?_0x2a141c['app']:undefined)||await askAppcode(),_0x36d592=typeof _0x2a141c?.[_0x7ed70d(0x11d)]==='string'?_0x2a141c['env']:typeof _0x5c9406[_0x7ed70d(0x11d)]===_0x7ed70d(0x113)?_0x5c9406[_0x7ed70d(0x11d)]:'production',_0x21051f=buildCanonicalProjectConfig({..._0x5c9406,..._0x2a141c},{'appCodes':[_0x2eeed1],'env':_0x36d592,'metadata':{'version':_0x3875c9,'migratedAt':new Date()[_0x7ed70d(0x116)](),'migratedFrom':_0x2aac2c}});writeConfigFile(_0x4a19d3,_0x21051f);const _0x4e6026=_0x2aac2c+'.bak';renameSync(_0x2aac2c,_0x4e6026),logger[_0x7ed70d(0x11c)](_0x3453e9),logger[_0x7ed70d(0x122)](_0x7ed70d(0x126),'从旧配置文件升级成功',{'from':_0x2aac2c,'to':_0x4a19d3,'appcode':_0x2eeed1,'env':_0x21051f[_0x7ed70d(0x11d)]}),console['log'](a161_0x5db4fa['green'](_0x7ed70d(0xfa)+_0xbec3ab+_0x7ed70d(0x10d))),console[_0x7ed70d(0xfb)](a161_0x5db4fa[_0x7ed70d(0x120)](_0x7ed70d(0x129)+Object['keys'](_0x21051f[_0x7ed70d(0x112)]||{})[_0x7ed70d(0x10a)](',\x20'))),console[_0x7ed70d(0xfb)](a161_0x5db4fa[_0x7ed70d(0x120)]('\x20\x20Default:\x20'+_0x21051f[_0x7ed70d(0x101)])),console[_0x7ed70d(0xfb)](a161_0x5db4fa[_0x7ed70d(0x105)](_0x7ed70d(0x118)+_0xbec3ab+_0x7ed70d(0x11e)));return;}const _0x107ac6=_0x428224||await askAppcode(),_0xafb9b8=resolve(_0x3453e9,NEW_CONFIG_NAME),_0x477345=getCliVersionFromPkg(),_0x5a9458=readRawConfig(),_0x2357df=typeof _0x5a9458[_0x7ed70d(0x11d)]===_0x7ed70d(0x113)?_0x5a9458['env']:undefined,_0x146677=buildCanonicalProjectConfig({},{'appCodes':[_0x107ac6],'env':_0x4c355b||_0x2357df||'production','metadata':{'version':_0x477345,'createdAt':new Date()[_0x7ed70d(0x116)]()}});writeConfigFile(_0xafb9b8,_0x146677),logger[_0x7ed70d(0x11c)](_0x3453e9),logger['info'](_0x7ed70d(0x126),_0x7ed70d(0x11f),{'appcode':_0x107ac6,'env':_0x146677[_0x7ed70d(0x11d)],'version':_0x146677[_0x7ed70d(0x121)],'configPath':_0xafb9b8}),console['log'](a161_0x5db4fa[_0x7ed70d(0x119)](_0x7ed70d(0x11b))),console['log'](a161_0x5db4fa[_0x7ed70d(0x120)](_0x7ed70d(0x129)+Object['keys'](_0x146677['apps']||{})[_0x7ed70d(0x10a)](',\x20'))),console[_0x7ed70d(0xfb)](a161_0x5db4fa['cyan'](_0x7ed70d(0xfe)+_0x146677[_0x7ed70d(0x101)])),console['log']('\x20\x20You\x20can\x20now\x20use\x20commands\x20like\x20\x27'+CLI_BIN_NAME+_0x7ed70d(0x115)+CLI_BIN_NAME+_0x7ed70d(0x109));}function askAppcode(){const _0x520c9e=a161_0x4846;return input({'message':_0x520c9e(0x10e),'validate':_0x4db694=>{const _0x56b35d=_0x520c9e;if(!_0x4db694[_0x56b35d(0x108)]())return _0x56b35d(0x103);const {valid:_0x349da2,message:_0x1da23b}=validateAppcode(_0x4db694[_0x56b35d(0x108)]());return _0x349da2||_0x1da23b||_0x56b35d(0x10f);}});}function getCliVersionFromPkg(){const _0x379a28=a161_0x4846;try{const _0x157b95=fileURLToPath(import.meta.url),_0x18b2f6=resolve(dirname(_0x157b95),'../..'),_0x3a7317=JSON['parse'](readFileSync(resolve(_0x18b2f6,_0x379a28(0x107)),_0x379a28(0x117)));return _0x3a7317[_0x379a28(0x121)]||_0x379a28(0x114);}catch{return'1.0.0';}}
@@ -1 +0,0 @@
1
- const a184_0x92c3a8=a184_0x1016;(function(_0x1165ee,_0x3e8c6f){const _0xa26156=a184_0x1016,_0x3461e1=_0x1165ee();while(!![]){try{const _0x55d123=parseInt(_0xa26156(0x80))/0x1+parseInt(_0xa26156(0x72))/0x2+-parseInt(_0xa26156(0x83))/0x3+-parseInt(_0xa26156(0x76))/0x4+-parseInt(_0xa26156(0x85))/0x5*(-parseInt(_0xa26156(0x74))/0x6)+-parseInt(_0xa26156(0x7d))/0x7+parseInt(_0xa26156(0x73))/0x8;if(_0x55d123===_0x3e8c6f)break;else _0x3461e1['push'](_0x3461e1['shift']());}catch(_0x368d6d){_0x3461e1['push'](_0x3461e1['shift']());}}}(a184_0x13a6,0xd026f));import{CliErrors}from'../../errors.js';function a184_0x13a6(){const _0x323f3a=['Target\x20database\x20—\x20accepts\x20a\x20numeric\x20ID\x20or\x20database\x20name\x20(e.g.\x20ecommerce_db)','1541064ADZIMc','10052128SnANOI','6qmQfPo','SQL\x20query\x20display\x20name','1568464LFbVNW','`rabetbase\x20sql\x20save`\x20has\x20been\x20deprecated.','sqlname','string','validation','Deprecated:\x20use\x20sql\x20create\x20to\x20create\x20and\x20sql\x20push\x20to\x20update','Update\x20existing\x20SQL\x20by\x20editing\x20the\x20synced\x20file\x20under\x20`.rabetbase/sql/<appCode>/<dbName|db-<id>>/`\x20and\x20then\x20running\x20`rabetbase\x20sql\x20push\x20--sqlcode\x20<code>\x20--yes`.','7426832BeMNtk','Create\x20new\x20SQL\x20with\x20`rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml`.','sql','1274396Xqzzrh','join','description','2987997EhRcow','write','1190lzbdBQ','Path\x20to\x20the\x20SQL\x20file','file'];a184_0x13a6=function(){return _0x323f3a;};return a184_0x13a6();}import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const SQL_SAVE_DEPRECATED_HINT=[a184_0x92c3a8(0x77),a184_0x92c3a8(0x7e),a184_0x92c3a8(0x7c)][a184_0x92c3a8(0x81)]('\x0a');function a184_0x1016(_0xe8bf5b,_0x2f92b8){_0xe8bf5b=_0xe8bf5b-0x70;const _0x13a6cf=a184_0x13a6();let _0x1016db=_0x13a6cf[_0xe8bf5b];return _0x1016db;}export const sqlSave={'service':a184_0x92c3a8(0x7f),'command':'save','description':a184_0x92c3a8(0x7b),'risk':a184_0x92c3a8(0x84),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a184_0x92c3a8(0x70),'type':'string','required':!![],'description':a184_0x92c3a8(0x86)},SQLCODE_FLAG_OPTIONAL,{'name':a184_0x92c3a8(0x78),'type':a184_0x92c3a8(0x79),'description':a184_0x92c3a8(0x75)},{'name':'db','type':a184_0x92c3a8(0x79),'description':a184_0x92c3a8(0x71)},{'name':a184_0x92c3a8(0x82),'type':'string','description':'Query\x20description'}],async 'validate'(){const _0x4c6d1d=a184_0x92c3a8;throw CliErrors[_0x4c6d1d(0x7a)](SQL_SAVE_DEPRECATED_HINT);},async 'execute'(){const _0x38058c=a184_0x92c3a8;throw CliErrors[_0x38058c(0x7a)](SQL_SAVE_DEPRECATED_HINT);}};