@lovrabet/rabetbase-cli 2.4.3 → 2.4.4

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 (381) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/login-success-html.js +1 -1
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/generate.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/api/shared.js +1 -1
  19. package/lib/commands/app/index.js +1 -1
  20. package/lib/commands/app/list.js +1 -1
  21. package/lib/commands/app/members-list.js +1 -1
  22. package/lib/commands/app/remote-directory.js +1 -1
  23. package/lib/commands/app/shared.js +1 -1
  24. package/lib/commands/app-config/delete.js +1 -1
  25. package/lib/commands/app-config/get.js +1 -1
  26. package/lib/commands/app-config/index.js +1 -1
  27. package/lib/commands/app-config/list.js +1 -1
  28. package/lib/commands/app-config/set.js +1 -1
  29. package/lib/commands/app-config/shared.js +1 -1
  30. package/lib/commands/auth/index.js +1 -1
  31. package/lib/commands/bff/create.js +1 -1
  32. package/lib/commands/bff/delete.js +1 -1
  33. package/lib/commands/bff/detail.js +1 -1
  34. package/lib/commands/bff/index.js +1 -1
  35. package/lib/commands/bff/list.js +1 -1
  36. package/lib/commands/bff/pull.js +1 -1
  37. package/lib/commands/bff/push.js +1 -1
  38. package/lib/commands/bff/status.js +1 -1
  39. package/lib/commands/cli-skill/index.js +1 -1
  40. package/lib/commands/cli-update.js +1 -1
  41. package/lib/commands/codegen/index.js +1 -1
  42. package/lib/commands/codegen/sdk.js +1 -1
  43. package/lib/commands/codegen/sql.js +1 -1
  44. package/lib/commands/common/app-registry.js +1 -1
  45. package/lib/commands/common/app-selector.js +1 -1
  46. package/lib/commands/common/async-task.js +1 -1
  47. package/lib/commands/common/dry-run.js +1 -1
  48. package/lib/commands/common/flags.js +1 -1
  49. package/lib/commands/common/local-file.js +1 -1
  50. package/lib/commands/common/validate.js +1 -1
  51. package/lib/commands/config/get.js +1 -1
  52. package/lib/commands/config/index.js +1 -1
  53. package/lib/commands/config/list.js +1 -1
  54. package/lib/commands/config/set.js +1 -1
  55. package/lib/commands/config/shared.js +1 -1
  56. package/lib/commands/data/filter.js +1 -1
  57. package/lib/commands/data/getOne.js +1 -1
  58. package/lib/commands/data/index.js +1 -1
  59. package/lib/commands/data/shared.js +1 -1
  60. package/lib/commands/dataset/business-group-update.js +1 -1
  61. package/lib/commands/dataset/capability.js +1 -1
  62. package/lib/commands/dataset/delete.js +1 -1
  63. package/lib/commands/dataset/detail.js +1 -1
  64. package/lib/commands/dataset/extend-update.js +1 -1
  65. package/lib/commands/dataset/field-update.js +1 -1
  66. package/lib/commands/dataset/generate.js +1 -1
  67. package/lib/commands/dataset/index.js +1 -1
  68. package/lib/commands/dataset/list.js +1 -1
  69. package/lib/commands/dataset/operations.js +1 -1
  70. package/lib/commands/dataset/relation-audit.js +1 -1
  71. package/lib/commands/dataset/relation-create.js +1 -1
  72. package/lib/commands/dataset/relation-delete.js +1 -1
  73. package/lib/commands/dataset/relation-shared.js +1 -1
  74. package/lib/commands/dataset/relation-update.js +1 -1
  75. package/lib/commands/dataset/relations.js +1 -1
  76. package/lib/commands/dataset/rename.js +1 -1
  77. package/lib/commands/dataset/restore.js +1 -1
  78. package/lib/commands/db/analysis-batching.js +1 -1
  79. package/lib/commands/db/analyze-batch-plan.js +1 -1
  80. package/lib/commands/db/analyze-cancel.js +1 -1
  81. package/lib/commands/db/analyze-start.js +1 -1
  82. package/lib/commands/db/analyze-status.js +1 -1
  83. package/lib/commands/db/create.js +1 -1
  84. package/lib/commands/db/delete.js +1 -1
  85. package/lib/commands/db/detail.js +1 -1
  86. package/lib/commands/db/diff-refresh-start.d.ts +2 -0
  87. package/lib/commands/db/diff-refresh-start.js +1 -0
  88. package/lib/commands/db/diff-refresh-status.d.ts +2 -0
  89. package/lib/commands/db/diff-refresh-status.js +1 -0
  90. package/lib/commands/db/diff.js +1 -1
  91. package/lib/commands/db/index.js +1 -1
  92. package/lib/commands/db/list.js +1 -1
  93. package/lib/commands/db/shared.js +1 -1
  94. package/lib/commands/db/tables.js +1 -1
  95. package/lib/commands/db/test.js +1 -1
  96. package/lib/commands/db/update.js +1 -1
  97. package/lib/commands/doctor.js +1 -1
  98. package/lib/commands/file/index.js +1 -1
  99. package/lib/commands/init/index.js +1 -1
  100. package/lib/commands/issue/index.js +1 -1
  101. package/lib/commands/issue/nudge.js +1 -1
  102. package/lib/commands/issue/report.js +1 -1
  103. package/lib/commands/issue/shared.js +1 -1
  104. package/lib/commands/kb/create.js +1 -1
  105. package/lib/commands/kb/delete.js +1 -1
  106. package/lib/commands/kb/detail.js +1 -1
  107. package/lib/commands/kb/index.js +1 -1
  108. package/lib/commands/kb/list.js +1 -1
  109. package/lib/commands/kb/shared.js +1 -1
  110. package/lib/commands/kb/update.js +1 -1
  111. package/lib/commands/logs/index.js +1 -1
  112. package/lib/commands/menu/asset-update.js +1 -1
  113. package/lib/commands/menu/delete.js +1 -1
  114. package/lib/commands/menu/external-link-create.js +1 -1
  115. package/lib/commands/menu/external-link-update.js +1 -1
  116. package/lib/commands/menu/group-create.js +1 -1
  117. package/lib/commands/menu/group-update.js +1 -1
  118. package/lib/commands/menu/index.js +1 -1
  119. package/lib/commands/menu/list.js +1 -1
  120. package/lib/commands/menu/move.js +1 -1
  121. package/lib/commands/menu/regroup-start.js +1 -1
  122. package/lib/commands/menu/rename.js +1 -1
  123. package/lib/commands/menu/shared/compare-table.js +1 -1
  124. package/lib/commands/menu/shared/delete-plan.js +1 -1
  125. package/lib/commands/menu/shared/facts.js +1 -1
  126. package/lib/commands/menu/shared/index.js +1 -1
  127. package/lib/commands/menu/shared/inquirer.js +1 -1
  128. package/lib/commands/menu/shared/local-pages.js +1 -1
  129. package/lib/commands/menu/shared/logic.js +1 -1
  130. package/lib/commands/menu/shared/mutations.js +1 -1
  131. package/lib/commands/menu/shared/service.js +1 -1
  132. package/lib/commands/menu/shared/sync-core.js +1 -1
  133. package/lib/commands/menu/shared/update-core.js +1 -1
  134. package/lib/commands/menu/shared/valid-url.js +1 -1
  135. package/lib/commands/menu/sync.js +1 -1
  136. package/lib/commands/notification/config-create.d.ts +2 -0
  137. package/lib/commands/notification/config-create.js +1 -0
  138. package/lib/commands/notification/config-delete.d.ts +2 -0
  139. package/lib/commands/notification/config-delete.js +1 -0
  140. package/lib/commands/notification/config-list.js +1 -1
  141. package/lib/commands/notification/config-update.d.ts +2 -0
  142. package/lib/commands/notification/config-update.js +1 -0
  143. package/lib/commands/notification/index.js +1 -1
  144. package/lib/commands/notification/shared.d.ts +97 -0
  145. package/lib/commands/notification/shared.js +1 -0
  146. package/lib/commands/ocr/index.js +1 -1
  147. package/lib/commands/page/generate-start.js +1 -1
  148. package/lib/commands/page/generate-status.js +1 -1
  149. package/lib/commands/page/index.js +1 -1
  150. package/lib/commands/page/pull.js +1 -1
  151. package/lib/commands/page/push.js +1 -1
  152. package/lib/commands/page/react/create.js +1 -1
  153. package/lib/commands/page/react/detail.js +1 -1
  154. package/lib/commands/page/react/list.js +1 -1
  155. package/lib/commands/page/react/publish.js +1 -1
  156. package/lib/commands/page/react/shared.js +1 -1
  157. package/lib/commands/page/react/syntax.js +1 -1
  158. package/lib/commands/page/react/template.js +1 -1
  159. package/lib/commands/page/react/update.js +1 -1
  160. package/lib/commands/page/relation-audit.js +1 -1
  161. package/lib/commands/page/restore.js +1 -1
  162. package/lib/commands/page/shared.js +1 -1
  163. package/lib/commands/page/standard-page-status.js +1 -1
  164. package/lib/commands/page/sync.js +1 -1
  165. package/lib/commands/permit/index.js +1 -1
  166. package/lib/commands/permit/page-get.js +1 -1
  167. package/lib/commands/permit/page-set.js +1 -1
  168. package/lib/commands/permit/role-apis-set.js +1 -1
  169. package/lib/commands/permit/role-menus-set.js +1 -1
  170. package/lib/commands/permit/role-menus.js +1 -1
  171. package/lib/commands/permit/shared.js +1 -1
  172. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  173. package/lib/commands/project/create/format-elapsed.js +1 -1
  174. package/lib/commands/project/create/main.d.ts +1 -0
  175. package/lib/commands/project/create/main.js +1 -1
  176. package/lib/commands/project/create/materialize-project-template.d.ts +11 -0
  177. package/lib/commands/project/create/materialize-project-template.js +1 -0
  178. package/lib/commands/project/create/project-name.d.ts +2 -0
  179. package/lib/commands/project/create/project-name.js +1 -0
  180. package/lib/commands/project/create/project-template-archive.d.ts +6 -0
  181. package/lib/commands/project/create/project-template-archive.js +1 -0
  182. package/lib/commands/project/create/project-template-path.d.ts +1 -3
  183. package/lib/commands/project/create/project-template-path.js +1 -1
  184. package/lib/commands/project/create/use-copy-project-template.d.ts +2 -1
  185. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  186. package/lib/commands/project/create/use-format-code.js +1 -1
  187. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  188. package/lib/commands/project/index.js +1 -1
  189. package/lib/commands/project/upgrade.js +1 -1
  190. package/lib/commands/registry.js +1 -1
  191. package/lib/commands/role/create.js +1 -1
  192. package/lib/commands/role/delete.js +1 -1
  193. package/lib/commands/role/detail.js +1 -1
  194. package/lib/commands/role/index.js +1 -1
  195. package/lib/commands/role/list.js +1 -1
  196. package/lib/commands/role/shared.js +1 -1
  197. package/lib/commands/role/update.js +1 -1
  198. package/lib/commands/role/user-add.js +1 -1
  199. package/lib/commands/role/user-remove.js +1 -1
  200. package/lib/commands/role/user-resolve.js +1 -1
  201. package/lib/commands/run/index.js +1 -1
  202. package/lib/commands/schema.js +1 -1
  203. package/lib/commands/sql/create.js +1 -1
  204. package/lib/commands/sql/delete.js +1 -1
  205. package/lib/commands/sql/detail.js +1 -1
  206. package/lib/commands/sql/exec.js +1 -1
  207. package/lib/commands/sql/index.js +1 -1
  208. package/lib/commands/sql/list.js +1 -1
  209. package/lib/commands/sql/pull.js +1 -1
  210. package/lib/commands/sql/push.js +1 -1
  211. package/lib/commands/sql/shared.js +1 -1
  212. package/lib/commands/sql/status.js +1 -1
  213. package/lib/commands/sql/validate.js +1 -1
  214. package/lib/commands/task/index.js +1 -1
  215. package/lib/commands/task/status.js +1 -1
  216. package/lib/commands/tenant/index.js +1 -1
  217. package/lib/commands/tenant/members-list.js +1 -1
  218. package/lib/commands/tenant/shared.js +1 -1
  219. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  220. package/lib/commands/user-account/index.js +1 -1
  221. package/lib/commands/workspace/add.js +1 -1
  222. package/lib/commands/workspace/index.js +1 -1
  223. package/lib/commands/workspace/remove.js +1 -1
  224. package/lib/config/schema.js +1 -1
  225. package/lib/constant/cdn.d.ts +2 -0
  226. package/lib/constant/cdn.js +1 -1
  227. package/lib/constant/cli.js +1 -1
  228. package/lib/constant/defaults.js +1 -1
  229. package/lib/constant/domain.js +1 -1
  230. package/lib/constant/env.js +1 -1
  231. package/lib/constant/output.js +1 -1
  232. package/lib/constant/paths.js +1 -1
  233. package/lib/constant/risk.js +1 -1
  234. package/lib/context/app-resolver.js +1 -1
  235. package/lib/context/auth-resolver.js +1 -1
  236. package/lib/context/config-loader.js +1 -1
  237. package/lib/context.d.ts +1 -1
  238. package/lib/context.js +1 -1
  239. package/lib/core/alias-resolver.js +1 -1
  240. package/lib/core/api-client.d.ts +29 -2
  241. package/lib/core/api-client.js +1 -1
  242. package/lib/core/bff/config.js +1 -1
  243. package/lib/core/bff/file-system.js +1 -1
  244. package/lib/core/bff/hash.js +1 -1
  245. package/lib/core/bff/lock.js +1 -1
  246. package/lib/core/bff/utils.js +1 -1
  247. package/lib/core/db-resolver.js +1 -1
  248. package/lib/core/page/file-system.js +1 -1
  249. package/lib/core/page/hash.js +1 -1
  250. package/lib/core/page/lock.js +1 -1
  251. package/lib/core/sql-index-auditor.js +1 -1
  252. package/lib/core/sql-sync/config.js +1 -1
  253. package/lib/core/sql-sync/file-system.js +1 -1
  254. package/lib/core/sql-sync/hash.js +1 -1
  255. package/lib/core/sql-sync/lock.js +1 -1
  256. package/lib/core/sql-sync/utils.js +1 -1
  257. package/lib/core/sql-validator.js +1 -1
  258. package/lib/errors.js +1 -1
  259. package/lib/framework/build-all-flags.js +1 -1
  260. package/lib/framework/error-output.js +1 -1
  261. package/lib/framework/explicit-yes.js +1 -1
  262. package/lib/framework/flags.js +1 -1
  263. package/lib/framework/help.js +1 -1
  264. package/lib/framework/index.js +1 -1
  265. package/lib/framework/output.js +1 -1
  266. package/lib/framework/response.js +1 -1
  267. package/lib/framework/runner-alias.js +1 -1
  268. package/lib/framework/runner.js +1 -1
  269. package/lib/framework/schema-export.js +1 -1
  270. package/lib/framework/types.js +1 -1
  271. package/lib/generated/build-info.d.ts +4 -4
  272. package/lib/generated/build-info.js +1 -1
  273. package/lib/help.js +1 -1
  274. package/lib/postinstall.js +1 -1
  275. package/lib/runtime/confirmation.js +1 -1
  276. package/lib/runtime/event.js +1 -1
  277. package/lib/runtime/index.js +1 -1
  278. package/lib/runtime/queue.js +1 -1
  279. package/lib/runtime/resolve.js +1 -1
  280. package/lib/skills/builtin-skill.js +1 -1
  281. package/lib/skills/main.js +1 -1
  282. package/lib/skills/npx-skills-add.js +1 -1
  283. package/lib/skills/skill-presence.js +1 -1
  284. package/lib/telemetry/cli-command-trace.js +1 -1
  285. package/lib/telemetry/cli-help-trace.js +1 -1
  286. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  287. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  288. package/lib/telemetry/send-cli-trace-log.js +1 -1
  289. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  290. package/lib/utils/ai_config.js +1 -1
  291. package/lib/utils/apply-jq-filter.js +1 -1
  292. package/lib/utils/cdn-config.js +1 -1
  293. package/lib/utils/check-sdk-version.js +1 -1
  294. package/lib/utils/cli-version-check.js +1 -1
  295. package/lib/utils/cli-version-policy.d.ts +13 -0
  296. package/lib/utils/cli-version-policy.js +1 -1
  297. package/lib/utils/config.js +1 -1
  298. package/lib/utils/entity-with-id.js +1 -1
  299. package/lib/utils/file-utils.js +1 -1
  300. package/lib/utils/guides-cdn.js +1 -1
  301. package/lib/utils/http-client.js +1 -1
  302. package/lib/utils/is-non-interactive.js +1 -1
  303. package/lib/utils/logger.js +1 -1
  304. package/lib/utils/params.js +1 -1
  305. package/lib/utils/platform.js +1 -1
  306. package/lib/utils/rules-cdn.js +1 -1
  307. package/lib/utils/sleep.js +1 -1
  308. package/lib/utils/template-replacer.js +1 -1
  309. package/lib/utils/update-notice.js +1 -1
  310. package/lib/utils/version.js +1 -1
  311. package/lib/utils/with-active-cookie.js +1 -1
  312. package/lib/utils/write-cli-side-channel.js +1 -1
  313. package/package.json +9 -4
  314. package/skills/rabetbase/SKILL.md +33 -22
  315. package/skills/rabetbase/guides/backend-function.md +5 -3
  316. package/skills/rabetbase/guides/bff-creation-workflow.md +2 -2
  317. package/skills/rabetbase/guides/conflict-detection.md +2 -2
  318. package/skills/rabetbase/guides/database-connection-workflow.md +39 -5
  319. package/skills/rabetbase/guides/react-custom-page-workflow.md +16 -4
  320. package/skills/rabetbase/guides/sql-creation-workflow.md +4 -2
  321. package/skills/rabetbase/guides/sql-mybatis.md +2 -2
  322. package/skills/rabetbase/knowledge/page-schema/YtPage.md +3 -37
  323. package/skills/rabetbase/knowledge/react-page/generation-standards.md +14 -3
  324. package/skills/rabetbase/references/rabetbase-app-config.md +2 -2
  325. package/skills/rabetbase/references/rabetbase-bff-push.md +4 -5
  326. package/skills/rabetbase/references/rabetbase-bff-save.md +3 -3
  327. package/skills/rabetbase/references/rabetbase-config.md +2 -2
  328. package/skills/rabetbase/references/rabetbase-db-analyze.md +2 -2
  329. package/skills/rabetbase/references/rabetbase-db-detail.md +3 -0
  330. package/skills/rabetbase/references/rabetbase-db-diff-refresh.md +53 -0
  331. package/skills/rabetbase/references/rabetbase-db-diff.md +40 -21
  332. package/skills/rabetbase/references/rabetbase-db-list.md +1 -1
  333. package/skills/rabetbase/references/rabetbase-kb.md +5 -3
  334. package/skills/rabetbase/references/rabetbase-menu-asset-update.md +9 -10
  335. package/skills/rabetbase/references/rabetbase-menu-external-link-update.md +1 -3
  336. package/skills/rabetbase/references/rabetbase-menu-regroup-start.md +2 -3
  337. package/skills/rabetbase/references/rabetbase-notification-config-list.md +2 -2
  338. package/skills/rabetbase/references/rabetbase-notification-config-mutations.md +56 -0
  339. package/skills/rabetbase/references/rabetbase-page-react-detail.md +1 -1
  340. package/skills/rabetbase/references/rabetbase-page-react-list.md +1 -1
  341. package/skills/rabetbase/references/rabetbase-page-react-publish.md +2 -2
  342. package/skills/rabetbase/references/rabetbase-project-create.md +3 -0
  343. package/skills/rabetbase/references/rabetbase-run.md +1 -1
  344. package/skills/rabetbase/references/rabetbase-sql-create.md +1 -1
  345. package/skills/rabetbase/references/rabetbase-sql-push.md +3 -4
  346. package/skills/rabetbase/references/rabetbase-user-account.md +0 -1
  347. package/skills/rabetbase.manifest.json +5 -5
  348. package/templates/README.md +14 -2
  349. package/lib/commands/project/create/non-interactive.d.ts +0 -9
  350. package/lib/commands/project/create/non-interactive.js +0 -1
  351. package/lib/utils/copy-directory.d.ts +0 -1
  352. package/lib/utils/copy-directory.js +0 -1
  353. package/skills/rabetbase/knowledge/page-schema/LrSmartEcharts.md +0 -291
  354. package/skills/rabetbase/knowledge/page-schema/LrSmartStatistic.md +0 -223
  355. package/templates/projects/sub-app-react-demo/.prettierrc +0 -1
  356. package/templates/projects/sub-app-react-demo/CHANGELOG.md +0 -67
  357. package/templates/projects/sub-app-react-demo/README.md +0 -246
  358. package/templates/projects/sub-app-react-demo/docs/quick-start.md +0 -245
  359. package/templates/projects/sub-app-react-demo/index.html +0 -27
  360. package/templates/projects/sub-app-react-demo/package.json +0 -34
  361. package/templates/projects/sub-app-react-demo/public/logo.svg +0 -1
  362. package/templates/projects/sub-app-react-demo/public/vite.svg +0 -1
  363. package/templates/projects/sub-app-react-demo/src/api/api.ts +0 -26
  364. package/templates/projects/sub-app-react-demo/src/api/client.ts +0 -32
  365. package/templates/projects/sub-app-react-demo/src/components/demo-page-container/DemoPageContainer.module.css +0 -28
  366. package/templates/projects/sub-app-react-demo/src/components/demo-page-container/DemoPageContainer.tsx +0 -55
  367. package/templates/projects/sub-app-react-demo/src/layouts/MainLayout.tsx +0 -308
  368. package/templates/projects/sub-app-react-demo/src/main.tsx +0 -52
  369. package/templates/projects/sub-app-react-demo/src/pages/dashboard/index.tsx +0 -570
  370. package/templates/projects/sub-app-react-demo/src/pages/data-screen/index.tsx +0 -531
  371. package/templates/projects/sub-app-react-demo/src/pages/index.module.css +0 -500
  372. package/templates/projects/sub-app-react-demo/src/pages/index.tsx +0 -641
  373. package/templates/projects/sub-app-react-demo/src/pages/sdk-demo/index.tsx +0 -536
  374. package/templates/projects/sub-app-react-demo/src/pages/workbench/index.module.css +0 -295
  375. package/templates/projects/sub-app-react-demo/src/pages/workbench/index.tsx +0 -242
  376. package/templates/projects/sub-app-react-demo/src/router/index.tsx +0 -30
  377. package/templates/projects/sub-app-react-demo/src/style.css +0 -108
  378. package/templates/projects/sub-app-react-demo/src/utils/api.ts +0 -12
  379. package/templates/projects/sub-app-react-demo/src/vite-env.d.ts +0 -2
  380. package/templates/projects/sub-app-react-demo/tsconfig.json +0 -26
  381. package/templates/projects/sub-app-react-demo/vite.config.ts +0 -111
@@ -1 +1 @@
1
- (function(_0x36415b,_0x497e18){const _0x3589f9=a272_0x560d,_0x465d95=_0x36415b();while(!![]){try{const _0x51cf17=parseInt(_0x3589f9(0x158))/0x1*(parseInt(_0x3589f9(0x159))/0x2)+parseInt(_0x3589f9(0x157))/0x3+-parseInt(_0x3589f9(0x15b))/0x4*(-parseInt(_0x3589f9(0x155))/0x5)+parseInt(_0x3589f9(0x15a))/0x6*(-parseInt(_0x3589f9(0x153))/0x7)+parseInt(_0x3589f9(0x154))/0x8*(-parseInt(_0x3589f9(0x15d))/0x9)+parseInt(_0x3589f9(0x15c))/0xa+-parseInt(_0x3589f9(0x156))/0xb;if(_0x51cf17===_0x497e18)break;else _0x465d95['push'](_0x465d95['shift']());}catch(_0x211756){_0x465d95['push'](_0x465d95['shift']());}}}(a272_0x48d6,0x41bd9));import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});function a272_0x560d(_0x5edbce,_0x523e86){_0x5edbce=_0x5edbce-0x153;const _0x48d696=a272_0x48d6();let _0x560dee=_0x48d696[_0x5edbce];return _0x560dee;}function a272_0x48d6(){const _0x23f897=['5yCouvw','1824614KthZTM','632286YuVwHA','3865GDzLca','188qalUHB','569622fbpjBn','737996sdXrQX','1434370ZgnFax','9324pDsNtB','7yIkKqI','2872CGcCge'];a272_0x48d6=function(){return _0x23f897;};return a272_0x48d6();}
1
+ (function(_0xda6e47,_0x3ed7d9){const _0x13bb13=a280_0x3da2,_0x431684=_0xda6e47();while(!![]){try{const _0x1800f5=-parseInt(_0x13bb13(0x1d7))/0x1+-parseInt(_0x13bb13(0x1d2))/0x2+parseInt(_0x13bb13(0x1d3))/0x3*(-parseInt(_0x13bb13(0x1d0))/0x4)+parseInt(_0x13bb13(0x1d1))/0x5+parseInt(_0x13bb13(0x1d6))/0x6*(parseInt(_0x13bb13(0x1d5))/0x7)+parseInt(_0x13bb13(0x1ce))/0x8+parseInt(_0x13bb13(0x1d4))/0x9*(parseInt(_0x13bb13(0x1cf))/0xa);if(_0x1800f5===_0x3ed7d9)break;else _0x431684['push'](_0x431684['shift']());}catch(_0x1d07aa){_0x431684['push'](_0x431684['shift']());}}}(a280_0x1973,0xb72fc));import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';function a280_0x3da2(_0x28bf53,_0x3d3530){_0x28bf53=_0x28bf53-0x1ce;const _0x1973d7=a280_0x1973();let _0x3da2ae=_0x1973d7[_0x28bf53];return _0x3da2ae;}function a280_0x1973(){const _0x1d6e17=['48rJbSFt','11843037sDwnte','6307NnCvty','1062atXZfW','1005013cuhKBD','10285216pXpQXi','10jHmruM','181128mdItPA','4787355LdUhGL','2477272LutJRx'];a280_0x1973=function(){return _0x1d6e17;};return a280_0x1973();}import{CliErrors}from'../errors.js';export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
@@ -1 +1 @@
1
- (function(_0x5da328,_0x51c17f){const _0x2b4da5=a273_0x5316,_0x25fb59=_0x5da328();while(!![]){try{const _0x4d57a=parseInt(_0x2b4da5(0x18f))/0x1+parseInt(_0x2b4da5(0x197))/0x2*(-parseInt(_0x2b4da5(0x199))/0x3)+-parseInt(_0x2b4da5(0x190))/0x4*(parseInt(_0x2b4da5(0x19c))/0x5)+parseInt(_0x2b4da5(0x18e))/0x6+parseInt(_0x2b4da5(0x193))/0x7+-parseInt(_0x2b4da5(0x19a))/0x8*(-parseInt(_0x2b4da5(0x19d))/0x9)+parseInt(_0x2b4da5(0x198))/0xa*(-parseInt(_0x2b4da5(0x191))/0xb);if(_0x4d57a===_0x51c17f)break;else _0x25fb59['push'](_0x25fb59['shift']());}catch(_0x320451){_0x25fb59['push'](_0x25fb59['shift']());}}}(a273_0x56d4,0xbaf96));import{getTemplateBaseUrl}from'../utils/config.js';export async function fetchCdnConfig(){const _0x2de58b=a273_0x5316,_0x30adef=getTemplateBaseUrl(),_0x26c9a9=[_0x30adef+_0x2de58b(0x19e),_0x30adef+_0x2de58b(0x194)];for(const _0x1e918a of _0x26c9a9){try{const _0x583021=await fetch(_0x1e918a,{'headers':{'Accept':_0x2de58b(0x19b)}});if(!_0x583021['ok'])continue;const _0x469ab9=await _0x583021[_0x2de58b(0x195)]();if(!_0x469ab9['cli']?.[_0x2de58b(0x196)]||!_0x469ab9['sdk']?.[_0x2de58b(0x192)]?.[_0x2de58b(0x196)])continue;return _0x469ab9;}catch{}}return null;}function a273_0x5316(_0x4f4b2d,_0x26504f){_0x4f4b2d=_0x4f4b2d-0x18e;const _0x56d471=a273_0x56d4();let _0x5316ac=_0x56d471[_0x4f4b2d];return _0x5316ac;}let cachedConfig=null,cacheTime=0x0;const CACHE_TTL=0x5*0x3c*0x3e8,FAILURE_CACHE_TTL=0x3c*0x3e8;let hasCachedConfig=![];export async function getCdnConfig(){const _0x1fc3c5=a273_0x5316,_0x37431d=Date[_0x1fc3c5(0x19f)]();if(hasCachedConfig){const _0x5a67f8=cachedConfig?CACHE_TTL:FAILURE_CACHE_TTL;if(_0x37431d-cacheTime<_0x5a67f8)return cachedConfig;}const _0x3fc720=await fetchCdnConfig();return cachedConfig=_0x3fc720,cacheTime=_0x37431d,hasCachedConfig=!![],_0x3fc720;}function a273_0x56d4(){const _0x15fa3c=['stableVersion','1302124mWiEnv','420LxsCBm','3iegxxo','20200KrwfFY','application/json','3937855TKNenl','4401sBvYAi','/config.json','now','6588138GHFkYh','496975RolHTh','4sGpYun','169169MtFbjl','node','144718dXWmty','/config/index.json','json'];a273_0x56d4=function(){return _0x15fa3c;};return a273_0x56d4();}export function clearCdnConfigCache(){cachedConfig=null,cacheTime=0x0,hasCachedConfig=![];}
1
+ (function(_0x1f504d,_0x95ec3d){const _0x35bf02=a281_0xdabe,_0x488d79=_0x1f504d();while(!![]){try{const _0x2bd676=parseInt(_0x35bf02(0x1b6))/0x1+parseInt(_0x35bf02(0x1a6))/0x2*(-parseInt(_0x35bf02(0x1ab))/0x3)+parseInt(_0x35bf02(0x1b7))/0x4+parseInt(_0x35bf02(0x1b2))/0x5*(parseInt(_0x35bf02(0x1ac))/0x6)+parseInt(_0x35bf02(0x1ad))/0x7*(parseInt(_0x35bf02(0x1b5))/0x8)+parseInt(_0x35bf02(0x1b3))/0x9+-parseInt(_0x35bf02(0x1b4))/0xa*(parseInt(_0x35bf02(0x1ae))/0xb);if(_0x2bd676===_0x95ec3d)break;else _0x488d79['push'](_0x488d79['shift']());}catch(_0x773c0e){_0x488d79['push'](_0x488d79['shift']());}}}(a281_0x523f,0x446f6));import{getTemplateBaseUrl}from'../utils/config.js';export async function fetchCdnConfig(){const _0x3012c0=a281_0xdabe,_0x1b2bd9=getTemplateBaseUrl(),_0x490dec=[_0x1b2bd9+'/config.json',_0x1b2bd9+_0x3012c0(0x1a7)];for(const _0x13aefe of _0x490dec){try{const _0x28aad5=await fetch(_0x13aefe,{'headers':{'Accept':_0x3012c0(0x1af)}});if(!_0x28aad5['ok'])continue;const _0x2ff5ed=await _0x28aad5['json']();if(!_0x2ff5ed[_0x3012c0(0x1b0)]?.[_0x3012c0(0x1aa)]||!_0x2ff5ed[_0x3012c0(0x1a8)]?.[_0x3012c0(0x1a9)]?.['stableVersion'])continue;return _0x2ff5ed;}catch{}}return null;}let cachedConfig=null,cacheTime=0x0;const CACHE_TTL=0x5*0x3c*0x3e8,FAILURE_CACHE_TTL=0x3c*0x3e8;let hasCachedConfig=![];export async function getCdnConfig(){const _0x38bb9d=a281_0xdabe,_0x25e378=Date[_0x38bb9d(0x1b1)]();if(hasCachedConfig){const _0x17b48a=cachedConfig?CACHE_TTL:FAILURE_CACHE_TTL;if(_0x25e378-cacheTime<_0x17b48a)return cachedConfig;}const _0x74f41c=await fetchCdnConfig();return cachedConfig=_0x74f41c,cacheTime=_0x25e378,hasCachedConfig=!![],_0x74f41c;}function a281_0xdabe(_0x1da287,_0x185bdd){_0x1da287=_0x1da287-0x1a6;const _0x523ff5=a281_0x523f();let _0xdabeda=_0x523ff5[_0x1da287];return _0xdabeda;}export function clearCdnConfigCache(){cachedConfig=null,cacheTime=0x0,hasCachedConfig=![];}function a281_0x523f(){const _0x44e977=['6eslGWO','7NcrvQh','188408MoHCai','application/json','cli','now','2125025vEcNHk','2552103YvoUcp','190MEmiRc','2857024yZgVsC','22872dxMYWW','87764kPeBab','336514okGmOP','/config/index.json','sdk','node','stableVersion','9NWXUcp'];a281_0x523f=function(){return _0x44e977;};return a281_0x523f();}
@@ -1 +1 @@
1
- const a274_0x54ac22=a274_0x40e5;(function(_0x494951,_0x3b6588){const _0x5c7e1d=a274_0x40e5,_0x25b07a=_0x494951();while(!![]){try{const _0x16d462=-parseInt(_0x5c7e1d(0xd5))/0x1+parseInt(_0x5c7e1d(0xb8))/0x2+parseInt(_0x5c7e1d(0xd4))/0x3*(-parseInt(_0x5c7e1d(0xb6))/0x4)+parseInt(_0x5c7e1d(0xba))/0x5*(parseInt(_0x5c7e1d(0xbd))/0x6)+parseInt(_0x5c7e1d(0xc2))/0x7+parseInt(_0x5c7e1d(0xc9))/0x8+-parseInt(_0x5c7e1d(0xca))/0x9;if(_0x16d462===_0x3b6588)break;else _0x25b07a['push'](_0x25b07a['shift']());}catch(_0x264302){_0x25b07a['push'](_0x25b07a['shift']());}}}(a274_0x31be,0x44684));import a274_0xfdf17b from'node:fs';function a274_0x40e5(_0x57551a,_0x1604fc){_0x57551a=_0x57551a-0xb5;const _0x31be42=a274_0x31be();let _0x40e5cf=_0x31be42[_0x57551a];return _0x40e5cf;}import a274_0x13bae3 from'node:path';import a274_0x191f01 from'semver';import{getCdnConfig}from'../utils/cdn-config.js';const FALLBACK_MIN_SDK_VERSION=a274_0x54ac22(0xc7);function a274_0x31be(){const _0x41f012=['1175NuYSXm','version','\x1b[33m','10314finALn','\x1b[0m','node_modules','minVersion','utf-8','650174ZaRTqk','all','parse','packageName','existsSync','1.2.0','devDependencies','252536LYlrgN','6124158aNDSdi','some','coerce','stableVersion','package.json','@lovrabet/sdk','join','dependencies','\x20\x20\x20Current\x20version:\x20','readFileSync','12927FVMTfQ','4473JdvHlb','sdk','\x20\x20\x20Upgrade\x20command:\x20','24WfIIVD','node','925142rrEwUa','log'];a274_0x31be=function(){return _0x41f012;};return a274_0x31be();}function isNonNumericVersion(_0x1b6c2d){const _0x11eba9=a274_0x54ac22,_0x5675be=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\*$/,/^x$/];return _0x5675be[_0x11eba9(0xcb)](_0x1a8555=>_0x1a8555['test'](_0x1b6c2d));}function getInstalledVersion(_0x211cc0,_0xf91ea5){const _0x56f5b4=a274_0x54ac22;try{const _0x5d84c8=a274_0x13bae3[_0x56f5b4(0xd0)](_0x211cc0,_0x56f5b4(0xbf),_0xf91ea5,_0x56f5b4(0xce));if(a274_0xfdf17b[_0x56f5b4(0xc6)](_0x5d84c8)){const _0x5a4ccd=JSON[_0x56f5b4(0xc4)](a274_0xfdf17b[_0x56f5b4(0xd3)](_0x5d84c8,_0x56f5b4(0xc1)));return _0x5a4ccd['version']||null;}}catch{}return null;}async function getSdkStableVersion(){const _0xf3fa09=a274_0x54ac22;try{const _0x4f73b6=await getCdnConfig();return _0x4f73b6?.[_0xf3fa09(0xd6)]?.['node']?.[_0xf3fa09(0xcd)]||null;}catch{return null;}}async function getSdkPackageName(){const _0x392cf0=a274_0x54ac22;try{const _0x2bc351=await getCdnConfig();return _0x2bc351?.[_0x392cf0(0xd6)]?.[_0x392cf0(0xb7)]?.['packageName']||_0x392cf0(0xcf);}catch{return _0x392cf0(0xcf);}}export async function checkSdkVersion(_0x51ac63){const _0x157e87=a274_0x54ac22,_0x5b9d59=a274_0x13bae3[_0x157e87(0xd0)](_0x51ac63,_0x157e87(0xce)),[_0xc874f0,_0x4c91da]=await Promise[_0x157e87(0xc3)]([getSdkStableVersion(),getSdkPackageName()]),_0x6efe5=_0xc874f0||FALLBACK_MIN_SDK_VERSION;if(!a274_0xfdf17b[_0x157e87(0xc6)](_0x5b9d59))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x6efe5,'packageName':_0x4c91da,'stableVersion':_0xc874f0};try{const _0x597fb7=JSON[_0x157e87(0xc4)](a274_0xfdf17b['readFileSync'](_0x5b9d59,'utf8')),_0x3010c6=_0x597fb7[_0x157e87(0xd1)]||{},_0x4265bd=_0x597fb7[_0x157e87(0xc8)]||{},_0x52d152=_0x3010c6[_0x4c91da]||_0x4265bd[_0x4c91da];if(!_0x52d152)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x6efe5,'packageName':_0x4c91da,'stableVersion':_0xc874f0};let _0x1fe04f=getInstalledVersion(_0x51ac63,_0x4c91da);!_0x1fe04f&&(_0x1fe04f=_0x52d152);if(isNonNumericVersion(_0x52d152))return{'installed':!![],'version':_0x1fe04f,'needsUpgrade':![],'minVersion':_0x6efe5,'packageName':_0x4c91da,'stableVersion':_0xc874f0};const _0x53e37c=a274_0x191f01[_0x157e87(0xcc)](_0x1fe04f),_0x318287=a274_0x191f01[_0x157e87(0xcc)](_0x6efe5),_0x497f62=_0x53e37c&&_0x318287?a274_0x191f01['lt'](_0x53e37c,_0x318287):![];return{'installed':!![],'version':_0x1fe04f,'needsUpgrade':_0x497f62,'minVersion':_0x6efe5,'packageName':_0x4c91da,'stableVersion':_0xc874f0};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x6efe5,'packageName':_0x4c91da,'stableVersion':_0xc874f0};}}export function checkSdkVersionSync(_0xc1ca0e){const _0x3f3c40=a274_0x54ac22,_0x45863f=a274_0x13bae3[_0x3f3c40(0xd0)](_0xc1ca0e,_0x3f3c40(0xce)),_0xbc9617=_0x3f3c40(0xcf);if(!a274_0xfdf17b[_0x3f3c40(0xc6)](_0x45863f))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0xbc9617,'stableVersion':null};try{const _0x54850d=JSON[_0x3f3c40(0xc4)](a274_0xfdf17b[_0x3f3c40(0xd3)](_0x45863f,'utf8')),_0x4771db=_0x54850d[_0x3f3c40(0xd1)]||{},_0x3450e7=_0x54850d[_0x3f3c40(0xc8)]||{},_0x588537=_0x4771db[_0xbc9617]||_0x3450e7[_0xbc9617];if(!_0x588537)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0xbc9617,'stableVersion':null};let _0x3ee5da=getInstalledVersion(_0xc1ca0e,_0xbc9617);!_0x3ee5da&&(_0x3ee5da=_0x588537);if(isNonNumericVersion(_0x588537))return{'installed':!![],'version':_0x3ee5da,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0xbc9617,'stableVersion':null};const _0x1902f3=a274_0x191f01[_0x3f3c40(0xcc)](_0x3ee5da),_0x17b646=_0x1902f3?a274_0x191f01['lt'](_0x1902f3,FALLBACK_MIN_SDK_VERSION):![];return{'installed':!![],'version':_0x3ee5da,'needsUpgrade':_0x17b646,'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0xbc9617,'stableVersion':null};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0xbc9617,'stableVersion':null};}}export function printSdkUpgradeWarning(_0x11261b){const _0x130f0b=a274_0x54ac22;if(!_0x11261b['needsUpgrade'])return;const _0x50239d=_0x130f0b(0xbc),_0x330e4f=_0x130f0b(0xbe),_0x3385d6='\x1b[1m',_0x5bdfe7=_0x11261b[_0x130f0b(0xc5)]||'@lovrabet/sdk',_0x4fbde1=_0x11261b['stableVersion']||_0x11261b[_0x130f0b(0xc0)],_0xb8204='npm\x20install\x20'+_0x5bdfe7+'@'+(_0x4fbde1||'latest');console[_0x130f0b(0xb9)](),console[_0x130f0b(0xb9)](''+_0x50239d+_0x3385d6+'↪\x20SDK\x20update\x20available'+_0x330e4f),console['log'](_0x50239d+_0x130f0b(0xd2)+_0x5bdfe7+'@'+_0x11261b[_0x130f0b(0xbb)]+_0x330e4f),console[_0x130f0b(0xb9)](_0x50239d+'\x20\x20\x20Stable\x20version:\x20'+_0x4fbde1+_0x330e4f),console['log'](_0x50239d+_0x130f0b(0xb5)+_0xb8204+_0x330e4f),console[_0x130f0b(0xb9)]();}
1
+ function a282_0x2111(_0x4a8505,_0x46c8e1){_0x4a8505=_0x4a8505-0x1cf;const _0x15c595=a282_0x15c5();let _0x2111af=_0x15c595[_0x4a8505];return _0x2111af;}const a282_0x39204b=a282_0x2111;(function(_0x46d3cf,_0x3cb901){const _0x47e14c=a282_0x2111,_0xa13bab=_0x46d3cf();while(!![]){try{const _0x4ac227=parseInt(_0x47e14c(0x1f2))/0x1*(-parseInt(_0x47e14c(0x1f5))/0x2)+-parseInt(_0x47e14c(0x1e1))/0x3*(-parseInt(_0x47e14c(0x1f1))/0x4)+-parseInt(_0x47e14c(0x1d1))/0x5*(parseInt(_0x47e14c(0x1e4))/0x6)+parseInt(_0x47e14c(0x1f3))/0x7*(-parseInt(_0x47e14c(0x1d3))/0x8)+-parseInt(_0x47e14c(0x1d0))/0x9+parseInt(_0x47e14c(0x1da))/0xa+parseInt(_0x47e14c(0x1d4))/0xb;if(_0x4ac227===_0x3cb901)break;else _0xa13bab['push'](_0xa13bab['shift']());}catch(_0x4aaba5){_0xa13bab['push'](_0xa13bab['shift']());}}}(a282_0x15c5,0xa4eb7));import a282_0x296fe4 from'node:fs';import a282_0x4d95d5 from'node:path';import a282_0x2b933f from'semver';import{getCdnConfig}from'../utils/cdn-config.js';const FALLBACK_MIN_SDK_VERSION=a282_0x39204b(0x1de);function isNonNumericVersion(_0x161ccb){const _0x12abb0=a282_0x39204b,_0x2141ac=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\*$/,/^x$/];return _0x2141ac['some'](_0x12a5a9=>_0x12a5a9[_0x12abb0(0x1e0)](_0x161ccb));}function getInstalledVersion(_0x4c25ce,_0x5ddf09){const _0x4beb15=a282_0x39204b;try{const _0x3ef191=a282_0x4d95d5[_0x4beb15(0x1eb)](_0x4c25ce,_0x4beb15(0x1dd),_0x5ddf09,_0x4beb15(0x1d5));if(a282_0x296fe4[_0x4beb15(0x1f4)](_0x3ef191)){const _0x243c80=JSON[_0x4beb15(0x1e7)](a282_0x296fe4[_0x4beb15(0x1d6)](_0x3ef191,_0x4beb15(0x1d9)));return _0x243c80[_0x4beb15(0x1ec)]||null;}}catch{}return null;}async function getSdkStableVersion(){const _0x322850=a282_0x39204b;try{const _0x4abd8a=await getCdnConfig();return _0x4abd8a?.['sdk']?.[_0x322850(0x1e6)]?.[_0x322850(0x1f0)]||null;}catch{return null;}}async function getSdkPackageName(){const _0x2c92a0=a282_0x39204b;try{const _0x468bc3=await getCdnConfig();return _0x468bc3?.[_0x2c92a0(0x1cf)]?.['node']?.[_0x2c92a0(0x1db)]||_0x2c92a0(0x1ef);}catch{return'@lovrabet/sdk';}}export async function checkSdkVersion(_0x39b38f){const _0x3da39f=a282_0x39204b,_0x2f1b75=a282_0x4d95d5[_0x3da39f(0x1eb)](_0x39b38f,_0x3da39f(0x1d5)),[_0x105615,_0x41457c]=await Promise[_0x3da39f(0x1e3)]([getSdkStableVersion(),getSdkPackageName()]),_0xecabce=_0x105615||FALLBACK_MIN_SDK_VERSION;if(!a282_0x296fe4['existsSync'](_0x2f1b75))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0xecabce,'packageName':_0x41457c,'stableVersion':_0x105615};try{const _0x1975e4=JSON[_0x3da39f(0x1e7)](a282_0x296fe4[_0x3da39f(0x1d6)](_0x2f1b75,'utf8')),_0x29ef5f=_0x1975e4[_0x3da39f(0x1d7)]||{},_0xbfa022=_0x1975e4[_0x3da39f(0x1ed)]||{},_0x3b2250=_0x29ef5f[_0x41457c]||_0xbfa022[_0x41457c];if(!_0x3b2250)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0xecabce,'packageName':_0x41457c,'stableVersion':_0x105615};let _0x5ec632=getInstalledVersion(_0x39b38f,_0x41457c);!_0x5ec632&&(_0x5ec632=_0x3b2250);if(isNonNumericVersion(_0x3b2250))return{'installed':!![],'version':_0x5ec632,'needsUpgrade':![],'minVersion':_0xecabce,'packageName':_0x41457c,'stableVersion':_0x105615};const _0x54611b=a282_0x2b933f[_0x3da39f(0x1df)](_0x5ec632),_0x47f85d=a282_0x2b933f['coerce'](_0xecabce),_0x530a01=_0x54611b&&_0x47f85d?a282_0x2b933f['lt'](_0x54611b,_0x47f85d):![];return{'installed':!![],'version':_0x5ec632,'needsUpgrade':_0x530a01,'minVersion':_0xecabce,'packageName':_0x41457c,'stableVersion':_0x105615};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0xecabce,'packageName':_0x41457c,'stableVersion':_0x105615};}}export function checkSdkVersionSync(_0x206329){const _0x585926=a282_0x39204b,_0x2b33cf=a282_0x4d95d5[_0x585926(0x1eb)](_0x206329,_0x585926(0x1d5)),_0x1006ad=_0x585926(0x1ef);if(!a282_0x296fe4['existsSync'](_0x2b33cf))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x1006ad,'stableVersion':null};try{const _0x159465=JSON['parse'](a282_0x296fe4[_0x585926(0x1d6)](_0x2b33cf,'utf8')),_0x3f93a4=_0x159465['dependencies']||{},_0x2105fb=_0x159465['devDependencies']||{},_0x6240bb=_0x3f93a4[_0x1006ad]||_0x2105fb[_0x1006ad];if(!_0x6240bb)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x1006ad,'stableVersion':null};let _0x3906a4=getInstalledVersion(_0x206329,_0x1006ad);!_0x3906a4&&(_0x3906a4=_0x6240bb);if(isNonNumericVersion(_0x6240bb))return{'installed':!![],'version':_0x3906a4,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x1006ad,'stableVersion':null};const _0x115a3a=a282_0x2b933f[_0x585926(0x1df)](_0x3906a4),_0x250e7a=_0x115a3a?a282_0x2b933f['lt'](_0x115a3a,FALLBACK_MIN_SDK_VERSION):![];return{'installed':!![],'version':_0x3906a4,'needsUpgrade':_0x250e7a,'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x1006ad,'stableVersion':null};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x1006ad,'stableVersion':null};}}function a282_0x15c5(){const _0x38b81b=['\x1b[0m','all','1893252qdkqVn','npm\x20install\x20','node','parse','\x20\x20\x20Upgrade\x20command:\x20','log','\x20\x20\x20Stable\x20version:\x20','join','version','devDependencies','↪\x20SDK\x20update\x20available','@lovrabet/sdk','stableVersion','1163044fIwMZd','55837ttvexe','684523gGXrld','existsSync','26csaPei','sdk','12102111dWxsMY','5XKfzRN','\x20\x20\x20Current\x20version:\x20','32TiBwKh','25337202gNUrnh','package.json','readFileSync','dependencies','latest','utf-8','8586260KRaDHm','packageName','\x1b[1m','node_modules','1.2.0','coerce','test','3KxXGnC'];a282_0x15c5=function(){return _0x38b81b;};return a282_0x15c5();}export function printSdkUpgradeWarning(_0x1512bc){const _0x272929=a282_0x39204b;if(!_0x1512bc['needsUpgrade'])return;const _0x508750='\x1b[33m',_0x5c5cf1=_0x272929(0x1e2),_0x4b011b=_0x272929(0x1dc),_0x21ec1c=_0x1512bc['packageName']||_0x272929(0x1ef),_0x154f14=_0x1512bc[_0x272929(0x1f0)]||_0x1512bc['minVersion'],_0x3daaf7=_0x272929(0x1e5)+_0x21ec1c+'@'+(_0x154f14||_0x272929(0x1d8));console[_0x272929(0x1e9)](),console[_0x272929(0x1e9)](''+_0x508750+_0x4b011b+_0x272929(0x1ee)+_0x5c5cf1),console[_0x272929(0x1e9)](_0x508750+_0x272929(0x1d2)+_0x21ec1c+'@'+_0x1512bc[_0x272929(0x1ec)]+_0x5c5cf1),console[_0x272929(0x1e9)](_0x508750+_0x272929(0x1ea)+_0x154f14+_0x5c5cf1),console['log'](_0x508750+_0x272929(0x1e8)+_0x3daaf7+_0x5c5cf1),console[_0x272929(0x1e9)]();}
@@ -1 +1 @@
1
- (function(_0xdf6844,_0x4af361){const _0x5b9b85=a275_0x3230,_0x45c944=_0xdf6844();while(!![]){try{const _0x299a6b=-parseInt(_0x5b9b85(0x1f1))/0x1*(-parseInt(_0x5b9b85(0x1d3))/0x2)+parseInt(_0x5b9b85(0x1f5))/0x3+parseInt(_0x5b9b85(0x1f6))/0x4+-parseInt(_0x5b9b85(0x1ee))/0x5*(-parseInt(_0x5b9b85(0x1e0))/0x6)+-parseInt(_0x5b9b85(0x1e4))/0x7+parseInt(_0x5b9b85(0x1db))/0x8*(-parseInt(_0x5b9b85(0x1de))/0x9)+-parseInt(_0x5b9b85(0x1d5))/0xa;if(_0x299a6b===_0x4af361)break;else _0x45c944['push'](_0x45c944['shift']());}catch(_0x29aa83){_0x45c944['push'](_0x45c944['shift']());}}}(a275_0x5af5,0xe53d6));import{readFileSync}from'node:fs';function a275_0x5af5(){const _0x30bdbd=['2310296uxQoJU','package.json','↪\x20New\x20version\x20available','Current\x20version:\x20','coerce','minimumVersion','10TCteEt','validation','1872440SwVikJ','belowMinimum','1.0.0','\x1b[31m','Current\x20CLI\x20version\x20is\x20below\x20the\x20service\x20compatibility\x20support\x20line.','filter','568MdsmQq','stableVersion','parse','28071zbYoNN','\x1b[1m','6mrADag','currentVersion','\x20\x20\x20Current\x20CLI\x20version:\x20','utf-8','12860918ZfkpSB','latest','\x20\x20\x20','↪\x20Critical\x20CLI\x20upgrade\x20required','../..','version','\x20\x20\x20Minimum\x20supported:\x20','upgradeMessage','minimumVersionMessage','Upgrade\x20command:\x20','2797160gQaPgd','log','\x20\x20\x20Recommended\x20stable:\x20','153789YgWUqp','\x20\x20\x20Upgrade\x20command:\x20','\x1b[33m','join','3836946GyasDS'];a275_0x5af5=function(){return _0x30bdbd;};return a275_0x5af5();}import{resolve,dirname}from'node:path';import{fileURLToPath}from'node:url';import a275_0xfbb169 from'semver';import{getCliVersionPolicy}from'../utils/cli-version-policy.js';import{NPM_PACKAGE_NAME}from'../constant/cli.js';import{CliErrors}from'../errors.js';export function getCliUpgradeCommand(_0x512ce2){const _0x10b100=a275_0x3230,_0xba10a=_0x512ce2[_0x10b100(0x1dc)]||_0x10b100(0x1e5);return'npm\x20install\x20-g\x20'+NPM_PACKAGE_NAME+'@'+_0xba10a;}function a275_0x3230(_0x1b27bd,_0x5e6b94){_0x1b27bd=_0x1b27bd-0x1d1;const _0x5af5c6=a275_0x5af5();let _0x323057=_0x5af5c6[_0x1b27bd];return _0x323057;}function getCurrentCliVersion(){const _0x214e4a=a275_0x3230;try{const _0x3e9975=fileURLToPath(import.meta.url),_0x9b2be6=resolve(dirname(_0x3e9975),_0x214e4a(0x1e8)),_0x5c23c2=resolve(_0x9b2be6,_0x214e4a(0x1f7)),_0x5e4750=JSON[_0x214e4a(0x1dd)](readFileSync(_0x5c23c2,_0x214e4a(0x1e3)));return _0x5e4750[_0x214e4a(0x1e9)]||_0x214e4a(0x1d7);}catch{return _0x214e4a(0x1d7);}}export async function checkCliVersion(){const _0x1a7c9b=a275_0x3230,_0x4dd358=getCurrentCliVersion(),_0x9d5399=await getCliVersionPolicy(),_0x3f4cfb=_0x9d5399?.[_0x1a7c9b(0x1dc)]||null,_0x54a560=_0x9d5399?.[_0x1a7c9b(0x1d2)]||null;let _0x24b764=![],_0x7ffb23=![];const _0x3d58dd=a275_0xfbb169['coerce'](_0x4dd358);if(_0x3d58dd&&_0x3f4cfb)try{const _0x3752c3=a275_0xfbb169[_0x1a7c9b(0x1d1)](_0x3f4cfb);if(_0x3752c3)_0x24b764=a275_0xfbb169['lt'](_0x3d58dd,_0x3752c3);}catch{}if(_0x3d58dd&&_0x54a560)try{const _0x161309=a275_0xfbb169[_0x1a7c9b(0x1d1)](_0x54a560);if(_0x161309)_0x7ffb23=a275_0xfbb169['lt'](_0x3d58dd,_0x161309);}catch{}return _0x7ffb23&&(_0x24b764=!![]),{'currentVersion':_0x4dd358,'stableVersion':_0x3f4cfb,'minimumVersion':_0x54a560,'needsUpgrade':_0x24b764,'belowMinimum':_0x7ffb23,'isPreRelease':![],'upgradeMessage':_0x9d5399?.[_0x1a7c9b(0x1eb)],'minimumVersionMessage':_0x9d5399?.[_0x1a7c9b(0x1ec)]};}export function printCliUpgradeWarning(_0x2a899e){const _0xbac462=a275_0x3230;if(!_0x2a899e['needsUpgrade']&&!_0x2a899e['belowMinimum'])return;const _0x323e36=_0xbac462(0x1d8),_0x169bb3=_0xbac462(0x1f3),_0x4e9a83='\x1b[0m',_0x662a97=_0xbac462(0x1df),_0x5bb83f=getCliUpgradeCommand(_0x2a899e);console[_0xbac462(0x1ef)](),_0x2a899e['belowMinimum']?(console[_0xbac462(0x1ef)](''+_0x323e36+_0x662a97+_0xbac462(0x1e7)+_0x4e9a83),console['log'](_0x323e36+_0xbac462(0x1e2)+_0x2a899e[_0xbac462(0x1e1)]+_0x4e9a83),_0x2a899e['minimumVersion']&&console[_0xbac462(0x1ef)](_0x323e36+_0xbac462(0x1ea)+_0x2a899e[_0xbac462(0x1d2)]+_0x4e9a83),_0x2a899e['stableVersion']&&_0x2a899e[_0xbac462(0x1dc)]!==_0x2a899e[_0xbac462(0x1d2)]&&console[_0xbac462(0x1ef)](_0x323e36+_0xbac462(0x1f0)+_0x2a899e[_0xbac462(0x1dc)]+_0x4e9a83),_0x2a899e[_0xbac462(0x1ec)]&&console[_0xbac462(0x1ef)](_0x323e36+_0xbac462(0x1e6)+_0x2a899e['minimumVersionMessage']+_0x4e9a83),console[_0xbac462(0x1ef)](_0x323e36+'\x20\x20\x20Upgrade\x20command:\x20'+_0x5bb83f+_0x4e9a83)):(console['log'](''+_0x169bb3+_0x662a97+_0xbac462(0x1f8)+_0x4e9a83),console[_0xbac462(0x1ef)](_0x169bb3+'\x20\x20\x20Current\x20CLI\x20version:\x20'+_0x2a899e['currentVersion']+_0x4e9a83),console[_0xbac462(0x1ef)](_0x169bb3+'\x20\x20\x20Stable\x20version:\x20'+_0x2a899e[_0xbac462(0x1dc)]+_0x4e9a83),_0x2a899e[_0xbac462(0x1eb)]&&console['log'](_0x169bb3+'\x20\x20\x20'+_0x2a899e[_0xbac462(0x1eb)]+_0x4e9a83),console['log'](_0x169bb3+_0xbac462(0x1f2)+_0x5bb83f+_0x4e9a83)),console[_0xbac462(0x1ef)]();}export function assertCliVersionSupported(_0x3e6104){const _0x41eab5=a275_0x3230;if(!_0x3e6104[_0x41eab5(0x1d6)])return;const _0x2b871e=[_0x3e6104[_0x41eab5(0x1ec)],_0x41eab5(0x1f9)+_0x3e6104[_0x41eab5(0x1e1)],_0x3e6104[_0x41eab5(0x1d2)]?'Minimum\x20supported:\x20'+_0x3e6104[_0x41eab5(0x1d2)]:null,_0x41eab5(0x1ed)+getCliUpgradeCommand(_0x3e6104)][_0x41eab5(0x1da)](Boolean)[_0x41eab5(0x1f4)]('\x0a');throw CliErrors[_0x41eab5(0x1d4)](_0x41eab5(0x1d9),_0x2b871e);}
1
+ (function(_0x581257,_0x3b4aae){const _0x5d1063=a283_0x131b,_0x3cfbd9=_0x581257();while(!![]){try{const _0x2fd4cd=parseInt(_0x5d1063(0x1b3))/0x1*(-parseInt(_0x5d1063(0x1c8))/0x2)+parseInt(_0x5d1063(0x1c5))/0x3+parseInt(_0x5d1063(0x1ba))/0x4+-parseInt(_0x5d1063(0x1b7))/0x5*(parseInt(_0x5d1063(0x1a4))/0x6)+parseInt(_0x5d1063(0x1c1))/0x7*(-parseInt(_0x5d1063(0x1b2))/0x8)+-parseInt(_0x5d1063(0x1b1))/0x9+-parseInt(_0x5d1063(0x1b6))/0xa*(-parseInt(_0x5d1063(0x1af))/0xb);if(_0x2fd4cd===_0x3b4aae)break;else _0x3cfbd9['push'](_0x3cfbd9['shift']());}catch(_0x12a86d){_0x3cfbd9['push'](_0x3cfbd9['shift']());}}}(a283_0x2c3d,0xeb273));import{readFileSync}from'node:fs';function a283_0x131b(_0x166bc0,_0x4dbb81){_0x166bc0=_0x166bc0-0x1a4;const _0x2c3ddf=a283_0x2c3d();let _0x131be8=_0x2c3ddf[_0x166bc0];return _0x131be8;}import{resolve,dirname}from'node:path';import{fileURLToPath}from'node:url';import a283_0x35cb22 from'semver';import{getCliVersionPolicy}from'../utils/cli-version-policy.js';import{NPM_PACKAGE_NAME}from'../constant/cli.js';import{CliErrors}from'../errors.js';export function getCliUpgradeCommand(_0xb00207){const _0x453825=a283_0x131b,_0x321309=_0xb00207[_0x453825(0x1b9)]||_0x453825(0x1c9);return'npm\x20install\x20-g\x20'+NPM_PACKAGE_NAME+'@'+_0x321309;}function getCurrentCliVersion(){const _0x912f89=a283_0x131b;try{const _0x5d0c8d=fileURLToPath(import.meta.url),_0x3f228b=resolve(dirname(_0x5d0c8d),_0x912f89(0x1b8)),_0xa43860=resolve(_0x3f228b,'package.json'),_0x507cbc=JSON[_0x912f89(0x1c4)](readFileSync(_0xa43860,_0x912f89(0x1c3)));return _0x507cbc['version']||_0x912f89(0x1a8);}catch{return _0x912f89(0x1a8);}}export async function checkCliVersion(){const _0x1a7c0a=a283_0x131b,_0x28d327=getCurrentCliVersion(),_0x522b7e=await getCliVersionPolicy(),_0x2bf61f=_0x522b7e?.['stableVersion']||null,_0x1aa872=_0x522b7e?.[_0x1a7c0a(0x1bc)]||null;let _0x466172=![],_0x29cc8b=![];const _0x743cd4=a283_0x35cb22['coerce'](_0x28d327);if(_0x743cd4&&_0x2bf61f)try{const _0x80d641=a283_0x35cb22[_0x1a7c0a(0x1ac)](_0x2bf61f);if(_0x80d641)_0x466172=a283_0x35cb22['lt'](_0x743cd4,_0x80d641);}catch{}if(_0x743cd4&&_0x1aa872)try{const _0x4f3e0a=a283_0x35cb22[_0x1a7c0a(0x1ac)](_0x1aa872);if(_0x4f3e0a)_0x29cc8b=a283_0x35cb22['lt'](_0x743cd4,_0x4f3e0a);}catch{}return _0x29cc8b&&(_0x466172=!![]),{'currentVersion':_0x28d327,'stableVersion':_0x2bf61f,'minimumVersion':_0x1aa872,'needsUpgrade':_0x466172,'belowMinimum':_0x29cc8b,'isPreRelease':![],'upgradeMessage':_0x522b7e?.[_0x1a7c0a(0x1c6)],'minimumVersionMessage':_0x522b7e?.[_0x1a7c0a(0x1bb)]};}export function printCliUpgradeWarning(_0x4226dc){const _0xa9d265=a283_0x131b;if(!_0x4226dc[_0xa9d265(0x1be)]&&!_0x4226dc[_0xa9d265(0x1aa)])return;const _0x5b2992=_0xa9d265(0x1a5),_0x1b02af=_0xa9d265(0x1a6),_0x3a4e12=_0xa9d265(0x1ad),_0x4db837='\x1b[1m',_0x309033=getCliUpgradeCommand(_0x4226dc);console[_0xa9d265(0x1cc)](),_0x4226dc[_0xa9d265(0x1aa)]?(console[_0xa9d265(0x1cc)](''+_0x5b2992+_0x4db837+_0xa9d265(0x1bf)+_0x3a4e12),console['log'](_0x5b2992+'\x20\x20\x20Current\x20CLI\x20version:\x20'+_0x4226dc[_0xa9d265(0x1cb)]+_0x3a4e12),_0x4226dc[_0xa9d265(0x1bc)]&&console[_0xa9d265(0x1cc)](_0x5b2992+_0xa9d265(0x1a7)+_0x4226dc['minimumVersion']+_0x3a4e12),_0x4226dc[_0xa9d265(0x1b9)]&&_0x4226dc['stableVersion']!==_0x4226dc[_0xa9d265(0x1bc)]&&console['log'](_0x5b2992+_0xa9d265(0x1b0)+_0x4226dc[_0xa9d265(0x1b9)]+_0x3a4e12),_0x4226dc['minimumVersionMessage']&&console['log'](_0x5b2992+_0xa9d265(0x1c7)+_0x4226dc['minimumVersionMessage']+_0x3a4e12),console[_0xa9d265(0x1cc)](_0x5b2992+'\x20\x20\x20Upgrade\x20command:\x20'+_0x309033+_0x3a4e12)):(console['log'](''+_0x1b02af+_0x4db837+_0xa9d265(0x1ae)+_0x3a4e12),console[_0xa9d265(0x1cc)](_0x1b02af+_0xa9d265(0x1ca)+_0x4226dc[_0xa9d265(0x1cb)]+_0x3a4e12),console[_0xa9d265(0x1cc)](_0x1b02af+_0xa9d265(0x1a9)+_0x4226dc[_0xa9d265(0x1b9)]+_0x3a4e12),_0x4226dc['upgradeMessage']&&console['log'](_0x1b02af+'\x20\x20\x20'+_0x4226dc[_0xa9d265(0x1c6)]+_0x3a4e12),console[_0xa9d265(0x1cc)](_0x1b02af+_0xa9d265(0x1c2)+_0x309033+_0x3a4e12)),console[_0xa9d265(0x1cc)]();}export function assertCliVersionSupported(_0xb36328){const _0x17a283=a283_0x131b;if(!_0xb36328[_0x17a283(0x1aa)])return;const _0x445546=[_0xb36328['minimumVersionMessage'],_0x17a283(0x1ab)+_0xb36328['currentVersion'],_0xb36328['minimumVersion']?'Minimum\x20supported:\x20'+_0xb36328[_0x17a283(0x1bc)]:null,_0x17a283(0x1b5)+getCliUpgradeCommand(_0xb36328)][_0x17a283(0x1c0)](Boolean)[_0x17a283(0x1b4)]('\x0a');throw CliErrors['validation'](_0x17a283(0x1bd),_0x445546);}function a283_0x2c3d(){const _0x29290d=['log','6ohQCbG','\x1b[31m','\x1b[33m','\x20\x20\x20Minimum\x20supported:\x20','1.0.0','\x20\x20\x20Stable\x20version:\x20','belowMinimum','Current\x20version:\x20','coerce','\x1b[0m','↪\x20New\x20version\x20available','55990561JWSgMQ','\x20\x20\x20Recommended\x20stable:\x20','13897413wkCgAE','193448OKxKTy','3gpLKJd','join','Upgrade\x20command:\x20','10oSOwcY','1769060LQgvpA','../..','stableVersion','240256boaVyo','minimumVersionMessage','minimumVersion','Current\x20CLI\x20version\x20is\x20below\x20the\x20service\x20compatibility\x20support\x20line.','needsUpgrade','↪\x20Critical\x20CLI\x20upgrade\x20required','filter','427UjxAoi','\x20\x20\x20Upgrade\x20command:\x20','utf-8','parse','103320hQZedy','upgradeMessage','\x20\x20\x20','565572zcPbPl','latest','\x20\x20\x20Current\x20CLI\x20version:\x20','currentVersion'];a283_0x2c3d=function(){return _0x29290d;};return a283_0x2c3d();}
@@ -4,6 +4,19 @@ export interface CliVersionPolicy {
4
4
  upgradeMessage?: string;
5
5
  minimumVersionMessage?: string;
6
6
  }
7
+ export interface ProjectTemplateCdnDescriptor {
8
+ version: string;
9
+ name: string;
10
+ sha256: string;
11
+ size: number;
12
+ }
13
+ export interface RabetbaseCdnConfig {
14
+ cli?: Record<string, unknown>;
15
+ projectTemplate?: ProjectTemplateCdnDescriptor;
16
+ [key: string]: unknown;
17
+ }
18
+ export declare function fetchRabetbaseCdnConfig(): Promise<RabetbaseCdnConfig | null>;
7
19
  export declare function fetchCliVersionPolicy(): Promise<CliVersionPolicy | null>;
20
+ export declare function getRabetbaseCdnConfig(): Promise<RabetbaseCdnConfig | null>;
8
21
  export declare function getCliVersionPolicy(): Promise<CliVersionPolicy | null>;
9
22
  export declare function clearCliVersionPolicyCache(): void;
@@ -1 +1 @@
1
- (function(_0x34205a,_0x3f771c){const _0x5e3424=a276_0x2ced,_0x2e50bb=_0x34205a();while(!![]){try{const _0x1e481e=parseInt(_0x5e3424(0x192))/0x1*(-parseInt(_0x5e3424(0x184))/0x2)+-parseInt(_0x5e3424(0x18d))/0x3*(parseInt(_0x5e3424(0x181))/0x4)+-parseInt(_0x5e3424(0x18f))/0x5*(-parseInt(_0x5e3424(0x188))/0x6)+-parseInt(_0x5e3424(0x180))/0x7*(parseInt(_0x5e3424(0x18a))/0x8)+parseInt(_0x5e3424(0x187))/0x9*(parseInt(_0x5e3424(0x186))/0xa)+parseInt(_0x5e3424(0x18e))/0xb*(-parseInt(_0x5e3424(0x197))/0xc)+-parseInt(_0x5e3424(0x182))/0xd*(-parseInt(_0x5e3424(0x193))/0xe);if(_0x1e481e===_0x3f771c)break;else _0x2e50bb['push'](_0x2e50bb['shift']());}catch(_0x1538f1){_0x2e50bb['push'](_0x2e50bb['shift']());}}}(a276_0x8910,0x96131));function a276_0x2ced(_0x3f152d,_0x1a6e64){_0x3f152d=_0x3f152d-0x17d;const _0x8910b8=a276_0x8910();let _0x2cede7=_0x8910b8[_0x3f152d];return _0x2cede7;}import{CLI_VERSION_POLICY_URL}from'../constant/cdn.js';const CACHE_TTL=0x5*0x3c*0x3e8,FAILURE_CACHE_TTL=0x3c*0x3e8,FETCH_TIMEOUT_MS=0xbb8;function pickString(_0x307fdd){const _0x27d9ea=a276_0x2ced;return typeof _0x307fdd===_0x27d9ea(0x18b)&&_0x307fdd[_0x27d9ea(0x190)]()[_0x27d9ea(0x185)]>0x0?_0x307fdd['trim']():null;}function normalizeCliVersionPolicy(_0x517281){const _0x21ae4a=a276_0x2ced;if(!_0x517281||typeof _0x517281!==_0x21ae4a(0x198))return null;const _0x5eb19b=_0x517281,_0x4a93ba=_0x5eb19b[_0x21ae4a(0x183)]&&typeof _0x5eb19b[_0x21ae4a(0x183)]===_0x21ae4a(0x198)?_0x5eb19b[_0x21ae4a(0x183)]:_0x5eb19b,_0xc4dd2e=pickString(_0x4a93ba[_0x21ae4a(0x194)])||pickString(_0x4a93ba[_0x21ae4a(0x17e)])||pickString(_0x4a93ba[_0x21ae4a(0x195)]),_0x334dea=pickString(_0x4a93ba['minimumVersion'])||pickString(_0x4a93ba[_0x21ae4a(0x17d)]);if(!_0xc4dd2e&&!_0x334dea)return null;return{'stableVersion':_0xc4dd2e,'minimumVersion':_0x334dea,'upgradeMessage':pickString(_0x4a93ba['upgradeMessage'])||undefined,'minimumVersionMessage':pickString(_0x4a93ba[_0x21ae4a(0x189)])||undefined};}export async function fetchCliVersionPolicy(){const _0x3d64d3=a276_0x2ced,_0x924e14=new AbortController(),_0x6fe7e5=setTimeout(()=>_0x924e14[_0x3d64d3(0x17f)](),FETCH_TIMEOUT_MS);try{const _0x519e7e=await fetch(CLI_VERSION_POLICY_URL,{'headers':{'Accept':_0x3d64d3(0x199)},'signal':_0x924e14[_0x3d64d3(0x191)]});if(!_0x519e7e['ok'])return null;const _0x26e221=await _0x519e7e[_0x3d64d3(0x18c)]();return normalizeCliVersionPolicy(_0x26e221);}catch{return null;}finally{clearTimeout(_0x6fe7e5);}}function a276_0x8910(){const _0x1894a7=['2174116vcJmWO','2782286rfysOA','cli','164AkTsMl','length','10IfcMLV','7549641cjerSY','42lZGpZL','minimumVersionMessage','80QLONCE','string','json','3LEjcCc','1881517HJkiqc','868535oMZPjq','trim','signal','5074KoZTpe','14IXmWwr','stableVersion','recommendedVersion','now','48jVKcqH','object','application/json','minVersion','latestVersion','abort','7231jeQpWe'];a276_0x8910=function(){return _0x1894a7;};return a276_0x8910();}let cachedPolicy=null,cacheTime=0x0,hasCachedPolicy=![];export async function getCliVersionPolicy(){const _0x211dbb=a276_0x2ced,_0x27e582=Date[_0x211dbb(0x196)]();if(hasCachedPolicy){const _0xa963b2=cachedPolicy?CACHE_TTL:FAILURE_CACHE_TTL;if(_0x27e582-cacheTime<_0xa963b2)return cachedPolicy;}const _0x41bf36=await fetchCliVersionPolicy();return cachedPolicy=_0x41bf36,cacheTime=_0x27e582,hasCachedPolicy=!![],_0x41bf36;}export function clearCliVersionPolicyCache(){cachedPolicy=null,cacheTime=0x0,hasCachedPolicy=![];}
1
+ (function(_0x464c82,_0x3e3416){const _0x5b4665=a284_0x5e8e,_0x3e61c5=_0x464c82();while(!![]){try{const _0x4fe56b=parseInt(_0x5b4665(0x176))/0x1+-parseInt(_0x5b4665(0x175))/0x2+parseInt(_0x5b4665(0x177))/0x3+-parseInt(_0x5b4665(0x17b))/0x4+-parseInt(_0x5b4665(0x172))/0x5+parseInt(_0x5b4665(0x17f))/0x6+-parseInt(_0x5b4665(0x17d))/0x7*(parseInt(_0x5b4665(0x178))/0x8);if(_0x4fe56b===_0x3e3416)break;else _0x3e61c5['push'](_0x3e61c5['shift']());}catch(_0x3d6d62){_0x3e61c5['push'](_0x3e61c5['shift']());}}}(a284_0x4499,0xbf973));function a284_0x5e8e(_0x53d94d,_0x34bdd7){_0x53d94d=_0x53d94d-0x16e;const _0x4499c8=a284_0x4499();let _0x5e8ec4=_0x4499c8[_0x53d94d];return _0x5e8ec4;}import{CLI_VERSION_POLICY_URL}from'../constant/cdn.js';const CACHE_TTL=0x5*0x3c*0x3e8,FAILURE_CACHE_TTL=0x3c*0x3e8,FETCH_TIMEOUT_MS=0xbb8;function pickString(_0x4ec2f5){const _0x57079b=a284_0x5e8e;return typeof _0x4ec2f5===_0x57079b(0x181)&&_0x4ec2f5[_0x57079b(0x184)]()['length']>0x0?_0x4ec2f5[_0x57079b(0x184)]():null;}function normalizeCliVersionPolicy(_0x1498d3){const _0xbc400f=a284_0x5e8e;if(!_0x1498d3||typeof _0x1498d3!==_0xbc400f(0x174))return null;const _0x5dfd95=_0x1498d3,_0x26189d=_0x5dfd95[_0xbc400f(0x16e)]&&typeof _0x5dfd95[_0xbc400f(0x16e)]===_0xbc400f(0x174)?_0x5dfd95[_0xbc400f(0x16e)]:_0x5dfd95,_0x457615=pickString(_0x26189d[_0xbc400f(0x173)])||pickString(_0x26189d[_0xbc400f(0x17c)])||pickString(_0x26189d[_0xbc400f(0x171)]),_0x43e1b7=pickString(_0x26189d[_0xbc400f(0x17e)])||pickString(_0x26189d[_0xbc400f(0x17a)]);if(!_0x457615&&!_0x43e1b7)return null;return{'stableVersion':_0x457615,'minimumVersion':_0x43e1b7,'upgradeMessage':pickString(_0x26189d[_0xbc400f(0x180)])||undefined,'minimumVersionMessage':pickString(_0x26189d['minimumVersionMessage'])||undefined};}export async function fetchRabetbaseCdnConfig(){const _0x32a6e3=a284_0x5e8e,_0x549da8=new AbortController(),_0x18507a=setTimeout(()=>_0x549da8[_0x32a6e3(0x179)](),FETCH_TIMEOUT_MS);try{const _0x400b91=await fetch(CLI_VERSION_POLICY_URL,{'headers':{'Accept':_0x32a6e3(0x16f)},'signal':_0x549da8[_0x32a6e3(0x182)]});if(!_0x400b91['ok'])return null;const _0x3c9d8e=await _0x400b91[_0x32a6e3(0x183)]();return _0x3c9d8e&&typeof _0x3c9d8e==='object'?_0x3c9d8e:null;}catch{return null;}finally{clearTimeout(_0x18507a);}}export async function fetchCliVersionPolicy(){return normalizeCliVersionPolicy(await fetchRabetbaseCdnConfig());}let cachedConfig=null,cacheTime=0x0,hasCachedConfig=![];function a284_0x4499(){const _0x42824b=['trim','cli','application/json','now','recommendedVersion','2094630zagdBM','stableVersion','object','267538fKaZBn','1561981eEoyAa','2423814vTNRno','16tNaUAU','abort','minVersion','2366992QOiVxJ','latestVersion','5118064fLzRhL','minimumVersion','6129498RUsVSO','upgradeMessage','string','signal','json'];a284_0x4499=function(){return _0x42824b;};return a284_0x4499();}export async function getRabetbaseCdnConfig(){const _0x36030a=a284_0x5e8e,_0xf62544=Date[_0x36030a(0x170)]();if(hasCachedConfig){const _0x1e8c32=cachedConfig?CACHE_TTL:FAILURE_CACHE_TTL;if(_0xf62544-cacheTime<_0x1e8c32)return cachedConfig;}return cachedConfig=await fetchRabetbaseCdnConfig(),cacheTime=_0xf62544,hasCachedConfig=!![],cachedConfig;}export async function getCliVersionPolicy(){return normalizeCliVersionPolicy(await getRabetbaseCdnConfig());}export function clearCliVersionPolicyCache(){cachedConfig=null,cacheTime=0x0,hasCachedConfig=![];}
@@ -1 +1 @@
1
- const a277_0x87e8a4=a277_0x3c1b;function a277_0x2618(){const _0x129fcc=['35AiPPLi','303526ptGtFb','24153AheBOj','project','string','196yiSENC','968NCMncd','356802FXPsHw','96039DzHKFL','147004tOabjg','env','17380259wahbDX','2YvCGFN','1470835gwkpbl','12jKUIbt','860gSevCU'];a277_0x2618=function(){return _0x129fcc;};return a277_0x2618();}(function(_0x1c080e,_0x4191ad){const _0x463dfd=a277_0x3c1b,_0x4696e3=_0x1c080e();while(!![]){try{const _0x1d5be8=parseInt(_0x463dfd(0xd5))/0x1*(parseInt(_0x463dfd(0xda))/0x2)+-parseInt(_0x463dfd(0xdb))/0x3*(parseInt(_0x463dfd(0xde))/0x4)+-parseInt(_0x463dfd(0xd6))/0x5+parseInt(_0x463dfd(0xe0))/0x6*(-parseInt(_0x463dfd(0xd9))/0x7)+-parseInt(_0x463dfd(0xdf))/0x8*(-parseInt(_0x463dfd(0xe1))/0x9)+parseInt(_0x463dfd(0xd8))/0xa*(-parseInt(_0x463dfd(0xe2))/0xb)+-parseInt(_0x463dfd(0xd7))/0xc*(-parseInt(_0x463dfd(0xe4))/0xd);if(_0x1d5be8===_0x4191ad)break;else _0x4696e3['push'](_0x4696e3['shift']());}catch(_0x3a0886){_0x4696e3['push'](_0x4696e3['shift']());}}}(a277_0x2618,0xc26c3));import{initEnv}from'../constant/env.js';import{readRawConfig,getConfigAppCode as a277_0x1e66ae,getMultiAppConfigs as a277_0x300d7f,getTemplateBaseUrl as a277_0x21a86f}from'../context.js';export{getProjectConfigPath,getGlobalConfigPath}from'../context.js';export{isInProject}from'../context.js';export function readConfig(_0x363bb3){const _0xf3a8e7=a277_0x3c1b,_0x4ff502=readRawConfig(_0x363bb3);return _0x4ff502[_0xf3a8e7(0xe3)]&&typeof _0x4ff502[_0xf3a8e7(0xe3)]===_0xf3a8e7(0xdd)&&initEnv(_0x4ff502[_0xf3a8e7(0xe3)]),_0x4ff502;}export function getConfigAppCode(){return a277_0x1e66ae();}export function getMultiAppConfigs(_0xdd9469=a277_0x87e8a4(0xdc)){return a277_0x300d7f(_0xdd9469);}function a277_0x3c1b(_0x431f90,_0x36ab5c){_0x431f90=_0x431f90-0xd5;const _0x2618ea=a277_0x2618();let _0x3c1b90=_0x2618ea[_0x431f90];return _0x3c1b90;}export function getTemplateBaseUrl(){return a277_0x21a86f();}
1
+ const a285_0x3fb209=a285_0x3fd5;(function(_0x34f4d4,_0x209e89){const _0x763da=a285_0x3fd5,_0x9361f3=_0x34f4d4();while(!![]){try{const _0x99d07b=parseInt(_0x763da(0x82))/0x1*(-parseInt(_0x763da(0x87))/0x2)+parseInt(_0x763da(0x89))/0x3*(-parseInt(_0x763da(0x83))/0x4)+parseInt(_0x763da(0x8a))/0x5+-parseInt(_0x763da(0x8b))/0x6+parseInt(_0x763da(0x85))/0x7+parseInt(_0x763da(0x88))/0x8+parseInt(_0x763da(0x86))/0x9;if(_0x99d07b===_0x209e89)break;else _0x9361f3['push'](_0x9361f3['shift']());}catch(_0x37957e){_0x9361f3['push'](_0x9361f3['shift']());}}}(a285_0x5330,0x74291));function a285_0x3fd5(_0x449202,_0x20573a){_0x449202=_0x449202-0x82;const _0x533054=a285_0x5330();let _0x3fd523=_0x533054[_0x449202];return _0x3fd523;}import{initEnv}from'../constant/env.js';import{readRawConfig,getConfigAppCode as a285_0x550511,getMultiAppConfigs as a285_0x26b382,getTemplateBaseUrl as a285_0x1ea3b7}from'../context.js';export{getProjectConfigPath,getGlobalConfigPath}from'../context.js';export{isInProject}from'../context.js';function a285_0x5330(){const _0x32556f=['1891869hufUSO','2745099JPkPNw','204398qdCeyk','632440TIdTQn','26184xXpeKk','1354890RZZCmR','198666zhMFKd','project','env','1lRfYgd','144KyuiHq','string'];a285_0x5330=function(){return _0x32556f;};return a285_0x5330();}export function readConfig(_0x3307b7){const _0x12ea75=a285_0x3fd5,_0x4a384e=readRawConfig(_0x3307b7);return _0x4a384e[_0x12ea75(0x8d)]&&typeof _0x4a384e[_0x12ea75(0x8d)]===_0x12ea75(0x84)&&initEnv(_0x4a384e[_0x12ea75(0x8d)]),_0x4a384e;}export function getConfigAppCode(){return a285_0x550511();}export function getMultiAppConfigs(_0x482fe4=a285_0x3fb209(0x8c)){return a285_0x26b382(_0x482fe4);}export function getTemplateBaseUrl(){return a285_0x1ea3b7();}
@@ -1 +1 @@
1
- (function(_0x47bc2e,_0x4c4ea0){const _0x3736a7=a279_0x3dbc,_0x1bfd0e=_0x47bc2e();while(!![]){try{const _0x190327=-parseInt(_0x3736a7(0x1a3))/0x1*(-parseInt(_0x3736a7(0x1ac))/0x2)+parseInt(_0x3736a7(0x1ae))/0x3*(parseInt(_0x3736a7(0x1af))/0x4)+parseInt(_0x3736a7(0x1a8))/0x5*(-parseInt(_0x3736a7(0x1a0))/0x6)+-parseInt(_0x3736a7(0x1a4))/0x7*(-parseInt(_0x3736a7(0x1a6))/0x8)+-parseInt(_0x3736a7(0x1ad))/0x9*(-parseInt(_0x3736a7(0x1a2))/0xa)+-parseInt(_0x3736a7(0x1a1))/0xb*(parseInt(_0x3736a7(0x1ab))/0xc)+-parseInt(_0x3736a7(0x1a7))/0xd;if(_0x190327===_0x4c4ea0)break;else _0x1bfd0e['push'](_0x1bfd0e['shift']());}catch(_0x9dd7e9){_0x1bfd0e['push'](_0x1bfd0e['shift']());}}}(a279_0x596e,0xcfc27));function a279_0x3dbc(_0x5ebf2b,_0x57f40a){_0x5ebf2b=_0x5ebf2b-0x1a0;const _0x596e8c=a279_0x596e();let _0x3dbc88=_0x596e8c[_0x5ebf2b];return _0x3dbc88;}function toFiniteNumber(_0x37289d){const _0x5d5da6=a279_0x3dbc;if(typeof _0x37289d==='number'&&Number[_0x5d5da6(0x1a9)](_0x37289d))return _0x37289d;if(typeof _0x37289d==='string'){const _0x40612f=_0x37289d[_0x5d5da6(0x1aa)]();if(!_0x40612f)return undefined;const _0x7c26da=Number(_0x40612f);if(Number[_0x5d5da6(0x1a9)](_0x7c26da))return _0x7c26da;}return undefined;}function a279_0x596e(){const _0x419236=['416493EKprAE','3095046cIYuXq','4LjdLoA','1194wJssZA','143VvavfY','40bNVtrP','714872nrLTju','427GLTfBG','object','142024txkeVG','23810761htjXUW','530bZkWPt','isFinite','trim','287004futvtD','2jIVOTQ'];a279_0x596e=function(){return _0x419236;};return a279_0x596e();}export function normalizeEntityWithIdResponse(_0x45fe9d){const _0x3d0026=a279_0x3dbc,_0xc845d2=toFiniteNumber(_0x45fe9d);if(_0xc845d2!==undefined)return{'id':_0xc845d2,'entity':{'id':_0xc845d2}};if(!_0x45fe9d||typeof _0x45fe9d!==_0x3d0026(0x1a5))return{'id':undefined,'entity':{}};const _0x3b6581={..._0x45fe9d},_0x1efb8e=toFiniteNumber(_0x3b6581['id']);return _0x1efb8e!==undefined&&(_0x3b6581['id']=_0x1efb8e),{'id':_0x1efb8e,'entity':_0x3b6581};}
1
+ function a286_0x2a1d(_0x56b4df,_0x3cf072){_0x56b4df=_0x56b4df-0x6e;const _0x14eb2e=a286_0x14eb();let _0x2a1d92=_0x14eb2e[_0x56b4df];return _0x2a1d92;}(function(_0x3f802f,_0x98b4a4){const _0x2c9cd0=a286_0x2a1d,_0x2d3a2c=_0x3f802f();while(!![]){try{const _0x5a3614=parseInt(_0x2c9cd0(0x70))/0x1+-parseInt(_0x2c9cd0(0x74))/0x2*(-parseInt(_0x2c9cd0(0x6e))/0x3)+parseInt(_0x2c9cd0(0x7b))/0x4*(parseInt(_0x2c9cd0(0x77))/0x5)+-parseInt(_0x2c9cd0(0x7c))/0x6+-parseInt(_0x2c9cd0(0x73))/0x7+-parseInt(_0x2c9cd0(0x78))/0x8+-parseInt(_0x2c9cd0(0x79))/0x9*(-parseInt(_0x2c9cd0(0x72))/0xa);if(_0x5a3614===_0x98b4a4)break;else _0x2d3a2c['push'](_0x2d3a2c['shift']());}catch(_0xb3208c){_0x2d3a2c['push'](_0x2d3a2c['shift']());}}}(a286_0x14eb,0x75450));function toFiniteNumber(_0x2be73a){const _0x3d1b1f=a286_0x2a1d;if(typeof _0x2be73a===_0x3d1b1f(0x71)&&Number['isFinite'](_0x2be73a))return _0x2be73a;if(typeof _0x2be73a===_0x3d1b1f(0x76)){const _0x3e143b=_0x2be73a[_0x3d1b1f(0x7a)]();if(!_0x3e143b)return undefined;const _0x59c79e=Number(_0x3e143b);if(Number[_0x3d1b1f(0x75)](_0x59c79e))return _0x59c79e;}return undefined;}export function normalizeEntityWithIdResponse(_0x9021b4){const _0x5b2ff6=a286_0x2a1d,_0x4f3cff=toFiniteNumber(_0x9021b4);if(_0x4f3cff!==undefined)return{'id':_0x4f3cff,'entity':{'id':_0x4f3cff}};if(!_0x9021b4||typeof _0x9021b4!==_0x5b2ff6(0x6f))return{'id':undefined,'entity':{}};const _0x323625={..._0x9021b4},_0x22a981=toFiniteNumber(_0x323625['id']);return _0x22a981!==undefined&&(_0x323625['id']=_0x22a981),{'id':_0x22a981,'entity':_0x323625};}function a286_0x14eb(){const _0x21e26b=['9225LwOpfA','4782600MfKDws','9APKYFC','trim','524hybWjW','5308140HAzYdh','159xuDook','object','399934SBEETz','number','17706070CEcqzC','5994233hFIkzP','15356UeAfHB','isFinite','string'];a286_0x14eb=function(){return _0x21e26b;};return a286_0x14eb();}
@@ -1 +1 @@
1
- (function(_0x1a277a,_0x504cc4){const _0x140e80=a280_0x3515,_0x7abef7=_0x1a277a();while(!![]){try{const _0xe088ad=parseInt(_0x140e80(0xa6))/0x1*(parseInt(_0x140e80(0xa9))/0x2)+parseInt(_0x140e80(0xa1))/0x3*(-parseInt(_0x140e80(0xa2))/0x4)+parseInt(_0x140e80(0xa7))/0x5*(parseInt(_0x140e80(0xa5))/0x6)+parseInt(_0x140e80(0x9f))/0x7*(-parseInt(_0x140e80(0x9e))/0x8)+-parseInt(_0x140e80(0xa3))/0x9*(-parseInt(_0x140e80(0xa8))/0xa)+-parseInt(_0x140e80(0xa0))/0xb+parseInt(_0x140e80(0xa4))/0xc;if(_0xe088ad===_0x504cc4)break;else _0x7abef7['push'](_0x7abef7['shift']());}catch(_0x3a0512){_0x7abef7['push'](_0x7abef7['shift']());}}}(a280_0x23e8,0x83897));import{existsSync,mkdirSync,copyFileSync,readdirSync,statSync}from'node:fs';function a280_0x3515(_0x3cb70e,_0x3fd959){_0x3cb70e=_0x3cb70e-0x9e;const _0x23e800=a280_0x23e8();let _0x35158e=_0x23e800[_0x3cb70e];return _0x35158e;}function a280_0x23e8(){const _0x18e005=['319983Srfcad','8EaIGma','3015oxojyf','9525504zbZsuX','2946IfbZoz','4045AGyLzu','8105SQLhQw','30othYwD','436ATIFPP','isDirectory','596584qUkLhI','91xxYXcV','8260692XCuUGi'];a280_0x23e8=function(){return _0x18e005;};return a280_0x23e8();}import{join}from'node:path';export async function copyDir(_0x14c52f,_0x1d48ff){const _0x55d350=a280_0x3515,_0x3ee7bc=statSync(_0x14c52f);if(_0x3ee7bc[_0x55d350(0xaa)]()){!existsSync(_0x1d48ff)&&mkdirSync(_0x1d48ff,{'recursive':!![]});const _0xfcda44=readdirSync(_0x14c52f);for(const _0x148a95 of _0xfcda44){await copyDir(join(_0x14c52f,_0x148a95),join(_0x1d48ff,_0x148a95));}}else copyFileSync(_0x14c52f,_0x1d48ff);}export function ensureDir(_0x38a9a4){!existsSync(_0x38a9a4)&&mkdirSync(_0x38a9a4,{'recursive':!![]});}export function pathExists(_0x153317){return existsSync(_0x153317);}
1
+ (function(_0x4b2c6f,_0x81fa42){const _0xc3592d=a287_0x401c,_0x1730d9=_0x4b2c6f();while(!![]){try{const _0x5a24b8=-parseInt(_0xc3592d(0x17b))/0x1*(parseInt(_0xc3592d(0x173))/0x2)+-parseInt(_0xc3592d(0x16f))/0x3*(-parseInt(_0xc3592d(0x179))/0x4)+-parseInt(_0xc3592d(0x176))/0x5*(-parseInt(_0xc3592d(0x170))/0x6)+parseInt(_0xc3592d(0x171))/0x7*(-parseInt(_0xc3592d(0x17a))/0x8)+parseInt(_0xc3592d(0x177))/0x9*(-parseInt(_0xc3592d(0x174))/0xa)+-parseInt(_0xc3592d(0x172))/0xb+parseInt(_0xc3592d(0x175))/0xc;if(_0x5a24b8===_0x81fa42)break;else _0x1730d9['push'](_0x1730d9['shift']());}catch(_0x5746f3){_0x1730d9['push'](_0x1730d9['shift']());}}}(a287_0x4a6d,0xc46e3));function a287_0x401c(_0x20d601,_0x2df3a6){_0x20d601=_0x20d601-0x16f;const _0x4a6d5c=a287_0x4a6d();let _0x401ca9=_0x4a6d5c[_0x20d601];return _0x401ca9;}import{existsSync,mkdirSync,copyFileSync,readdirSync,statSync}from'node:fs';import{join}from'node:path';export async function copyDir(_0x596741,_0x3e928d){const _0x2ae65f=a287_0x401c,_0x42518e=statSync(_0x596741);if(_0x42518e[_0x2ae65f(0x178)]()){!existsSync(_0x3e928d)&&mkdirSync(_0x3e928d,{'recursive':!![]});const _0x4cde69=readdirSync(_0x596741);for(const _0x2f6109 of _0x4cde69){await copyDir(join(_0x596741,_0x2f6109),join(_0x3e928d,_0x2f6109));}}else copyFileSync(_0x596741,_0x3e928d);}function a287_0x4a6d(){const _0x203356=['496276pNwkee','45DjQSVH','588LiKQMd','2093hcSMap','2667566VDspvY','2eKMWLz','5559730LyWqAI','16545960RlQTNi','43810euXPff','9NPBBwg','isDirectory','237676jjEgNZ','27544ELhucE'];a287_0x4a6d=function(){return _0x203356;};return a287_0x4a6d();}export function ensureDir(_0x3cc676){!existsSync(_0x3cc676)&&mkdirSync(_0x3cc676,{'recursive':!![]});}export function pathExists(_0x297b51){return existsSync(_0x297b51);}
@@ -1 +1 @@
1
- const a281_0x225db8=a281_0x120b;function a281_0x142c(){const _0x35ce90=['/skills/guides.json','join','8278458BWEuFX','.lovrabet/skill/guides','\x0a\x0a>更新时间:','4713742TWkENr','4873620eQOWkM','keys','9peCpbX','entries','content','36zLffvA','134120JNVGJT','394228lqvUyn','push','skillTemplate','34054tGsntW','9217995siReaG','.lovrabet','json','104cmfCpd','CDN\x20数据中缺少\x20skillTemplate','cache','.md','CDN\x20返回数据格式错误','replace','trimEnd','extendContent','1044QdPiGo','utf-8','7ynAmbz','lastUpdated','guides'];a281_0x142c=function(){return _0x35ce90;};return a281_0x142c();}(function(_0x531e83,_0x29af17){const _0x3bd766=a281_0x120b,_0x27a5af=_0x531e83();while(!![]){try{const _0x18af91=-parseInt(_0x3bd766(0x9a))/0x1*(-parseInt(_0x3bd766(0x96))/0x2)+-parseInt(_0x3bd766(0x8e))/0x3*(parseInt(_0x3bd766(0x93))/0x4)+-parseInt(_0x3bd766(0x97))/0x5+-parseInt(_0x3bd766(0xa9))/0x6*(parseInt(_0x3bd766(0xa4))/0x7)+-parseInt(_0x3bd766(0x92))/0x8*(-parseInt(_0x3bd766(0xa2))/0x9)+-parseInt(_0x3bd766(0x8c))/0xa+-parseInt(_0x3bd766(0x8b))/0xb*(-parseInt(_0x3bd766(0x91))/0xc);if(_0x18af91===_0x29af17)break;else _0x27a5af['push'](_0x27a5af['shift']());}catch(_0x67783c){_0x27a5af['push'](_0x27a5af['shift']());}}}(a281_0x142c,0xf2db3));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 _0x26997d=a281_0x120b,_0x3952c2=getTemplateBaseUrl();return _0x3952c2+_0x26997d(0xa7);}const CACHE_DIR=join(homedir(),a281_0x225db8(0x98),a281_0x225db8(0x9c));export async function fetchGuidesFromCDN(){const _0x2fd6f2=a281_0x225db8,_0x521340=getGuidesCdnUrl(),_0x11a50d=await fetch(_0x521340,{'headers':{'Accept':'application/json'}});if(!_0x11a50d['ok'])throw new Error('CDN\x20请求失败:\x20'+_0x11a50d['status']+'\x20'+_0x11a50d['statusText']);const _0x478cb9=await _0x11a50d[_0x2fd6f2(0x99)]();if(!_0x478cb9[_0x2fd6f2(0xa6)]||typeof _0x478cb9['guides']!=='object')throw new Error(_0x2fd6f2(0x9e));return _0x478cb9;}export function writeGuidesToProject(_0x2f51a5,_0x4d4b38,_0x378c34=a281_0x225db8(0x89),_0x3220e6){const _0x4200e0=a281_0x225db8,_0xce6e2e=join(_0x4d4b38,_0x378c34);mkdirSync(_0xce6e2e,{'recursive':!![]});for(const [_0x4a676f,_0x59e828]of Object[_0x4200e0(0x8f)](_0x2f51a5[_0x4200e0(0xa6)])){let _0x212c27=_0x59e828[_0x4200e0(0x90)];_0x59e828[_0x4200e0(0xa5)]&&(_0x212c27=appendUpdateTime(_0x212c27,_0x59e828['lastUpdated'])),writeFileSync(join(_0xce6e2e,_0x4a676f+_0x4200e0(0x9d)),_0x212c27,_0x4200e0(0xa3));}}export function appendUpdateTime(_0xcb4260,_0x1eefd0){const _0x2c298f=a281_0x225db8;return _0xcb4260=_0xcb4260[_0x2c298f(0x9f)](/\n*>更新时间:.*$/m,''),_0xcb4260[_0x2c298f(0xa0)]()+(_0x2c298f(0x8a)+_0x1eefd0);}export function getSkillTemplate(_0x3b5992){const _0x56293f=a281_0x225db8;return _0x3b5992[_0x56293f(0x95)]?.[_0x56293f(0x90)]||'';}function a281_0x120b(_0x1628dd,_0x19c891){_0x1628dd=_0x1628dd-0x89;const _0x142ce9=a281_0x142c();let _0x120bd1=_0x142ce9[_0x1628dd];return _0x120bd1;}export function appendExtendContents(_0x1eb77c,_0x541862,_0x13b4b2){const _0x4042b7=a281_0x225db8,_0x2a619b=[];for(const [,_0x25515d]of Object[_0x4042b7(0x8f)](_0x541862[_0x4042b7(0xa6)])){_0x25515d[_0x4042b7(0xa1)]&&_0x2a619b[_0x4042b7(0x94)](_0x25515d[_0x4042b7(0xa1)][_0x4042b7(0xa0)]());}if(_0x2a619b['length']===0x0)return _0x1eb77c;return _0x1eb77c['trimEnd']()+'\x0a\x0a'+_0x2a619b[_0x4042b7(0xa8)]('\x0a\x0a')+'\x0a';}export function writeSkillFile(_0x2c9d54,_0x1d1034,_0x2dc33e){const _0x2077e0=a281_0x225db8,_0x54b866=getSkillTemplate(_0x2c9d54);if(!_0x54b866)throw new Error(_0x2077e0(0x9b));const _0x59205a=dirname(_0x1d1034);mkdirSync(_0x59205a,{'recursive':!![]});let _0x51324c=_0x54b866[_0x2077e0(0x9f)](/\{\{IDE_NAME\}\}/g,_0x2dc33e);_0x51324c=appendExtendContents(_0x51324c,_0x2c9d54),_0x2c9d54[_0x2077e0(0x95)][_0x2077e0(0xa5)]&&(_0x51324c=appendUpdateTime(_0x51324c,_0x2c9d54[_0x2077e0(0x95)][_0x2077e0(0xa5)])),writeFileSync(_0x1d1034,_0x51324c,_0x2077e0(0xa3));}export async function installGuides(_0x4e23b4){const _0x2576a9=a281_0x225db8,_0x271839=await fetchGuidesFromCDN();return writeGuidesToProject(_0x271839,_0x4e23b4),Object[_0x2576a9(0x8d)](_0x271839['guides'])['length'];}export function getGuidesSummary(_0x21957b){const _0x4ef4c4=a281_0x225db8;return Object[_0x4ef4c4(0x8f)](_0x21957b[_0x4ef4c4(0xa6)])['map'](([_0x56dfa6,_0x5ae4f1])=>({'key':_0x56dfa6,'title':_0x5ae4f1['title'],'path':_0x5ae4f1['path']}));}
1
+ function a288_0x140a(_0x2e1864,_0x515d57){_0x2e1864=_0x2e1864-0x12a;const _0x4aa53f=a288_0x4aa5();let _0x140a65=_0x4aa53f[_0x2e1864];return _0x140a65;}const a288_0x205810=a288_0x140a;(function(_0x1998be,_0x5da684){const _0x181d6d=a288_0x140a,_0x3ae84c=_0x1998be();while(!![]){try{const _0xbc7638=-parseInt(_0x181d6d(0x149))/0x1+parseInt(_0x181d6d(0x144))/0x2+-parseInt(_0x181d6d(0x148))/0x3+parseInt(_0x181d6d(0x134))/0x4*(parseInt(_0x181d6d(0x141))/0x5)+-parseInt(_0x181d6d(0x12e))/0x6*(-parseInt(_0x181d6d(0x13c))/0x7)+parseInt(_0x181d6d(0x13e))/0x8+-parseInt(_0x181d6d(0x146))/0x9;if(_0xbc7638===_0x5da684)break;else _0x3ae84c['push'](_0x3ae84c['shift']());}catch(_0x3493a5){_0x3ae84c['push'](_0x3ae84c['shift']());}}}(a288_0x4aa5,0x232d1));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 _0x1ec367=a288_0x140a,_0x3fc311=getTemplateBaseUrl();return _0x3fc311+_0x1ec367(0x136);}const CACHE_DIR=join(homedir(),a288_0x205810(0x12b),a288_0x205810(0x135));export async function fetchGuidesFromCDN(){const _0x12a450=a288_0x205810,_0x10bd01=getGuidesCdnUrl(),_0x28a63f=await fetch(_0x10bd01,{'headers':{'Accept':_0x12a450(0x13f)}});if(!_0x28a63f['ok'])throw new Error(_0x12a450(0x13b)+_0x28a63f[_0x12a450(0x132)]+'\x20'+_0x28a63f[_0x12a450(0x140)]);const _0x2a9ce7=await _0x28a63f['json']();if(!_0x2a9ce7[_0x12a450(0x133)]||typeof _0x2a9ce7['guides']!==_0x12a450(0x131))throw new Error('CDN\x20返回数据格式错误');return _0x2a9ce7;}export function writeGuidesToProject(_0x486722,_0x4373c3,_0x5ca320=a288_0x205810(0x142),_0x3ac255){const _0x10d4b8=a288_0x205810,_0x4f86c2=join(_0x4373c3,_0x5ca320);mkdirSync(_0x4f86c2,{'recursive':!![]});for(const [_0x39511c,_0x4ced3f]of Object[_0x10d4b8(0x14a)](_0x486722[_0x10d4b8(0x133)])){let _0x466834=_0x4ced3f[_0x10d4b8(0x14b)];_0x4ced3f[_0x10d4b8(0x143)]&&(_0x466834=appendUpdateTime(_0x466834,_0x4ced3f['lastUpdated'])),writeFileSync(join(_0x4f86c2,_0x39511c+'.md'),_0x466834,_0x10d4b8(0x137));}}export function appendUpdateTime(_0x4a9ef8,_0x43eca2){const _0x30f659=a288_0x205810;return _0x4a9ef8=_0x4a9ef8[_0x30f659(0x12c)](/\n*>更新时间:.*$/m,''),_0x4a9ef8[_0x30f659(0x138)]()+(_0x30f659(0x130)+_0x43eca2);}export function getSkillTemplate(_0x5538c4){return _0x5538c4['skillTemplate']?.['content']||'';}export function appendExtendContents(_0x79cab0,_0x418018,_0x4da8b1){const _0x7be93e=a288_0x205810,_0x5c3185=[];for(const [,_0x51300e]of Object[_0x7be93e(0x14a)](_0x418018['guides'])){_0x51300e[_0x7be93e(0x139)]&&_0x5c3185[_0x7be93e(0x13d)](_0x51300e[_0x7be93e(0x139)][_0x7be93e(0x138)]());}if(_0x5c3185[_0x7be93e(0x12f)]===0x0)return _0x79cab0;return _0x79cab0[_0x7be93e(0x138)]()+'\x0a\x0a'+_0x5c3185[_0x7be93e(0x145)]('\x0a\x0a')+'\x0a';}export function writeSkillFile(_0x2e03a6,_0x1f8e47,_0x15d8b9){const _0x29425e=a288_0x205810,_0x3b6a6a=getSkillTemplate(_0x2e03a6);if(!_0x3b6a6a)throw new Error(_0x29425e(0x147));const _0x10fa6d=dirname(_0x1f8e47);mkdirSync(_0x10fa6d,{'recursive':!![]});let _0x485af4=_0x3b6a6a['replace'](/\{\{IDE_NAME\}\}/g,_0x15d8b9);_0x485af4=appendExtendContents(_0x485af4,_0x2e03a6),_0x2e03a6[_0x29425e(0x12d)][_0x29425e(0x143)]&&(_0x485af4=appendUpdateTime(_0x485af4,_0x2e03a6['skillTemplate']['lastUpdated'])),writeFileSync(_0x1f8e47,_0x485af4,_0x29425e(0x137));}export async function installGuides(_0x16056b){const _0x5d583f=a288_0x205810,_0x2b74b4=await fetchGuidesFromCDN();return writeGuidesToProject(_0x2b74b4,_0x16056b),Object[_0x5d583f(0x12a)](_0x2b74b4[_0x5d583f(0x133)])['length'];}export function getGuidesSummary(_0x58df3d){const _0x461c40=a288_0x205810;return Object[_0x461c40(0x14a)](_0x58df3d[_0x461c40(0x133)])['map'](([_0xeedb64,_0x37b950])=>({'key':_0xeedb64,'title':_0x37b950['title'],'path':_0x37b950[_0x461c40(0x13a)]}));}function a288_0x4aa5(){const _0x57b072=['2751453BdNlpo','CDN\x20数据中缺少\x20skillTemplate','405504urctwJ','122018jNwDcq','entries','content','keys','.lovrabet','replace','skillTemplate','744NsIOjL','length','\x0a\x0a>更新时间:','object','status','guides','296696YKcKfp','cache','/skills/guides.json','utf-8','trimEnd','extendContent','path','CDN\x20请求失败:\x20','14161DIEbpv','push','2249936fCganm','application/json','statusText','10CjKfws','.lovrabet/skill/guides','lastUpdated','53084fDfiVI','join'];a288_0x4aa5=function(){return _0x57b072;};return a288_0x4aa5();}
@@ -1 +1 @@
1
- function a282_0x2af1(){const _0x563425=['4984600jDkJiW','*\x20请求失败,','3655715YKarqw','35840QOELWb','signal','31266DYELFb','message','log','ms\x20后进行第\x20','statusText','application/json','3WaUOJX','text','\x20次重试...','json','TypeError','1197358jIZLal','Request\x20failed','16JuvaRt','293935HVfgwV','ECONNRESET','AbortError','fetch','status','headers','url','includes','abort','content-type','3439125nkCsqd','441qjvYrR','ENOTFOUND'];a282_0x2af1=function(){return _0x563425;};return a282_0x2af1();}(function(_0x2cb5b8,_0x15b7c3){const _0x3bdad6=a282_0xa8b9,_0x261fd4=_0x2cb5b8();while(!![]){try{const _0xced72e=parseInt(_0x3bdad6(0xe9))/0x1+-parseInt(_0x3bdad6(0x106))/0x2*(parseInt(_0x3bdad6(0x101))/0x3)+parseInt(_0x3bdad6(0xf6))/0x4+parseInt(_0x3bdad6(0xf3))/0x5+parseInt(_0x3bdad6(0xfb))/0x6+parseInt(_0x3bdad6(0xf8))/0x7*(-parseInt(_0x3bdad6(0xe8))/0x8)+-parseInt(_0x3bdad6(0xf4))/0x9*(-parseInt(_0x3bdad6(0xf9))/0xa);if(_0xced72e===_0x15b7c3)break;else _0x261fd4['push'](_0x261fd4['shift']());}catch(_0x209b23){_0x261fd4['push'](_0x261fd4['shift']());}}}(a282_0x2af1,0xbae80));function a282_0xa8b9(_0x4d4996,_0x2be332){_0x4d4996=_0x4d4996-0xe7;const _0x2af1b7=a282_0x2af1();let _0xa8b91b=_0x2af1b7[_0x4d4996];return _0xa8b91b;}export async function httpRequest(_0x9c8960,_0x4fd064={}){const _0xb9b3d7=a282_0xa8b9,{timeout:timeout=0x7530,retries:retries=0x3,retryDelay:retryDelay=0x3e8,headers:headers={}}=_0x4fd064;let _0x56ffbc=null;for(let _0x464429=0x0;_0x464429<=retries;_0x464429++){try{const _0x2ad5b6=new AbortController(),_0x562b2e=setTimeout(()=>_0x2ad5b6[_0xb9b3d7(0xf1)](),timeout),_0x4b3364=await fetch(_0x9c8960,{'headers':headers,'signal':_0x2ad5b6[_0xb9b3d7(0xfa)]});clearTimeout(_0x562b2e);let _0x7462ab;const _0x1f70de=_0x4b3364[_0xb9b3d7(0xee)]['get'](_0xb9b3d7(0xf2));return _0x1f70de?.[_0xb9b3d7(0xf0)](_0xb9b3d7(0x100))?_0x7462ab=await _0x4b3364[_0xb9b3d7(0x104)]():_0x7462ab=await _0x4b3364['text'](),{'ok':_0x4b3364['ok'],'status':_0x4b3364[_0xb9b3d7(0xed)],'statusText':_0x4b3364[_0xb9b3d7(0xff)],'data':_0x7462ab,'headers':_0x4b3364[_0xb9b3d7(0xee)],'url':_0x4b3364[_0xb9b3d7(0xef)],'text':()=>_0x4b3364[_0xb9b3d7(0x102)]()};}catch(_0x556663){_0x56ffbc=_0x556663 instanceof Error?_0x556663:new Error(String(_0x556663));if(_0x464429===retries)break;if(shouldRetry(_0x556663)){console[_0xb9b3d7(0xfd)](_0xb9b3d7(0xf7)+retryDelay+_0xb9b3d7(0xfe)+(_0x464429+0x1)+_0xb9b3d7(0x103)),await sleep(retryDelay);continue;}else break;}}throw _0x56ffbc||new Error(_0xb9b3d7(0xe7));}function shouldRetry(_0x304158){const _0xbb439e=a282_0xa8b9;if(_0x304158 instanceof Error){if(_0x304158['name']===_0xbb439e(0xeb))return![];if(_0x304158['name']===_0xbb439e(0x105)&&_0x304158[_0xbb439e(0xfc)]['includes'](_0xbb439e(0xec)))return!![];if(_0x304158[_0xbb439e(0xfc)][_0xbb439e(0xf0)](_0xbb439e(0xea)))return!![];if(_0x304158[_0xbb439e(0xfc)][_0xbb439e(0xf0)](_0xbb439e(0xf5)))return![];}return![];}function sleep(_0x283bd9){return new Promise(_0x279985=>setTimeout(_0x279985,_0x283bd9));}export function validateUrl(_0x2d72bd){try{return new URL(_0x2d72bd),!![];}catch{return![];}}
1
+ (function(_0x1470fd,_0x2ba577){const _0x3537db=a289_0x1b7c,_0x8530b6=_0x1470fd();while(!![]){try{const _0x3fa9ac=-parseInt(_0x3537db(0x1f5))/0x1+-parseInt(_0x3537db(0x1f2))/0x2+parseInt(_0x3537db(0x1fe))/0x3*(-parseInt(_0x3537db(0x1ff))/0x4)+-parseInt(_0x3537db(0x1eb))/0x5+parseInt(_0x3537db(0x202))/0x6+parseInt(_0x3537db(0x1ed))/0x7+-parseInt(_0x3537db(0x201))/0x8*(-parseInt(_0x3537db(0x1ef))/0x9);if(_0x3fa9ac===_0x2ba577)break;else _0x8530b6['push'](_0x8530b6['shift']());}catch(_0x1c9f2d){_0x8530b6['push'](_0x8530b6['shift']());}}}(a289_0x4e48,0xd8147));export async function httpRequest(_0x23de5d,_0x3f3ef4={}){const _0x51eb39=a289_0x1b7c,{timeout:timeout=0x7530,retries:retries=0x3,retryDelay:retryDelay=0x3e8,headers:headers={}}=_0x3f3ef4;let _0x3a414d=null;for(let _0x195950=0x0;_0x195950<=retries;_0x195950++){try{const _0x31317d=new AbortController(),_0x27fba5=setTimeout(()=>_0x31317d[_0x51eb39(0x200)](),timeout),_0x3c6618=await fetch(_0x23de5d,{'headers':headers,'signal':_0x31317d[_0x51eb39(0x1f1)]});clearTimeout(_0x27fba5);let _0x2a12f2;const _0xb9df94=_0x3c6618[_0x51eb39(0x1e9)]['get'](_0x51eb39(0x1fb));return _0xb9df94?.[_0x51eb39(0x1ee)](_0x51eb39(0x1fa))?_0x2a12f2=await _0x3c6618[_0x51eb39(0x1ea)]():_0x2a12f2=await _0x3c6618[_0x51eb39(0x1f0)](),{'ok':_0x3c6618['ok'],'status':_0x3c6618[_0x51eb39(0x1f7)],'statusText':_0x3c6618['statusText'],'data':_0x2a12f2,'headers':_0x3c6618[_0x51eb39(0x1e9)],'url':_0x3c6618[_0x51eb39(0x1f3)],'text':()=>_0x3c6618[_0x51eb39(0x1f0)]()};}catch(_0x5a14cf){_0x3a414d=_0x5a14cf instanceof Error?_0x5a14cf:new Error(String(_0x5a14cf));if(_0x195950===retries)break;if(shouldRetry(_0x5a14cf)){console[_0x51eb39(0x1f4)](_0x51eb39(0x1f6)+retryDelay+_0x51eb39(0x1e7)+(_0x195950+0x1)+'\x20次重试...'),await sleep(retryDelay);continue;}else break;}}throw _0x3a414d||new Error(_0x51eb39(0x1fc));}function a289_0x4e48(){const _0xd0306a=['signal','2158186OgmFSE','url','log','1298087EeKfdx','*\x20请求失败,','status','name','TypeError','application/json','content-type','Request\x20failed','ENOTFOUND','71421PNHvPi','164OAIQcu','abort','341288QDbZDl','2449704HRyYCp','ms\x20后进行第\x20','fetch','headers','json','7607740UNUraI','message','2223172Wbilzx','includes','1062fCLbXu','text'];a289_0x4e48=function(){return _0xd0306a;};return a289_0x4e48();}function shouldRetry(_0x38f3fc){const _0xeebd1c=a289_0x1b7c;if(_0x38f3fc instanceof Error){if(_0x38f3fc[_0xeebd1c(0x1f8)]==='AbortError')return![];if(_0x38f3fc['name']===_0xeebd1c(0x1f9)&&_0x38f3fc[_0xeebd1c(0x1ec)][_0xeebd1c(0x1ee)](_0xeebd1c(0x1e8)))return!![];if(_0x38f3fc['message']['includes']('ECONNRESET'))return!![];if(_0x38f3fc[_0xeebd1c(0x1ec)][_0xeebd1c(0x1ee)](_0xeebd1c(0x1fd)))return![];}return![];}function a289_0x1b7c(_0xbf6579,_0x4c9f38){_0xbf6579=_0xbf6579-0x1e7;const _0x4e481d=a289_0x4e48();let _0x1b7c79=_0x4e481d[_0xbf6579];return _0x1b7c79;}function sleep(_0x59ed1d){return new Promise(_0x23c3fb=>setTimeout(_0x23c3fb,_0x59ed1d));}export function validateUrl(_0x1e38d1){try{return new URL(_0x1e38d1),!![];}catch{return![];}}
@@ -1 +1 @@
1
- function a283_0x288d(_0x3a71ec,_0x5c8e54){_0x3a71ec=_0x3a71ec-0x14a;const _0x14fea1=a283_0x14fe();let _0x288dd7=_0x14fea1[_0x3a71ec];return _0x288dd7;}(function(_0x3d9ce5,_0x2914dc){const _0x4d7283=a283_0x288d,_0x3f2807=_0x3d9ce5();while(!![]){try{const _0x3fa69b=-parseInt(_0x4d7283(0x14b))/0x1*(-parseInt(_0x4d7283(0x150))/0x2)+-parseInt(_0x4d7283(0x14c))/0x3*(-parseInt(_0x4d7283(0x14d))/0x4)+-parseInt(_0x4d7283(0x14a))/0x5+parseInt(_0x4d7283(0x14e))/0x6+parseInt(_0x4d7283(0x153))/0x7*(parseInt(_0x4d7283(0x152))/0x8)+parseInt(_0x4d7283(0x14f))/0x9+-parseInt(_0x4d7283(0x158))/0xa;if(_0x3fa69b===_0x2914dc)break;else _0x3f2807['push'](_0x3f2807['shift']());}catch(_0x7536f5){_0x3f2807['push'](_0x3f2807['shift']());}}}(a283_0x14fe,0xc255e));function a283_0x14fe(){const _0x5025e0=['32566000ThuPyc','846345dqRADB','6LZIlko','294147RnsUVd','28WMdgBS','8506182IHRTTo','8203410JUmmgl','59722QQzanM','stdout','8217368LneIZL','7BPhXGo','true','setRawMode','stdin','isRaw'];a283_0x14fe=function(){return _0x5025e0;};return a283_0x14fe();}function env(_0x4a931e){return process.env[`RABETBASE_${_0x4a931e}`]||process.env[`LOVRABET_${_0x4a931e}`]||undefined;}export function isNonInteractive(_0x3f55b3){const _0x34190e=a283_0x288d;return!!(_0x3f55b3['nonInteractive']||_0x3f55b3['ci']||env('CI')===_0x34190e(0x154)||process.env.CI==='true'||!process[_0x34190e(0x151)]['isTTY']||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x27d260=a283_0x288d;if(!process[_0x27d260(0x156)]['isTTY'])return![];try{const _0xa02169=process[_0x27d260(0x156)][_0x27d260(0x157)];return process[_0x27d260(0x156)][_0x27d260(0x155)](!![]),process[_0x27d260(0x156)][_0x27d260(0x155)](_0xa02169??![]),!![];}catch{return![];}}
1
+ (function(_0x4c58b6,_0x908d12){const _0x5c8b0d=a290_0x48fd,_0x3cdf16=_0x4c58b6();while(!![]){try{const _0xcd2560=-parseInt(_0x5c8b0d(0xed))/0x1+parseInt(_0x5c8b0d(0xeb))/0x2+parseInt(_0x5c8b0d(0xea))/0x3*(parseInt(_0x5c8b0d(0xe7))/0x4)+-parseInt(_0x5c8b0d(0xee))/0x5+-parseInt(_0x5c8b0d(0xf1))/0x6+-parseInt(_0x5c8b0d(0xe5))/0x7*(parseInt(_0x5c8b0d(0xf2))/0x8)+parseInt(_0x5c8b0d(0xef))/0x9*(parseInt(_0x5c8b0d(0xf0))/0xa);if(_0xcd2560===_0x908d12)break;else _0x3cdf16['push'](_0x3cdf16['shift']());}catch(_0x1c2f71){_0x3cdf16['push'](_0x3cdf16['shift']());}}}(a290_0x2737,0xd4a4c));function a290_0x48fd(_0x1a3121,_0x16418a){_0x1a3121=_0x1a3121-0xe5;const _0x2737a4=a290_0x2737();let _0x48fd59=_0x2737a4[_0x1a3121];return _0x48fd59;}function env(_0x453b31){return process.env[`RABETBASE_${_0x453b31}`]||process.env[`LOVRABET_${_0x453b31}`]||undefined;}export function isNonInteractive(_0xb1f29){const _0x2d55f4=a290_0x48fd;return!!(_0xb1f29['nonInteractive']||_0xb1f29['ci']||env('CI')===_0x2d55f4(0xe6)||process.env.CI==='true'||!process[_0x2d55f4(0xf3)][_0x2d55f4(0xe9)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x2da535=a290_0x48fd;if(!process[_0x2da535(0xec)]['isTTY'])return![];try{const _0x3a9167=process['stdin']['isRaw'];return process['stdin'][_0x2da535(0xe8)](!![]),process[_0x2da535(0xec)][_0x2da535(0xe8)](_0x3a9167??![]),!![];}catch{return![];}}function a290_0x2737(){const _0x20e7fa=['4205418HArUzD','true','500qpFYLa','setRawMode','isTTY','30189tqxahG','2265050inCcXr','stdin','444204StFQhb','3085700NZvjHG','4383CBoRoV','18890ejOCpJ','4663422pHRBld','8XTtBHI','stdout'];a290_0x2737=function(){return _0x20e7fa;};return a290_0x2737();}
@@ -1 +1 @@
1
- const a284_0x5c95f2=a284_0xaf43;(function(_0x520873,_0x53a2d1){const _0x456d17=a284_0xaf43,_0x3febae=_0x520873();while(!![]){try{const _0x52a2d5=-parseInt(_0x456d17(0x1c7))/0x1+-parseInt(_0x456d17(0x1e1))/0x2*(-parseInt(_0x456d17(0x1c8))/0x3)+parseInt(_0x456d17(0x1d4))/0x4+-parseInt(_0x456d17(0x1f4))/0x5*(-parseInt(_0x456d17(0x1c9))/0x6)+-parseInt(_0x456d17(0x203))/0x7*(-parseInt(_0x456d17(0x1fb))/0x8)+-parseInt(_0x456d17(0x1fe))/0x9*(-parseInt(_0x456d17(0x1e8))/0xa)+-parseInt(_0x456d17(0x1ce))/0xb*(parseInt(_0x456d17(0x1cc))/0xc);if(_0x52a2d5===_0x53a2d1)break;else _0x3febae['push'](_0x3febae['shift']());}catch(_0x264c6a){_0x3febae['push'](_0x3febae['shift']());}}}(a284_0x1e0f,0xdf379));import a284_0x40f3b2 from'winston';function a284_0xaf43(_0x35ffdb,_0x3e3b93){_0x35ffdb=_0x35ffdb-0x1c7;const _0x1e0fc6=a284_0x1e0f();let _0xaf4387=_0x1e0fc6[_0x35ffdb];return _0xaf4387;}function a284_0x1e0f(){const _0x4fe58a=['clear','level','split','setRawCommand','message','blue','3064260gvNCba','errors','success','完成:\x20','command','createLogger','join','yellow','error','stringify','toISOString','now','6153105cRuoBc','warn','unknown','clearLogs','File','winstonLogger','filter','8MjNJbs','logTask','utf8','18qRFfYZ','开始执行:\x20','setLogPath','失败:\x20','readLogs','3667258LgwMtI','duration','359075qVqqLH','4977CkAFwH','6qKJUeY','existsSync','details','17953332sljapG','addColors','22DmwPIE','map','currentRawCommand','green','dirname','red','499024EymnmU','logFilePath','parse','readFileSync','getWinstonInstance','timestamp','combine','.lovrabet.log','writeFileSync','Failed\x20to\x20clear\x20logs:','info','format','log','2138nzSHys'];a284_0x1e0f=function(){return _0x4fe58a;};return a284_0x1e0f();}import a284_0x2284e0 from'node:fs';import a284_0x2a36b9 from'node:path';class Logger{['winstonLogger'];['logFilePath'];['currentRawCommand']='';constructor(){const _0x1db63a=a284_0xaf43;this[_0x1db63a(0x1d5)]='';}[a284_0x5c95f2(0x1e5)](_0xceffa3){this['currentRawCommand']=_0xceffa3;}['initWinstonLogger'](){const _0x4c32c6=a284_0x5c95f2,_0x5719f6=a284_0x2a36b9[_0x4c32c6(0x1d2)](this[_0x4c32c6(0x1d5)]);!a284_0x2284e0[_0x4c32c6(0x1ca)](_0x5719f6)&&a284_0x2284e0['mkdirSync'](_0x5719f6,{'recursive':!![]});const _0x1c1e4a=a284_0x40f3b2[_0x4c32c6(0x1df)][_0x4c32c6(0x1da)](a284_0x40f3b2[_0x4c32c6(0x1df)][_0x4c32c6(0x1d9)](),a284_0x40f3b2[_0x4c32c6(0x1df)][_0x4c32c6(0x1e9)]({'stack':!![]}),a284_0x40f3b2[_0x4c32c6(0x1df)]['printf'](_0x4e6c27=>{const _0x10c735=_0x4c32c6,_0x286af2={'timestamp':_0x4e6c27[_0x10c735(0x1d9)]||new Date()[_0x10c735(0x1f2)](),'level':_0x4e6c27[_0x10c735(0x1e3)]||_0x10c735(0x1de),'command':_0x4e6c27[_0x10c735(0x1ec)]||_0x10c735(0x1f6),'rawCommand':_0x4e6c27['rawCommand']||this[_0x10c735(0x1d0)]||undefined,'message':_0x4e6c27['message']||'','duration':_0x4e6c27[_0x10c735(0x204)]||undefined,'details':_0x4e6c27[_0x10c735(0x1cb)]||undefined};return JSON[_0x10c735(0x1f1)](_0x286af2);}));this[_0x4c32c6(0x1f9)]=a284_0x40f3b2[_0x4c32c6(0x1ed)]({'level':_0x4c32c6(0x1de),'format':_0x1c1e4a,'transports':[new a284_0x40f3b2['transports'][(_0x4c32c6(0x1f8))]({'filename':this[_0x4c32c6(0x1d5)],'level':_0x4c32c6(0x1de)})],'silent':![]}),a284_0x40f3b2[_0x4c32c6(0x1cd)]({'success':_0x4c32c6(0x1d1),'error':_0x4c32c6(0x1d3),'warn':_0x4c32c6(0x1ef),'info':_0x4c32c6(0x1e7)});}[a284_0x5c95f2(0x200)](_0x44f67b){const _0x4068df=a284_0x5c95f2;this['logFilePath']=a284_0x2a36b9[_0x4068df(0x1ee)](_0x44f67b,_0x4068df(0x1db)),this['winstonLogger']&&this['winstonLogger'][_0x4068df(0x1e2)](),this['initWinstonLogger']();}[a284_0x5c95f2(0x1de)](_0x865c09,_0x4c5d07,_0x1e3af0){const _0x2f793e=a284_0x5c95f2;if(!this[_0x2f793e(0x1d5)]||!this[_0x2f793e(0x1f9)])return;this['winstonLogger'][_0x2f793e(0x1de)](_0x4c5d07,{'command':_0x865c09,'details':_0x1e3af0});}[a284_0x5c95f2(0x1ea)](_0x2a334e,_0x16ef0f,_0x42a5e4,_0x47142b){const _0x43c9b0=a284_0x5c95f2;if(!this[_0x43c9b0(0x1d5)]||!this[_0x43c9b0(0x1f9)])return;this[_0x43c9b0(0x1f9)][_0x43c9b0(0x1e0)](_0x43c9b0(0x1de),_0x16ef0f,{'level':_0x43c9b0(0x1ea),'command':_0x2a334e,'duration':_0x42a5e4,'details':_0x47142b});}[a284_0x5c95f2(0x1f0)](_0x163784,_0x154281,_0x2728cf){const _0x5d59df=a284_0x5c95f2;if(!this[_0x5d59df(0x1d5)]||!this[_0x5d59df(0x1f9)])return;this[_0x5d59df(0x1f9)][_0x5d59df(0x1f0)](_0x154281,{'command':_0x163784,'details':_0x2728cf});}[a284_0x5c95f2(0x1f5)](_0x3c6c75,_0x5b66b2,_0x1c7ae3){const _0x1a074f=a284_0x5c95f2;if(!this[_0x1a074f(0x1d5)]||!this[_0x1a074f(0x1f9)])return;this[_0x1a074f(0x1f9)]['warn'](_0x5b66b2,{'command':_0x3c6c75,'details':_0x1c7ae3});}async[a284_0x5c95f2(0x1fc)](_0x2342e2,_0x5c3929,_0x396185){const _0x1d9f92=a284_0x5c95f2,_0x49cd08=Date[_0x1d9f92(0x1f3)]();this[_0x1d9f92(0x1de)](_0x2342e2,_0x1d9f92(0x1ff)+_0x5c3929);try{const _0x236418=await _0x396185(),_0x458433=Date['now']()-_0x49cd08;return this[_0x1d9f92(0x1ea)](_0x2342e2,_0x1d9f92(0x1eb)+_0x5c3929,_0x458433),_0x236418;}catch(_0x33a7cb){const _0x15222c=Date[_0x1d9f92(0x1f3)]()-_0x49cd08;this['error'](_0x2342e2,_0x1d9f92(0x201)+_0x5c3929,{'error':_0x33a7cb instanceof Error?_0x33a7cb[_0x1d9f92(0x1e6)]:String(_0x33a7cb),'duration':_0x15222c});throw _0x33a7cb;}}[a284_0x5c95f2(0x202)](){const _0x22d6a8=a284_0x5c95f2;try{if(!a284_0x2284e0['existsSync'](this[_0x22d6a8(0x1d5)]))return[];const _0x467bb7=a284_0x2284e0[_0x22d6a8(0x1d7)](this['logFilePath'],_0x22d6a8(0x1fd));return _0x467bb7[_0x22d6a8(0x1e4)]('\x0a')[_0x22d6a8(0x1fa)](_0x5e448c=>_0x5e448c['trim']())[_0x22d6a8(0x1cf)](_0x14913d=>JSON[_0x22d6a8(0x1d6)](_0x14913d));}catch(_0x4d2bac){return console[_0x22d6a8(0x1f5)]('Failed\x20to\x20read\x20logs:',_0x4d2bac),[];}}[a284_0x5c95f2(0x1f7)](){const _0x4c1cd2=a284_0x5c95f2;try{a284_0x2284e0['existsSync'](this['logFilePath'])&&a284_0x2284e0[_0x4c1cd2(0x1dc)](this[_0x4c1cd2(0x1d5)],'',_0x4c1cd2(0x1fd));}catch(_0x4c9de1){console[_0x4c1cd2(0x1f5)](_0x4c1cd2(0x1dd),_0x4c9de1);}}[a284_0x5c95f2(0x1d8)](){const _0x27fde9=a284_0x5c95f2;return this[_0x27fde9(0x1f9)];}}export const logger=new Logger();
1
+ const a291_0x4d5686=a291_0x3072;function a291_0x3072(_0x295e3e,_0x48df25){_0x295e3e=_0x295e3e-0xbb;const _0x1e9672=a291_0x1e96();let _0x3072e4=_0x1e9672[_0x295e3e];return _0x3072e4;}(function(_0x236f10,_0x41c6a5){const _0x3a6e77=a291_0x3072,_0x48d36f=_0x236f10();while(!![]){try{const _0x3e1cdf=-parseInt(_0x3a6e77(0xd1))/0x1*(-parseInt(_0x3a6e77(0xdd))/0x2)+parseInt(_0x3a6e77(0xbf))/0x3*(parseInt(_0x3a6e77(0xbc))/0x4)+parseInt(_0x3a6e77(0xc3))/0x5+parseInt(_0x3a6e77(0xe4))/0x6+parseInt(_0x3a6e77(0xee))/0x7*(-parseInt(_0x3a6e77(0xd5))/0x8)+parseInt(_0x3a6e77(0xbe))/0x9*(parseInt(_0x3a6e77(0xd9))/0xa)+-parseInt(_0x3a6e77(0xc7))/0xb;if(_0x3e1cdf===_0x41c6a5)break;else _0x48d36f['push'](_0x48d36f['shift']());}catch(_0x38037e){_0x48d36f['push'](_0x48d36f['shift']());}}}(a291_0x1e96,0x31c46));import a291_0x287d38 from'winston';function a291_0x1e96(){const _0x3102b8=['message','red','error','info','1KWRlPj','clear','logFilePath','map','8IJbawE','warn','.lovrabet.log','setLogPath','475990PArWHk','transports','unknown','level','379396tacGEu','existsSync','combine','command','now','details','utf8','2150040yAlRdG','parse','trim','clearLogs','timestamp','printf','Failed\x20to\x20read\x20logs:','success','mkdirSync','toISOString','2661337pIUtbc','duration','dirname','stringify','rawCommand','开始执行:\x20','1364468yADLbx','format','18zveuWD','3NEuqII','失败:\x20','winstonLogger','yellow','1616620eDjHsE','blue','currentRawCommand','initWinstonLogger','7960040dJJkzh','File','logTask','readLogs','split','readFileSync'];a291_0x1e96=function(){return _0x3102b8;};return a291_0x1e96();}import a291_0x52d2b3 from'node:fs';import a291_0x590050 from'node:path';class Logger{[a291_0x4d5686(0xc1)];[a291_0x4d5686(0xd3)];[a291_0x4d5686(0xc5)]='';constructor(){const _0x47d418=a291_0x4d5686;this[_0x47d418(0xd3)]='';}['setRawCommand'](_0x460e50){const _0x200f7f=a291_0x4d5686;this[_0x200f7f(0xc5)]=_0x460e50;}[a291_0x4d5686(0xc6)](){const _0x357880=a291_0x4d5686,_0x15d35d=a291_0x590050[_0x357880(0xf0)](this['logFilePath']);!a291_0x52d2b3[_0x357880(0xde)](_0x15d35d)&&a291_0x52d2b3[_0x357880(0xec)](_0x15d35d,{'recursive':!![]});const _0x4c39f2=a291_0x287d38[_0x357880(0xbd)][_0x357880(0xdf)](a291_0x287d38['format']['timestamp'](),a291_0x287d38[_0x357880(0xbd)]['errors']({'stack':!![]}),a291_0x287d38['format'][_0x357880(0xe9)](_0x47e51a=>{const _0x36c03e=_0x357880,_0x131eca={'timestamp':_0x47e51a[_0x36c03e(0xe8)]||new Date()[_0x36c03e(0xed)](),'level':_0x47e51a[_0x36c03e(0xdc)]||_0x36c03e(0xd0),'command':_0x47e51a[_0x36c03e(0xe0)]||_0x36c03e(0xdb),'rawCommand':_0x47e51a[_0x36c03e(0xf2)]||this[_0x36c03e(0xc5)]||undefined,'message':_0x47e51a[_0x36c03e(0xcd)]||'','duration':_0x47e51a[_0x36c03e(0xef)]||undefined,'details':_0x47e51a[_0x36c03e(0xe2)]||undefined};return JSON[_0x36c03e(0xf1)](_0x131eca);}));this['winstonLogger']=a291_0x287d38['createLogger']({'level':_0x357880(0xd0),'format':_0x4c39f2,'transports':[new a291_0x287d38[(_0x357880(0xda))][(_0x357880(0xc8))]({'filename':this['logFilePath'],'level':_0x357880(0xd0)})],'silent':![]}),a291_0x287d38['addColors']({'success':'green','error':_0x357880(0xce),'warn':_0x357880(0xc2),'info':_0x357880(0xc4)});}[a291_0x4d5686(0xd8)](_0x4989c8){const _0x4443f3=a291_0x4d5686;this[_0x4443f3(0xd3)]=a291_0x590050['join'](_0x4989c8,_0x4443f3(0xd7)),this[_0x4443f3(0xc1)]&&this[_0x4443f3(0xc1)][_0x4443f3(0xd2)](),this['initWinstonLogger']();}['info'](_0x40e139,_0x3eba69,_0x183f2d){const _0x163046=a291_0x4d5686;if(!this[_0x163046(0xd3)]||!this['winstonLogger'])return;this[_0x163046(0xc1)][_0x163046(0xd0)](_0x3eba69,{'command':_0x40e139,'details':_0x183f2d});}['success'](_0x16828f,_0x4029f1,_0x43c6c4,_0x3220f5){const _0x3d5c63=a291_0x4d5686;if(!this[_0x3d5c63(0xd3)]||!this[_0x3d5c63(0xc1)])return;this[_0x3d5c63(0xc1)]['log']('info',_0x4029f1,{'level':_0x3d5c63(0xeb),'command':_0x16828f,'duration':_0x43c6c4,'details':_0x3220f5});}['error'](_0x5b51f9,_0x4920dd,_0x391879){const _0x243510=a291_0x4d5686;if(!this['logFilePath']||!this[_0x243510(0xc1)])return;this[_0x243510(0xc1)][_0x243510(0xcf)](_0x4920dd,{'command':_0x5b51f9,'details':_0x391879});}[a291_0x4d5686(0xd6)](_0x19b4b3,_0x5acce9,_0x26c88d){const _0x29f2c0=a291_0x4d5686;if(!this[_0x29f2c0(0xd3)]||!this[_0x29f2c0(0xc1)])return;this[_0x29f2c0(0xc1)]['warn'](_0x5acce9,{'command':_0x19b4b3,'details':_0x26c88d});}async[a291_0x4d5686(0xc9)](_0x103582,_0x19cdd5,_0xd22cfc){const _0x1e2b7e=a291_0x4d5686,_0x8dd6bb=Date['now']();this[_0x1e2b7e(0xd0)](_0x103582,_0x1e2b7e(0xbb)+_0x19cdd5);try{const _0x7f60e2=await _0xd22cfc(),_0x2d226c=Date[_0x1e2b7e(0xe1)]()-_0x8dd6bb;return this[_0x1e2b7e(0xeb)](_0x103582,'完成:\x20'+_0x19cdd5,_0x2d226c),_0x7f60e2;}catch(_0xe9bb1f){const _0x58b417=Date[_0x1e2b7e(0xe1)]()-_0x8dd6bb;this[_0x1e2b7e(0xcf)](_0x103582,_0x1e2b7e(0xc0)+_0x19cdd5,{'error':_0xe9bb1f instanceof Error?_0xe9bb1f[_0x1e2b7e(0xcd)]:String(_0xe9bb1f),'duration':_0x58b417});throw _0xe9bb1f;}}[a291_0x4d5686(0xca)](){const _0x36469c=a291_0x4d5686;try{if(!a291_0x52d2b3[_0x36469c(0xde)](this[_0x36469c(0xd3)]))return[];const _0x52697f=a291_0x52d2b3[_0x36469c(0xcc)](this['logFilePath'],'utf8');return _0x52697f[_0x36469c(0xcb)]('\x0a')['filter'](_0x258dde=>_0x258dde[_0x36469c(0xe6)]())[_0x36469c(0xd4)](_0x5480c9=>JSON[_0x36469c(0xe5)](_0x5480c9));}catch(_0x106f2d){return console[_0x36469c(0xd6)](_0x36469c(0xea),_0x106f2d),[];}}[a291_0x4d5686(0xe7)](){const _0x4e97fa=a291_0x4d5686;try{a291_0x52d2b3[_0x4e97fa(0xde)](this[_0x4e97fa(0xd3)])&&a291_0x52d2b3['writeFileSync'](this[_0x4e97fa(0xd3)],'',_0x4e97fa(0xe3));}catch(_0x1b7246){console[_0x4e97fa(0xd6)]('Failed\x20to\x20clear\x20logs:',_0x1b7246);}}['getWinstonInstance'](){const _0x252c09=a291_0x4d5686;return this[_0x252c09(0xc1)];}}export const logger=new Logger();
@@ -1 +1 @@
1
- function a285_0x9854(){const _0xe0aa86=['2KaSGHr','validation','4204180CqkCpK','9FutZQz','286636XkJHqJ','parse','830364ljQFmd','Invalid\x20JSON\x20for\x20--params:\x20','1872840iNSVqG','4372952bRhbvh','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','175SCHsjZ','--params\x20must\x20be\x20a\x20JSON\x20object','isArray','211626TOaeSI','object','2468166hAVbrH'];a285_0x9854=function(){return _0xe0aa86;};return a285_0x9854();}(function(_0x3f57fb,_0x596eb3){const _0x2f0e42=a285_0x50ce,_0x122033=_0x3f57fb();while(!![]){try{const _0x14774b=parseInt(_0x2f0e42(0xe2))/0x1+parseInt(_0x2f0e42(0xed))/0x2*(-parseInt(_0x2f0e42(0xec))/0x3)+parseInt(_0x2f0e42(0xf1))/0x4+-parseInt(_0x2f0e42(0xef))/0x5+parseInt(_0x2f0e42(0xea))/0x6*(parseInt(_0x2f0e42(0xe7))/0x7)+parseInt(_0x2f0e42(0xe5))/0x8+parseInt(_0x2f0e42(0xf0))/0x9*(-parseInt(_0x2f0e42(0xe4))/0xa);if(_0x14774b===_0x596eb3)break;else _0x122033['push'](_0x122033['shift']());}catch(_0x2afaf5){_0x122033['push'](_0x122033['shift']());}}}(a285_0x9854,0x75157));function a285_0x50ce(_0xf5fc7b,_0x34fa53){_0xf5fc7b=_0xf5fc7b-0xe1;const _0x985435=a285_0x9854();let _0x50ceeb=_0x985435[_0xf5fc7b];return _0x50ceeb;}import{CliErrors}from'../errors.js';export function parseJsonParams(_0x3411df){const _0x702e95=a285_0x50ce;if(!_0x3411df)return undefined;let _0x2f07cd;try{_0x2f07cd=JSON[_0x702e95(0xe1)](_0x3411df);}catch{throw CliErrors['validation'](_0x702e95(0xe3)+_0x3411df);}if(!_0x2f07cd||typeof _0x2f07cd!==_0x702e95(0xeb)||Array[_0x702e95(0xe9)](_0x2f07cd))throw CliErrors[_0x702e95(0xee)](_0x702e95(0xe8),_0x702e95(0xe6));return _0x2f07cd;}
1
+ function a292_0x7a67(){const _0x405c5b=['3117185wsqToH','550109lMDmaM','364962PqxUni','isArray','285825bHbfkZ','Invalid\x20JSON\x20for\x20--params:\x20','--params\x20must\x20be\x20a\x20JSON\x20object','80tFGQZY','2031078yllRQc','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','3222852TKeUnl','400712ZDVjXM','validation'];a292_0x7a67=function(){return _0x405c5b;};return a292_0x7a67();}(function(_0x482b9b,_0x2c02e9){const _0x5ef4c7=a292_0x1009,_0x146ddb=_0x482b9b();while(!![]){try{const _0x3f1d98=-parseInt(_0x5ef4c7(0x1c6))/0x1+-parseInt(_0x5ef4c7(0x1c4))/0x2+parseInt(_0x5ef4c7(0x1ca))/0x3+-parseInt(_0x5ef4c7(0x1cd))/0x4+parseInt(_0x5ef4c7(0x1cf))/0x5+parseInt(_0x5ef4c7(0x1cc))/0x6+parseInt(_0x5ef4c7(0x1d0))/0x7*(-parseInt(_0x5ef4c7(0x1c9))/0x8);if(_0x3f1d98===_0x2c02e9)break;else _0x146ddb['push'](_0x146ddb['shift']());}catch(_0x3d81dd){_0x146ddb['push'](_0x146ddb['shift']());}}}(a292_0x7a67,0x75fb3));import{CliErrors}from'../errors.js';function a292_0x1009(_0x38f6f4,_0x1f7188){_0x38f6f4=_0x38f6f4-0x1c4;const _0x7a6735=a292_0x7a67();let _0x1009a8=_0x7a6735[_0x38f6f4];return _0x1009a8;}export function parseJsonParams(_0x460728){const _0x463ae8=a292_0x1009;if(!_0x460728)return undefined;let _0x35b664;try{_0x35b664=JSON['parse'](_0x460728);}catch{throw CliErrors[_0x463ae8(0x1ce)](_0x463ae8(0x1c7)+_0x460728);}if(!_0x35b664||typeof _0x35b664!=='object'||Array[_0x463ae8(0x1c5)](_0x35b664))throw CliErrors[_0x463ae8(0x1ce)](_0x463ae8(0x1c8),_0x463ae8(0x1cb));return _0x35b664;}
@@ -1 +1 @@
1
- const a286_0x12c17d=a286_0x1a63;(function(_0x3a290b,_0x151e07){const _0x31cb29=a286_0x1a63,_0x16cfc2=_0x3a290b();while(!![]){try{const _0x383a9f=-parseInt(_0x31cb29(0x86))/0x1+parseInt(_0x31cb29(0x88))/0x2+-parseInt(_0x31cb29(0x87))/0x3*(parseInt(_0x31cb29(0x83))/0x4)+parseInt(_0x31cb29(0x84))/0x5*(-parseInt(_0x31cb29(0x8c))/0x6)+parseInt(_0x31cb29(0x89))/0x7*(parseInt(_0x31cb29(0x85))/0x8)+-parseInt(_0x31cb29(0x81))/0x9+parseInt(_0x31cb29(0x82))/0xa;if(_0x383a9f===_0x151e07)break;else _0x16cfc2['push'](_0x16cfc2['shift']());}catch(_0x200323){_0x16cfc2['push'](_0x16cfc2['shift']());}}}(a286_0x1072,0x1bf16));function a286_0x1072(){const _0x53c5f6=['83270kfWGrx','7Hmjupn','.cmd','win32','24MKKrdE','934335gqxYvY','4587860bULoPP','1372aMrbzn','69465KJAQLU','72528zbfKfL','149896Pppojj','750yslAEt'];a286_0x1072=function(){return _0x53c5f6;};return a286_0x1072();}function a286_0x1a63(_0x5bbc9e,_0x494891){_0x5bbc9e=_0x5bbc9e-0x81;const _0x107275=a286_0x1072();let _0x1a636e=_0x107275[_0x5bbc9e];return _0x1a636e;}export const isWindows=process['platform']===a286_0x12c17d(0x8b);export function resolveNpmBin(_0x39c1d5){const _0x41530b=a286_0x12c17d;return isWindows?_0x39c1d5+_0x41530b(0x8a):_0x39c1d5;}
1
+ function a293_0x5762(_0x4937f0,_0x1fa4b3){_0x4937f0=_0x4937f0-0x1d3;const _0x43d4ab=a293_0x43d4();let _0x576206=_0x43d4ab[_0x4937f0];return _0x576206;}const a293_0x4f61da=a293_0x5762;(function(_0x53a802,_0x57cada){const _0x5d6ed9=a293_0x5762,_0x254ae3=_0x53a802();while(!![]){try{const _0x31e6ef=-parseInt(_0x5d6ed9(0x1d3))/0x1+-parseInt(_0x5d6ed9(0x1d8))/0x2+-parseInt(_0x5d6ed9(0x1dd))/0x3*(parseInt(_0x5d6ed9(0x1da))/0x4)+-parseInt(_0x5d6ed9(0x1d7))/0x5+parseInt(_0x5d6ed9(0x1dc))/0x6*(-parseInt(_0x5d6ed9(0x1d5))/0x7)+-parseInt(_0x5d6ed9(0x1d9))/0x8+parseInt(_0x5d6ed9(0x1db))/0x9;if(_0x31e6ef===_0x57cada)break;else _0x254ae3['push'](_0x254ae3['shift']());}catch(_0xa48200){_0x254ae3['push'](_0x254ae3['shift']());}}}(a293_0x43d4,0x64a31));function a293_0x43d4(){const _0x2a935b=['472674ifKyxG','2348528YzPgTR','284CKlwob','25567407PHXebC','188022eZapep','22413WLuRdM','209320iuaoJz','win32','161OnaJlL','.cmd','2190995GIbxcv'];a293_0x43d4=function(){return _0x2a935b;};return a293_0x43d4();}export const isWindows=process['platform']===a293_0x4f61da(0x1d4);export function resolveNpmBin(_0x1fa38f){const _0x2985e9=a293_0x4f61da;return isWindows?_0x1fa38f+_0x2985e9(0x1d6):_0x1fa38f;}
@@ -1 +1 @@
1
- (function(_0x132ed1,_0xce84b9){const _0x3c6905=a287_0x40c2,_0x9d31f4=_0x132ed1();while(!![]){try{const _0x1d47e9=parseInt(_0x3c6905(0xa3))/0x1*(parseInt(_0x3c6905(0x9b))/0x2)+-parseInt(_0x3c6905(0xa8))/0x3+-parseInt(_0x3c6905(0x9c))/0x4*(parseInt(_0x3c6905(0xab))/0x5)+-parseInt(_0x3c6905(0x95))/0x6*(-parseInt(_0x3c6905(0x99))/0x7)+-parseInt(_0x3c6905(0xa4))/0x8*(parseInt(_0x3c6905(0xa7))/0x9)+-parseInt(_0x3c6905(0xa9))/0xa+parseInt(_0x3c6905(0x9d))/0xb;if(_0x1d47e9===_0xce84b9)break;else _0x9d31f4['push'](_0x9d31f4['shift']());}catch(_0x40bb66){_0x9d31f4['push'](_0x9d31f4['shift']());}}}(a287_0x3d19,0x7a2bc));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 _0x21f23a=a287_0x40c2,_0x19b8e3=getTemplateBaseUrl();return _0x19b8e3+_0x21f23a(0x9f);}function a287_0x40c2(_0x165840,_0x337f11){_0x165840=_0x165840-0x95;const _0x3d1927=a287_0x3d19();let _0x40c29d=_0x3d1927[_0x165840];return _0x40c29d;}const LOCAL_TEMPLATE_PATH=resolve(__dirname,'../../templates/rules/lovrabet_rules.mdc.tpl');export async function fetchRulesFromCDN(){const _0x50b73f=a287_0x40c2,_0x20c789=getRulesCdnUrl(),_0x72ec9a=await fetch(_0x20c789,{'headers':{'Accept':'application/json'}});if(!_0x72ec9a['ok'])throw new Error(_0x50b73f(0xa6)+_0x72ec9a['status']+'\x20'+_0x72ec9a[_0x50b73f(0x98)]);const _0x51f21e=await _0x72ec9a[_0x50b73f(0xa0)]();if(!_0x51f21e[_0x50b73f(0xa2)]||typeof _0x51f21e[_0x50b73f(0xa2)]!==_0x50b73f(0xaa))throw new Error(_0x50b73f(0x9a));return _0x51f21e;}export async function getRulesContent(){const _0x48115f=a287_0x40c2;try{const _0x15de49=await fetchRulesFromCDN();return _0x15de49[_0x48115f(0xa2)];}catch{return readLocalTemplate();}}export function readLocalTemplate(){const _0x44cad2=a287_0x40c2;if(existsSync(LOCAL_TEMPLATE_PATH))return readFileSync(LOCAL_TEMPLATE_PATH,_0x44cad2(0x97));throw new Error(_0x44cad2(0x9e)+LOCAL_TEMPLATE_PATH);}export async function writeRulesFile(_0x5c07a0){const _0x2ae03b=a287_0x40c2,_0x1fc5ad=await fetchRulesFromCDN()[_0x2ae03b(0x96)](()=>null);let _0x5efe55;_0x1fc5ad?(_0x5efe55=_0x1fc5ad[_0x2ae03b(0xa2)],_0x1fc5ad[_0x2ae03b(0xa5)]&&(_0x5efe55=appendUpdateTime(_0x5efe55,_0x1fc5ad[_0x2ae03b(0xa5)]))):_0x5efe55=readLocalTemplate();const _0x4a9fc1=dirname(_0x5c07a0);!existsSync(_0x4a9fc1)&&mkdirSync(_0x4a9fc1,{'recursive':!![]}),writeFileSync(_0x5c07a0,_0x5efe55,'utf-8');}export async function copyRulesToCursor(_0x144698){const _0x2d76ff=a287_0x40c2,_0x480fd5=join(_0x144698,'.cursor/rules'),_0x67df2d=join(_0x480fd5,_0x2d76ff(0xa1));if(existsSync(_0x67df2d))return![];return await writeRulesFile(_0x67df2d),!![];}export async function copyRulesToAgentsMd(_0x4aff76){const _0x41956c=a287_0x40c2,_0x4cd68a=join(_0x4aff76,_0x41956c(0xac));if(existsSync(_0x4cd68a))return![];return await writeRulesFile(_0x4cd68a),!![];}function a287_0x3d19(){const _0x2c3d20=['json','lovrabet_rules.mdc','content','1ENUSKa','22744NZgEqF','lastUpdated','CDN\x20请求失败:\x20','2601cOBrji','151527bYVeiZ','7771900XYwOXb','string','5pCERJk','agents.md','12JOAuQc','catch','utf-8','statusText','341957bxcESK','CDN\x20返回数据格式错误','1235372eXBnvk','345028nyVBYR','16726677wyYFYa','本地模板文件不存在:\x20','/rules/rules.json'];a287_0x3d19=function(){return _0x2c3d20;};return a287_0x3d19();}
1
+ (function(_0x2bab6e,_0x161114){const _0x134a1a=a294_0x3b45,_0x4c546b=_0x2bab6e();while(!![]){try{const _0x23b96a=parseInt(_0x134a1a(0x110))/0x1*(-parseInt(_0x134a1a(0x111))/0x2)+-parseInt(_0x134a1a(0x100))/0x3*(-parseInt(_0x134a1a(0x10c))/0x4)+parseInt(_0x134a1a(0x114))/0x5*(-parseInt(_0x134a1a(0x108))/0x6)+-parseInt(_0x134a1a(0x105))/0x7+-parseInt(_0x134a1a(0x115))/0x8*(-parseInt(_0x134a1a(0x10f))/0x9)+parseInt(_0x134a1a(0x102))/0xa*(parseInt(_0x134a1a(0x10b))/0xb)+parseInt(_0x134a1a(0x107))/0xc;if(_0x23b96a===_0x161114)break;else _0x4c546b['push'](_0x4c546b['shift']());}catch(_0x25bb1c){_0x4c546b['push'](_0x4c546b['shift']());}}}(a294_0xd038,0xf1354));import{existsSync,mkdirSync,readFileSync,writeFileSync}from'node:fs';function a294_0x3b45(_0x47bbfc,_0x2e1774){_0x47bbfc=_0x47bbfc-0x100;const _0xd038e1=a294_0xd038();let _0x3b4568=_0xd038e1[_0x47bbfc];return _0x3b4568;}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 a294_0xd038(){const _0x586aa3=['lastUpdated','16110lWGOjj','72ThBTnA','CDN\x20返回数据格式错误','5288253jcVzdX','.cursor/rules','283860ySaAPu','string','content','7692405dVSRFi','CDN\x20请求失败:\x20','25128408yhFoJx','564UJruol','本地模板文件不存在:\x20','application/json','11nyedMN','4XjWZvy','agents.md','json','178731vYxjFX','109dkSpde','30718mBxrzu','lovrabet_rules.mdc'];a294_0xd038=function(){return _0x586aa3;};return a294_0xd038();}function getRulesCdnUrl(){const _0x385f1b=getTemplateBaseUrl();return _0x385f1b+'/rules/rules.json';}const LOCAL_TEMPLATE_PATH=resolve(__dirname,'../../templates/rules/lovrabet_rules.mdc.tpl');export async function fetchRulesFromCDN(){const _0x6b7662=a294_0x3b45,_0x29c051=getRulesCdnUrl(),_0x245c5e=await fetch(_0x29c051,{'headers':{'Accept':_0x6b7662(0x10a)}});if(!_0x245c5e['ok'])throw new Error(_0x6b7662(0x106)+_0x245c5e['status']+'\x20'+_0x245c5e['statusText']);const _0x2f98e0=await _0x245c5e[_0x6b7662(0x10e)]();if(!_0x2f98e0['content']||typeof _0x2f98e0['content']!==_0x6b7662(0x103))throw new Error(_0x6b7662(0x116));return _0x2f98e0;}export async function getRulesContent(){const _0x2143ef=a294_0x3b45;try{const _0xba09ed=await fetchRulesFromCDN();return _0xba09ed[_0x2143ef(0x104)];}catch{return readLocalTemplate();}}export function readLocalTemplate(){const _0x38d272=a294_0x3b45;if(existsSync(LOCAL_TEMPLATE_PATH))return readFileSync(LOCAL_TEMPLATE_PATH,'utf-8');throw new Error(_0x38d272(0x109)+LOCAL_TEMPLATE_PATH);}export async function writeRulesFile(_0x1f82ff){const _0x16d1a3=a294_0x3b45,_0x25bfea=await fetchRulesFromCDN()['catch'](()=>null);let _0x2c0167;_0x25bfea?(_0x2c0167=_0x25bfea[_0x16d1a3(0x104)],_0x25bfea[_0x16d1a3(0x113)]&&(_0x2c0167=appendUpdateTime(_0x2c0167,_0x25bfea['lastUpdated']))):_0x2c0167=readLocalTemplate();const _0x4c3bf0=dirname(_0x1f82ff);!existsSync(_0x4c3bf0)&&mkdirSync(_0x4c3bf0,{'recursive':!![]}),writeFileSync(_0x1f82ff,_0x2c0167,'utf-8');}export async function copyRulesToCursor(_0x393c7b){const _0x29abca=a294_0x3b45,_0x66da49=join(_0x393c7b,_0x29abca(0x101)),_0x211dc3=join(_0x66da49,_0x29abca(0x112));if(existsSync(_0x211dc3))return![];return await writeRulesFile(_0x211dc3),!![];}export async function copyRulesToAgentsMd(_0x8b7579){const _0x2ef79b=a294_0x3b45,_0x307405=join(_0x8b7579,_0x2ef79b(0x10d));if(existsSync(_0x307405))return![];return await writeRulesFile(_0x307405),!![];}
@@ -1 +1 @@
1
- export function sleep(_0x2c1c95){return new Promise(_0x1554ad=>setTimeout(_0x1554ad,_0x2c1c95));}
1
+ export function sleep(_0x54067f){return new Promise(_0x4bc9ab=>setTimeout(_0x4bc9ab,_0x54067f));}
@@ -1 +1 @@
1
- function a289_0x31e6(_0x1fa6d6,_0xd82114){_0x1fa6d6=_0x1fa6d6-0xca;const _0x3c5ee6=a289_0x3c5e();let _0x31e6e6=_0x3c5ee6[_0x1fa6d6];return _0x31e6e6;}const a289_0x7a7977=a289_0x31e6;(function(_0x133c64,_0x39a245){const _0x1e8e4f=a289_0x31e6,_0x3c2acc=_0x133c64();while(!![]){try{const _0x3c1ad0=parseInt(_0x1e8e4f(0xcc))/0x1+-parseInt(_0x1e8e4f(0xfa))/0x2*(parseInt(_0x1e8e4f(0xd4))/0x3)+parseInt(_0x1e8e4f(0xe2))/0x4*(parseInt(_0x1e8e4f(0xd3))/0x5)+parseInt(_0x1e8e4f(0xe3))/0x6*(parseInt(_0x1e8e4f(0xe4))/0x7)+-parseInt(_0x1e8e4f(0xe9))/0x8*(-parseInt(_0x1e8e4f(0xd2))/0x9)+parseInt(_0x1e8e4f(0xef))/0xa+-parseInt(_0x1e8e4f(0xcb))/0xb*(parseInt(_0x1e8e4f(0xda))/0xc);if(_0x3c1ad0===_0x39a245)break;else _0x3c2acc['push'](_0x3c2acc['shift']());}catch(_0x5013d2){_0x3c2acc['push'](_0x3c2acc['shift']());}}}(a289_0x3c5e,0xb66ff));import a289_0x153312 from'node:fs';import a289_0x3f225f from'node:path';import{logger}from'../utils/logger.js';import{getCliVersion}from'../utils/version.js';function a289_0x3c5e(){const _0x241203=['promises','processFile','utf8','.md','getDate','success','.tsx','tableName','\x0a\x20\x20\x20\x20{\x20','copyFile','alias','.ts','55JQvaLT','538983ldncbo','processTemplate','formatLocalTimestamp','name','pad','mkdir','63765qTOCMN','546270rLDpYt','22773cdndMN','template','processDirectory','push','now','tableName:\x20\x22','3131268CLUssM','toComponentName','alias:\x20\x22','toLowerCase','toISOString','.scss','LOVRABET','isFile','4JJwByu','42AUYjDt','1051708sSeQQL','endsWith','模板内容替换完成','toUpperCase','YourModel','464OsRKWR','.css','getMonth','slice','pop','join','13606000IHPIKN','开始处理模板内容替换','isDirectory','replaceApiContent','.json','split','message','default','.tpl','writeFile','map','374qwzYha','datasetCode','\x20},','charAt','datasetCode:\x20\x22','replaceContent','name:\x20\x22','padStart','getHours','readdir','replace'];a289_0x3c5e=function(){return _0x241203;};return a289_0x3c5e();}const CLI_VERSION=getCliVersion();export class TemplateReplacer{static[a289_0x7a7977(0xd0)](_0x428c5e){const _0x10b571=a289_0x7a7977;return String(_0x428c5e)[_0x10b571(0x101)](0x2,'0');}static[a289_0x7a7977(0xce)](_0x4e9cec){const _0x53ba48=a289_0x7a7977,_0xdf06e5=_0x4e9cec['getFullYear'](),_0x4ba97b=this['pad'](_0x4e9cec[_0x53ba48(0xeb)]()+0x1),_0x2ee30e=this[_0x53ba48(0xd0)](_0x4e9cec[_0x53ba48(0x109)]()),_0x12a865=this[_0x53ba48(0xd0)](_0x4e9cec[_0x53ba48(0x102)]()),_0x42da7e=this[_0x53ba48(0xd0)](_0x4e9cec['getMinutes']()),_0x2d6dfb=this[_0x53ba48(0xd0)](_0x4e9cec['getSeconds']());return{'createdAt':_0xdf06e5+'-'+_0x4ba97b+'-'+_0x2ee30e+'\x20'+_0x12a865+':'+_0x42da7e+':'+_0x2d6dfb,'createdDate':_0xdf06e5+'-'+_0x4ba97b+'-'+_0x2ee30e,'createdTime':_0x12a865+':'+_0x42da7e+':'+_0x2d6dfb};}static[a289_0x7a7977(0xdb)](_0x285d0d){const _0x1bd274=a289_0x7a7977,_0x30052d=_0x285d0d[_0x1bd274(0xf4)]('/')[_0x1bd274(0xed)]()||_0x285d0d;return _0x30052d[_0x1bd274(0xf4)]('-')[_0x1bd274(0xf9)](_0x326808=>_0x326808[_0x1bd274(0xfd)](0x0)[_0x1bd274(0xe7)]()+_0x326808[_0x1bd274(0xec)](0x1)[_0x1bd274(0xdd)]())[_0x1bd274(0xee)]('');}static['toDisplayTitle'](_0x51b26d){const _0x298763=a289_0x7a7977,_0x5edca6=_0x51b26d['split']('/')[_0x298763(0xed)]()||_0x51b26d;return _0x5edca6[_0x298763(0xf4)]('-')[_0x298763(0xf9)](_0x428e26=>_0x428e26['charAt'](0x0)[_0x298763(0xe7)]()+_0x428e26[_0x298763(0xec)](0x1)[_0x298763(0xdd)]())[_0x298763(0xee)]('\x20');}static['replaceContent'](_0x455d67,_0x54a1cc,_0x5d3833){const _0x16c4c2=a289_0x7a7977,_0x1514f3=this[_0x16c4c2(0xdb)](_0x54a1cc),_0x3914ea=this['toDisplayTitle'](_0x54a1cc),{createdAt:_0x11bd62,createdDate:_0x22a377,createdTime:_0x9daae2}=this[_0x16c4c2(0xce)](new Date());let _0x5d844c=_0x455d67[_0x16c4c2(0x104)](/\{CliVersion\}/g,CLI_VERSION)[_0x16c4c2(0x104)](/\{ComponentName\}/g,_0x1514f3)['replace'](/\{DisplayTitle\}/g,_0x3914ea)['replace'](/\{PageName\}/g,_0x54a1cc)[_0x16c4c2(0x104)](/\{TemplateName\}/g,_0x5d3833)[_0x16c4c2(0x104)](/\{CreatedAt\}/g,_0x11bd62)[_0x16c4c2(0x104)](/\{CreatedDate\}/g,_0x22a377)[_0x16c4c2(0x104)](/\{CreatedTime\}/g,_0x9daae2);return _0x5d844c;}static[a289_0x7a7977(0xf2)](_0x3db5ac,_0x42167c,_0x161762,_0x496e55,_0x413096,_0x327cb0,_0x5c59e3,_0x32b41f){const _0x38c8e1=a289_0x7a7977,_0x3a7eb3=new Date(),_0x246adf=_0x3a7eb3[_0x38c8e1(0xde)](),_0x25c085=_0x161762[_0x38c8e1(0xf9)](_0x90eabf=>{const _0x17f2ad=_0x38c8e1,_0x5bece4=[_0x17f2ad(0xfe)+_0x90eabf[_0x17f2ad(0xfb)]+'\x22',_0x17f2ad(0xd9)+_0x90eabf[_0x17f2ad(0x10c)]+'\x22',_0x17f2ad(0x100)+_0x90eabf[_0x17f2ad(0xcf)]+'\x22'];return _0x90eabf[_0x17f2ad(0x10f)]&&_0x5bece4[_0x17f2ad(0xd7)](_0x17f2ad(0xdc)+_0x90eabf[_0x17f2ad(0x10f)]+'\x22'),_0x17f2ad(0x10d)+_0x5bece4['join'](',\x20')+_0x17f2ad(0xfc);})['join'](''),_0x3614f4=_0x496e55||_0x161762[0x0]?.[_0x38c8e1(0x10f)]||_0x38c8e1(0xe8);let _0x2456fe=_0x3db5ac['replace'](/\{AppCode\}/g,_0x42167c)['replace'](/\{ModelConfigs\}/g,_0x25c085)[_0x38c8e1(0x104)](/\{ExampleModelName\}/g,_0x3614f4)[_0x38c8e1(0x104)](/\{ApiFileName\}/g,_0x413096||'api')[_0x38c8e1(0x104)](/\{ConfigName\}/g,_0x327cb0||_0x38c8e1(0xf6))[_0x38c8e1(0x104)](/\{ClientConfigParam\}/g,_0x5c59e3||'')[_0x38c8e1(0x104)](/\{VarPrefix\}/g,_0x32b41f||_0x38c8e1(0xe0))[_0x38c8e1(0x104)](/\{CreatedAt\}/g,_0x246adf);return _0x2456fe;}static async[a289_0x7a7977(0xcd)](_0xbd1faf,_0x1c9528,_0x597442,_0x554c7c,_0x4ed87d=!![]){const _0x13efc5=a289_0x7a7977,_0x1ac52a=Date['now']();try{_0x4ed87d&&logger['info'](_0x13efc5(0xd5),_0x13efc5(0xf0),{'templatePath':_0xbd1faf,'targetPath':_0x1c9528,'pageName':_0x597442,'templateName':_0x554c7c});await a289_0x153312[_0x13efc5(0x105)][_0x13efc5(0xd1)](_0x1c9528,{'recursive':!![]}),await this[_0x13efc5(0xd6)](_0xbd1faf,_0x1c9528,_0x597442,_0x554c7c);if(_0x4ed87d){const _0x5e602e=Date[_0x13efc5(0xd8)]()-_0x1ac52a;logger[_0x13efc5(0x10a)](_0x13efc5(0xd5),_0x13efc5(0xe6),_0x5e602e,{'pageName':_0x597442,'templateName':_0x554c7c});}}catch(_0x2c153e){if(_0x4ed87d){const _0x3b9a20=Date[_0x13efc5(0xd8)]()-_0x1ac52a;logger['error'](_0x13efc5(0xd5),'模板内容替换失败',{'templatePath':_0xbd1faf,'targetPath':_0x1c9528,'pageName':_0x597442,'templateName':_0x554c7c,'error':_0x2c153e instanceof Error?_0x2c153e[_0x13efc5(0xf5)]:String(_0x2c153e),'duration':_0x3b9a20});}throw _0x2c153e;}}static async[a289_0x7a7977(0xd6)](_0x3ff8eb,_0x55ead9,_0xc8ba24,_0x352464){const _0x43c55b=a289_0x7a7977,_0x4baf41=await a289_0x153312['promises'][_0x43c55b(0x103)](_0x3ff8eb,{'withFileTypes':!![]});for(const _0x3fc74d of _0x4baf41){const _0x5e0001=a289_0x3f225f[_0x43c55b(0xee)](_0x3ff8eb,_0x3fc74d[_0x43c55b(0xcf)]);let _0x4aaccb=a289_0x3f225f['join'](_0x55ead9,_0x3fc74d[_0x43c55b(0xcf)]);_0x3fc74d[_0x43c55b(0xcf)]['endsWith'](_0x43c55b(0xf7))&&(_0x4aaccb=a289_0x3f225f[_0x43c55b(0xee)](_0x55ead9,_0x3fc74d[_0x43c55b(0xcf)][_0x43c55b(0x104)](/\.tpl$/,'')));if(_0x3fc74d[_0x43c55b(0xf1)]())await a289_0x153312['promises']['mkdir'](_0x4aaccb,{'recursive':!![]}),await this[_0x43c55b(0xd6)](_0x5e0001,_0x4aaccb,_0xc8ba24,_0x352464);else _0x3fc74d[_0x43c55b(0xe1)]()&&await this[_0x43c55b(0x106)](_0x5e0001,_0x4aaccb,_0xc8ba24,_0x352464);}}static async[a289_0x7a7977(0x106)](_0x5dea29,_0x404f58,_0x10ca81,_0x52c9ad){const _0x7222ce=a289_0x7a7977,_0x58ef37=a289_0x3f225f['extname'](_0x5dea29)['toLowerCase']();_0x5dea29[_0x7222ce(0xe5)](_0x7222ce(0xf7))&&(_0x404f58=_0x404f58['replace'](/\.tpl$/,''));const _0x2d76d8=[_0x7222ce(0x10b),_0x7222ce(0xca),'.jsx','.js',_0x7222ce(0xf3),_0x7222ce(0x108),_0x7222ce(0xea),_0x7222ce(0xdf),_0x7222ce(0xf7)];if(_0x2d76d8['includes'](_0x58ef37)||_0x5dea29[_0x7222ce(0xe5)](_0x7222ce(0xf7))){const _0x2c2fc3=await a289_0x153312['promises']['readFile'](_0x5dea29,_0x7222ce(0x107)),_0x3aee9f=this[_0x7222ce(0xff)](_0x2c2fc3,_0x10ca81,_0x52c9ad);await a289_0x153312[_0x7222ce(0x105)][_0x7222ce(0xf8)](_0x404f58,_0x3aee9f,'utf8');}else await a289_0x153312[_0x7222ce(0x105)][_0x7222ce(0x10e)](_0x5dea29,_0x404f58);}}
1
+ const a296_0x57b255=a296_0x5694;(function(_0x86522d,_0x2f4978){const _0x58316c=a296_0x5694,_0x597749=_0x86522d();while(!![]){try{const _0x342da6=parseInt(_0x58316c(0x1a0))/0x1*(parseInt(_0x58316c(0x199))/0x2)+-parseInt(_0x58316c(0x1c1))/0x3+-parseInt(_0x58316c(0x1ba))/0x4*(-parseInt(_0x58316c(0x194))/0x5)+-parseInt(_0x58316c(0x1b8))/0x6*(parseInt(_0x58316c(0x1a3))/0x7)+parseInt(_0x58316c(0x1a4))/0x8+parseInt(_0x58316c(0x1a5))/0x9*(-parseInt(_0x58316c(0x1ca))/0xa)+parseInt(_0x58316c(0x1c2))/0xb;if(_0x342da6===_0x2f4978)break;else _0x597749['push'](_0x597749['shift']());}catch(_0xa822d4){_0x597749['push'](_0x597749['shift']());}}}(a296_0x3cb5,0xdaaf7));import a296_0x15a3c1 from'node:fs';import a296_0x4021bf from'node:path';import{logger}from'../utils/logger.js';function a296_0x5694(_0x1a0435,_0x59e030){_0x1a0435=_0x1a0435-0x18c;const _0x3cb58a=a296_0x3cb5();let _0x56948f=_0x3cb58a[_0x1a0435];return _0x56948f;}function a296_0x3cb5(){const _0x4eae1f=['alias','7mtUkpS','processDirectory','getSeconds','7qdoCEd','3222344ycGTne','6245361drhbuW','processTemplate','isFile','pad','endsWith','promises','toComponentName','message','info','getFullYear','writeFile','datasetCode','.tpl','toLowerCase','map','utf8','.jsx','replaceApiContent','mkdir','10153974QdsqTv','push','1077980CHxNNd','slice','readFile','.css','\x0a\x20\x20\x20\x20{\x20','readdir','isDirectory','1511718KiaXBi','27214077WvaBxY','default','toUpperCase','processFile','getMinutes','.js','toDisplayTitle','LOVRABET','10xKWsmn','replaceContent','.scss','error','.ts','name:\x20\x22','split','.tsx','formatLocalTimestamp','datasetCode:\x20\x22','.md','includes','开始处理模板内容替换','toISOString','charAt','copyFile','getDate','replace','5xQBYsm','pop','模板内容替换失败','success','now','182744Oqudgy','name','template','tableName:\x20\x22','.json','join'];a296_0x3cb5=function(){return _0x4eae1f;};return a296_0x3cb5();}import{getCliVersion}from'../utils/version.js';const CLI_VERSION=getCliVersion();export class TemplateReplacer{static[a296_0x57b255(0x1a8)](_0x27d7df){return String(_0x27d7df)['padStart'](0x2,'0');}static[a296_0x57b255(0x1d2)](_0x50699e){const _0x5e54f1=a296_0x57b255,_0x31d430=_0x50699e[_0x5e54f1(0x1ae)](),_0x11bc9f=this[_0x5e54f1(0x1a8)](_0x50699e['getMonth']()+0x1),_0x1d47c5=this[_0x5e54f1(0x1a8)](_0x50699e[_0x5e54f1(0x192)]()),_0x223c6b=this['pad'](_0x50699e['getHours']()),_0x7c7217=this[_0x5e54f1(0x1a8)](_0x50699e[_0x5e54f1(0x1c6)]()),_0x1d29b9=this[_0x5e54f1(0x1a8)](_0x50699e[_0x5e54f1(0x1a2)]());return{'createdAt':_0x31d430+'-'+_0x11bc9f+'-'+_0x1d47c5+'\x20'+_0x223c6b+':'+_0x7c7217+':'+_0x1d29b9,'createdDate':_0x31d430+'-'+_0x11bc9f+'-'+_0x1d47c5,'createdTime':_0x223c6b+':'+_0x7c7217+':'+_0x1d29b9};}static[a296_0x57b255(0x1ab)](_0xbdeb){const _0xbadade=a296_0x57b255,_0x5dd7a7=_0xbdeb['split']('/')[_0xbadade(0x195)]()||_0xbdeb;return _0x5dd7a7[_0xbadade(0x1d0)]('-')[_0xbadade(0x1b3)](_0x2614e8=>_0x2614e8[_0xbadade(0x190)](0x0)[_0xbadade(0x1c4)]()+_0x2614e8[_0xbadade(0x1bb)](0x1)['toLowerCase']())[_0xbadade(0x19e)]('');}static[a296_0x57b255(0x1c8)](_0x3bafbc){const _0x22a183=a296_0x57b255,_0x42e2a0=_0x3bafbc[_0x22a183(0x1d0)]('/')[_0x22a183(0x195)]()||_0x3bafbc;return _0x42e2a0[_0x22a183(0x1d0)]('-')[_0x22a183(0x1b3)](_0x23fabd=>_0x23fabd[_0x22a183(0x190)](0x0)[_0x22a183(0x1c4)]()+_0x23fabd[_0x22a183(0x1bb)](0x1)[_0x22a183(0x1b2)]())[_0x22a183(0x19e)]('\x20');}static[a296_0x57b255(0x1cb)](_0x17e37f,_0x353e9f,_0x12d40a){const _0x55ef63=a296_0x57b255,_0x4beba6=this[_0x55ef63(0x1ab)](_0x353e9f),_0x548fc0=this[_0x55ef63(0x1c8)](_0x353e9f),{createdAt:_0xb4924e,createdDate:_0x3013de,createdTime:_0x24f3a5}=this['formatLocalTimestamp'](new Date());let _0x39a87b=_0x17e37f['replace'](/\{CliVersion\}/g,CLI_VERSION)['replace'](/\{ComponentName\}/g,_0x4beba6)['replace'](/\{DisplayTitle\}/g,_0x548fc0)['replace'](/\{PageName\}/g,_0x353e9f)['replace'](/\{TemplateName\}/g,_0x12d40a)['replace'](/\{CreatedAt\}/g,_0xb4924e)[_0x55ef63(0x193)](/\{CreatedDate\}/g,_0x3013de)[_0x55ef63(0x193)](/\{CreatedTime\}/g,_0x24f3a5);return _0x39a87b;}static[a296_0x57b255(0x1b6)](_0x32d310,_0x3bc305,_0x49a8f3,_0x5f535b,_0x4934ef,_0x457ad1,_0x16c117,_0x469d8f){const _0x2ecb6a=a296_0x57b255,_0x5b77cd=new Date(),_0x3d2789=_0x5b77cd[_0x2ecb6a(0x18f)](),_0x5061e9=_0x49a8f3[_0x2ecb6a(0x1b3)](_0x5cc5f9=>{const _0x4d59d0=_0x2ecb6a,_0x139c50=[_0x4d59d0(0x1d3)+_0x5cc5f9[_0x4d59d0(0x1b0)]+'\x22',_0x4d59d0(0x19c)+_0x5cc5f9['tableName']+'\x22',_0x4d59d0(0x1cf)+_0x5cc5f9[_0x4d59d0(0x19a)]+'\x22'];return _0x5cc5f9['alias']&&_0x139c50[_0x4d59d0(0x1b9)]('alias:\x20\x22'+_0x5cc5f9[_0x4d59d0(0x19f)]+'\x22'),_0x4d59d0(0x1be)+_0x139c50[_0x4d59d0(0x19e)](',\x20')+'\x20},';})[_0x2ecb6a(0x19e)](''),_0x11e67e=_0x5f535b||_0x49a8f3[0x0]?.[_0x2ecb6a(0x19f)]||'YourModel';let _0x20b62e=_0x32d310[_0x2ecb6a(0x193)](/\{AppCode\}/g,_0x3bc305)[_0x2ecb6a(0x193)](/\{ModelConfigs\}/g,_0x5061e9)['replace'](/\{ExampleModelName\}/g,_0x11e67e)[_0x2ecb6a(0x193)](/\{ApiFileName\}/g,_0x4934ef||'api')[_0x2ecb6a(0x193)](/\{ConfigName\}/g,_0x457ad1||_0x2ecb6a(0x1c3))['replace'](/\{ClientConfigParam\}/g,_0x16c117||'')[_0x2ecb6a(0x193)](/\{VarPrefix\}/g,_0x469d8f||_0x2ecb6a(0x1c9))['replace'](/\{CreatedAt\}/g,_0x3d2789);return _0x20b62e;}static async[a296_0x57b255(0x1a6)](_0x392799,_0x4ab714,_0x276af6,_0x1e3cbd,_0x5d2049=!![]){const _0x374ae4=a296_0x57b255,_0x3e417b=Date[_0x374ae4(0x198)]();try{_0x5d2049&&logger[_0x374ae4(0x1ad)]('template',_0x374ae4(0x18e),{'templatePath':_0x392799,'targetPath':_0x4ab714,'pageName':_0x276af6,'templateName':_0x1e3cbd});await a296_0x15a3c1['promises'][_0x374ae4(0x1b7)](_0x4ab714,{'recursive':!![]}),await this[_0x374ae4(0x1a1)](_0x392799,_0x4ab714,_0x276af6,_0x1e3cbd);if(_0x5d2049){const _0x1f7167=Date[_0x374ae4(0x198)]()-_0x3e417b;logger[_0x374ae4(0x197)]('template','模板内容替换完成',_0x1f7167,{'pageName':_0x276af6,'templateName':_0x1e3cbd});}}catch(_0xf7817f){if(_0x5d2049){const _0x212cd1=Date['now']()-_0x3e417b;logger[_0x374ae4(0x1cd)](_0x374ae4(0x19b),_0x374ae4(0x196),{'templatePath':_0x392799,'targetPath':_0x4ab714,'pageName':_0x276af6,'templateName':_0x1e3cbd,'error':_0xf7817f instanceof Error?_0xf7817f[_0x374ae4(0x1ac)]:String(_0xf7817f),'duration':_0x212cd1});}throw _0xf7817f;}}static async[a296_0x57b255(0x1a1)](_0x385094,_0x4705ed,_0x1419e6,_0x23bbb6){const _0x547bc3=a296_0x57b255,_0x315078=await a296_0x15a3c1[_0x547bc3(0x1aa)][_0x547bc3(0x1bf)](_0x385094,{'withFileTypes':!![]});for(const _0x56dfda of _0x315078){const _0x20e2c5=a296_0x4021bf['join'](_0x385094,_0x56dfda[_0x547bc3(0x19a)]);let _0x26f638=a296_0x4021bf[_0x547bc3(0x19e)](_0x4705ed,_0x56dfda[_0x547bc3(0x19a)]);_0x56dfda['name'][_0x547bc3(0x1a9)](_0x547bc3(0x1b1))&&(_0x26f638=a296_0x4021bf['join'](_0x4705ed,_0x56dfda[_0x547bc3(0x19a)][_0x547bc3(0x193)](/\.tpl$/,'')));if(_0x56dfda[_0x547bc3(0x1c0)]())await a296_0x15a3c1[_0x547bc3(0x1aa)]['mkdir'](_0x26f638,{'recursive':!![]}),await this[_0x547bc3(0x1a1)](_0x20e2c5,_0x26f638,_0x1419e6,_0x23bbb6);else _0x56dfda[_0x547bc3(0x1a7)]()&&await this[_0x547bc3(0x1c5)](_0x20e2c5,_0x26f638,_0x1419e6,_0x23bbb6);}}static async[a296_0x57b255(0x1c5)](_0x339b12,_0x218083,_0x2e94e5,_0xe03c0f){const _0x59843f=a296_0x57b255,_0x50af95=a296_0x4021bf['extname'](_0x339b12)[_0x59843f(0x1b2)]();_0x339b12['endsWith'](_0x59843f(0x1b1))&&(_0x218083=_0x218083[_0x59843f(0x193)](/\.tpl$/,''));const _0x4e538d=[_0x59843f(0x1d1),_0x59843f(0x1ce),_0x59843f(0x1b5),_0x59843f(0x1c7),_0x59843f(0x19d),_0x59843f(0x18c),_0x59843f(0x1bd),_0x59843f(0x1cc),_0x59843f(0x1b1)];if(_0x4e538d[_0x59843f(0x18d)](_0x50af95)||_0x339b12[_0x59843f(0x1a9)](_0x59843f(0x1b1))){const _0x1c5fac=await a296_0x15a3c1['promises'][_0x59843f(0x1bc)](_0x339b12,_0x59843f(0x1b4)),_0x2f7a58=this[_0x59843f(0x1cb)](_0x1c5fac,_0x2e94e5,_0xe03c0f);await a296_0x15a3c1[_0x59843f(0x1aa)][_0x59843f(0x1af)](_0x218083,_0x2f7a58,_0x59843f(0x1b4));}else await a296_0x15a3c1['promises'][_0x59843f(0x191)](_0x339b12,_0x218083);}}
@@ -1 +1 @@
1
- (function(_0x54f5b0,_0x4332b7){const _0x517230=a290_0x4f66,_0x7f457=_0x54f5b0();while(!![]){try{const _0x1d3ffb=-parseInt(_0x517230(0x1d6))/0x1*(-parseInt(_0x517230(0x1d9))/0x2)+-parseInt(_0x517230(0x1d1))/0x3*(-parseInt(_0x517230(0x1da))/0x4)+parseInt(_0x517230(0x1dc))/0x5*(parseInt(_0x517230(0x1d8))/0x6)+-parseInt(_0x517230(0x1e0))/0x7*(parseInt(_0x517230(0x1ec))/0x8)+parseInt(_0x517230(0x1e2))/0x9*(-parseInt(_0x517230(0x1d2))/0xa)+-parseInt(_0x517230(0x1d4))/0xb*(parseInt(_0x517230(0x1dd))/0xc)+parseInt(_0x517230(0x1d3))/0xd;if(_0x1d3ffb===_0x4332b7)break;else _0x7f457['push'](_0x7f457['shift']());}catch(_0x47cded){_0x7f457['push'](_0x7f457['shift']());}}}(a290_0xa7e7,0x76640));import{mkdir,readFile,writeFile}from'node:fs/promises';import{homedir}from'node:os';import{dirname,join}from'node:path';import a290_0x554b3b from'semver';import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';import{getCliVersionPolicy}from'../utils/cli-version-policy.js';function a290_0x4f66(_0x391045,_0x14b383){_0x391045=_0x391045-0x1cc;const _0xa7e721=a290_0xa7e7();let _0x4f6624=_0xa7e721[_0x391045];return _0x4f6624;}function a290_0xa7e7(){const _0x45461a=['2PBiUSx','3692yxtrwg','object','712945dlZptb','12EfRANq','true','rabetbase-cli','7QcPRZE','trim','15174DEPQUx','valid','yes','now','/v/','checkedAt','parse','utf8','gte','lastNotifiedAt','6081832ohZBmt','toLowerCase','stableVersion','\x20available,\x20current\x20','https://www.npmjs.com/package/','stringify','number','lastNotifiedVersion','1731hfSHyd','4670OxAlFq','27348035BuDoSP','8862865ZSSaRe','\x20update','59379WxsHjD','latest','6BgMJmC'];a290_0xa7e7=function(){return _0x45461a;};return a290_0xa7e7();}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 _0x11616c=a290_0x4f66,_0x508200=process.env.RABETBASE_NO_UPDATE_NOTICE?.['trim']()[_0x11616c(0x1ed)]();return _0x508200==='1'||_0x508200===_0x11616c(0x1de)||_0x508200===_0x11616c(0x1e4);}function cacheRoot(){return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),'.cache');}export function getUpdateNoticeCachePath(){const _0x43d93f=a290_0x4f66;return join(cacheRoot(),_0x43d93f(0x1df),'update-check.json');}async function readUpdateNoticeCache(){const _0x4f504d=a290_0x4f66;try{const _0x316644=await readFile(getUpdateNoticeCachePath(),_0x4f504d(0x1e9)),_0x1ae83f=JSON[_0x4f504d(0x1e8)](_0x316644);if(!_0x1ae83f||typeof _0x1ae83f!==_0x4f504d(0x1db))return{};return _0x1ae83f;}catch{return{};}}async function writeUpdateNoticeCache(_0x41b82e){const _0x5abe14=a290_0x4f66;try{const _0x3398a8=getUpdateNoticeCachePath();await mkdir(dirname(_0x3398a8),{'recursive':!![]}),await writeFile(_0x3398a8,JSON[_0x5abe14(0x1ce)](_0x41b82e,null,0x2)+'\x0a',_0x5abe14(0x1e9));}catch{}}function isFreshCheck(_0x1184dd,_0x4c58f5){const _0x141816=a290_0x4f66;return typeof _0x1184dd['checkedAt']===_0x141816(0x1cf)&&_0x4c58f5-_0x1184dd[_0x141816(0x1e7)]<UPDATE_CHECK_TTL_MS;}function isRecentlyNotified(_0x53a1ea,_0x4788f5,_0x241203){const _0x276a1b=a290_0x4f66;return _0x53a1ea[_0x276a1b(0x1d0)]===_0x4788f5&&typeof _0x53a1ea[_0x276a1b(0x1eb)]==='number'&&_0x241203-_0x53a1ea[_0x276a1b(0x1eb)]<UPDATE_NOTICE_TTL_MS;}export function buildNpmVersionUrl(_0xb79769){const _0xb56d00=a290_0x4f66;return _0xb56d00(0x1cd)+NPM_PACKAGE_NAME+_0xb56d00(0x1e6)+_0xb79769;}export async function resolveLatestUpdateNotice(){const _0x57f78d=a290_0x4f66;if(isUpdateNoticeDisabled())return null;try{const _0x50191e=Date[_0x57f78d(0x1e5)](),_0x34eeee=getCliVersion(),_0x59cf4f=await readUpdateNoticeCache();let _0x5efe0f=isFreshCheck(_0x59cf4f,_0x50191e)?_0x59cf4f[_0x57f78d(0x1d7)]?.[_0x57f78d(0x1e1)]():undefined;if(!_0x5efe0f&&!isFreshCheck(_0x59cf4f,_0x50191e)){const _0x10a3ec=await getCliVersionPolicy();_0x5efe0f=_0x10a3ec?.[_0x57f78d(0x1ee)]?.['trim']()||undefined,await writeUpdateNoticeCache({..._0x59cf4f,'checkedAt':_0x50191e,'latest':_0x5efe0f,'failed':!_0x5efe0f});}if(!_0x5efe0f||!a290_0x554b3b[_0x57f78d(0x1e3)](_0x34eeee)||!a290_0x554b3b[_0x57f78d(0x1e3)](_0x5efe0f))return null;if(a290_0x554b3b[_0x57f78d(0x1ea)](_0x34eeee,_0x5efe0f))return null;if(isRecentlyNotified(_0x59cf4f,_0x5efe0f,_0x50191e))return null;const _0x531271=CLI_BIN_NAME+_0x57f78d(0x1d5);return await writeUpdateNoticeCache({..._0x59cf4f,'checkedAt':isFreshCheck(_0x59cf4f,_0x50191e)?_0x59cf4f[_0x57f78d(0x1e7)]:_0x50191e,'latest':_0x5efe0f,'failed':![],'lastNotifiedVersion':_0x5efe0f,'lastNotifiedAt':_0x50191e}),{'command':_0x531271,'current':_0x34eeee,'latest':_0x5efe0f,'url':buildNpmVersionUrl(_0x5efe0f),'message':CLI_BIN_NAME+'\x20'+_0x5efe0f+_0x57f78d(0x1cc)+_0x34eeee+',\x20run:\x20'+_0x531271};}catch{return null;}}
1
+ function a297_0x5ca6(_0x3138b9,_0x4caa0c){_0x3138b9=_0x3138b9-0x173;const _0x519eab=a297_0x519e();let _0x5ca623=_0x519eab[_0x3138b9];return _0x5ca623;}(function(_0xcb97e3,_0xf52a06){const _0x77de4d=a297_0x5ca6,_0x151f38=_0xcb97e3();while(!![]){try{const _0x3bd0ac=parseInt(_0x77de4d(0x187))/0x1+-parseInt(_0x77de4d(0x190))/0x2*(parseInt(_0x77de4d(0x18b))/0x3)+-parseInt(_0x77de4d(0x179))/0x4*(parseInt(_0x77de4d(0x17a))/0x5)+-parseInt(_0x77de4d(0x18f))/0x6*(-parseInt(_0x77de4d(0x18d))/0x7)+-parseInt(_0x77de4d(0x186))/0x8*(-parseInt(_0x77de4d(0x17b))/0x9)+-parseInt(_0x77de4d(0x180))/0xa*(-parseInt(_0x77de4d(0x176))/0xb)+parseInt(_0x77de4d(0x183))/0xc*(-parseInt(_0x77de4d(0x182))/0xd);if(_0x3bd0ac===_0xf52a06)break;else _0x151f38['push'](_0x151f38['shift']());}catch(_0x126123){_0x151f38['push'](_0x151f38['shift']());}}}(a297_0x519e,0xb2a1c));function a297_0x519e(){const _0x112bb7=['https://www.npmjs.com/package/','true','number','4829TDckTi','valid','object','92xXTFJN','116485lajiAu','18cvNjzd','now','checkedAt','update-check.json','rabetbase-cli','28680LDSFjY','stableVersion','922493XYRRsn','156XQJrTX','yes','toLowerCase','2361616eQIVRT','1096515zOKxhu','latest','trim',',\x20run:\x20','12whITgI','lastNotifiedVersion','480039YiQDaP','parse','30zhZTYW','549428PmzcOT','lastNotifiedAt','\x20available,\x20current\x20','stringify','utf8','/v/'];a297_0x519e=function(){return _0x112bb7;};return a297_0x519e();}import{mkdir,readFile,writeFile}from'node:fs/promises';import{homedir}from'node:os';import{dirname,join}from'node:path';import a297_0x48fda4 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 _0x519ebd=a297_0x5ca6,_0x8583ca=process.env.RABETBASE_NO_UPDATE_NOTICE?.[_0x519ebd(0x189)]()[_0x519ebd(0x185)]();return _0x8583ca==='1'||_0x8583ca===_0x519ebd(0x174)||_0x8583ca===_0x519ebd(0x184);}function cacheRoot(){return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),'.cache');}export function getUpdateNoticeCachePath(){const _0xd4d537=a297_0x5ca6;return join(cacheRoot(),_0xd4d537(0x17f),_0xd4d537(0x17e));}async function readUpdateNoticeCache(){const _0x93ec0a=a297_0x5ca6;try{const _0x199f2f=await readFile(getUpdateNoticeCachePath(),_0x93ec0a(0x194)),_0x4afe4d=JSON[_0x93ec0a(0x18e)](_0x199f2f);if(!_0x4afe4d||typeof _0x4afe4d!==_0x93ec0a(0x178))return{};return _0x4afe4d;}catch{return{};}}async function writeUpdateNoticeCache(_0x2d54ca){const _0x377d17=a297_0x5ca6;try{const _0x2a6adb=getUpdateNoticeCachePath();await mkdir(dirname(_0x2a6adb),{'recursive':!![]}),await writeFile(_0x2a6adb,JSON[_0x377d17(0x193)](_0x2d54ca,null,0x2)+'\x0a',_0x377d17(0x194));}catch{}}function isFreshCheck(_0x113b3b,_0x3cc282){const _0x1ffb93=a297_0x5ca6;return typeof _0x113b3b[_0x1ffb93(0x17d)]===_0x1ffb93(0x175)&&_0x3cc282-_0x113b3b[_0x1ffb93(0x17d)]<UPDATE_CHECK_TTL_MS;}function isRecentlyNotified(_0x25b82b,_0x55ceef,_0x26bc9d){const _0x2909d7=a297_0x5ca6;return _0x25b82b[_0x2909d7(0x18c)]===_0x55ceef&&typeof _0x25b82b[_0x2909d7(0x191)]===_0x2909d7(0x175)&&_0x26bc9d-_0x25b82b[_0x2909d7(0x191)]<UPDATE_NOTICE_TTL_MS;}export function buildNpmVersionUrl(_0x5e6ffe){const _0x1854a7=a297_0x5ca6;return _0x1854a7(0x173)+NPM_PACKAGE_NAME+_0x1854a7(0x195)+_0x5e6ffe;}export async function resolveLatestUpdateNotice(){const _0x9ad8e7=a297_0x5ca6;if(isUpdateNoticeDisabled())return null;try{const _0x5b6ab2=Date[_0x9ad8e7(0x17c)](),_0x42ec44=getCliVersion(),_0x38b28f=await readUpdateNoticeCache();let _0x5ce99a=isFreshCheck(_0x38b28f,_0x5b6ab2)?_0x38b28f[_0x9ad8e7(0x188)]?.[_0x9ad8e7(0x189)]():undefined;if(!_0x5ce99a&&!isFreshCheck(_0x38b28f,_0x5b6ab2)){const _0x482418=await getCliVersionPolicy();_0x5ce99a=_0x482418?.[_0x9ad8e7(0x181)]?.[_0x9ad8e7(0x189)]()||undefined,await writeUpdateNoticeCache({..._0x38b28f,'checkedAt':_0x5b6ab2,'latest':_0x5ce99a,'failed':!_0x5ce99a});}if(!_0x5ce99a||!a297_0x48fda4[_0x9ad8e7(0x177)](_0x42ec44)||!a297_0x48fda4[_0x9ad8e7(0x177)](_0x5ce99a))return null;if(a297_0x48fda4['gte'](_0x42ec44,_0x5ce99a))return null;if(isRecentlyNotified(_0x38b28f,_0x5ce99a,_0x5b6ab2))return null;const _0x142a4c=CLI_BIN_NAME+'\x20update';return await writeUpdateNoticeCache({..._0x38b28f,'checkedAt':isFreshCheck(_0x38b28f,_0x5b6ab2)?_0x38b28f[_0x9ad8e7(0x17d)]:_0x5b6ab2,'latest':_0x5ce99a,'failed':![],'lastNotifiedVersion':_0x5ce99a,'lastNotifiedAt':_0x5b6ab2}),{'command':_0x142a4c,'current':_0x42ec44,'latest':_0x5ce99a,'url':buildNpmVersionUrl(_0x5ce99a),'message':CLI_BIN_NAME+'\x20'+_0x5ce99a+_0x9ad8e7(0x192)+_0x42ec44+_0x9ad8e7(0x18a)+_0x142a4c};}catch{return null;}}
@@ -1 +1 @@
1
- function a291_0x53e6(){var _0xca74af=['1041754pCtzlb','17526303RoKwEo','1122848lgNPuJ','7305bGXYDl','18QDfAhY','22153SxtzFQ','1959192SciYmS','1765440SiERag','556aRXToM'];a291_0x53e6=function(){return _0xca74af;};return a291_0x53e6();}(function(_0xdb1169,_0xb9f58a){var _0x447929=a291_0x17f1,_0x5bc1e7=_0xdb1169();while(!![]){try{var _0x5695af=parseInt(_0x447929(0xb5))/0x1*(-parseInt(_0x447929(0xb4))/0x2)+-parseInt(_0x447929(0xb7))/0x3+parseInt(_0x447929(0xb8))/0x4*(-parseInt(_0x447929(0xb3))/0x5)+-parseInt(_0x447929(0xb6))/0x6+-parseInt(_0x447929(0xb9))/0x7+-parseInt(_0x447929(0xb2))/0x8+parseInt(_0x447929(0xb1))/0x9;if(_0x5695af===_0xb9f58a)break;else _0x5bc1e7['push'](_0x5bc1e7['shift']());}catch(_0x434d50){_0x5bc1e7['push'](_0x5bc1e7['shift']());}}}(a291_0x53e6,0x532f1));function a291_0x17f1(_0x2748d1,_0xd6c18f){_0x2748d1=_0x2748d1-0xb1;var _0x53e61c=a291_0x53e6();var _0x17f12a=_0x53e61c[_0x2748d1];return _0x17f12a;}import{VERSION}from'../generated/build-info.js';export function getCliVersion(){return VERSION;}
1
+ function a298_0x50b3(_0x3b7b86,_0x2424ff){_0x3b7b86=_0x3b7b86-0x94;var _0x55c761=a298_0x55c7();var _0x50b32d=_0x55c761[_0x3b7b86];return _0x50b32d;}(function(_0x15df15,_0x246201){var _0x990b14=a298_0x50b3,_0x451865=_0x15df15();while(!![]){try{var _0x4ed8c8=-parseInt(_0x990b14(0x97))/0x1+parseInt(_0x990b14(0x9b))/0x2+parseInt(_0x990b14(0x9a))/0x3+parseInt(_0x990b14(0x94))/0x4+-parseInt(_0x990b14(0x95))/0x5+parseInt(_0x990b14(0x98))/0x6*(parseInt(_0x990b14(0x96))/0x7)+parseInt(_0x990b14(0x99))/0x8;if(_0x4ed8c8===_0x246201)break;else _0x451865['push'](_0x451865['shift']());}catch(_0x954daf){_0x451865['push'](_0x451865['shift']());}}}(a298_0x55c7,0xd8497));import{VERSION}from'../generated/build-info.js';function a298_0x55c7(){var _0xaa5e3d=['1810938blaYZA','664836zXLNmn','1725684BRxNpf','3750170VAZrjL','7fRhdkc','592296VmhRZt','4374522MOwblL','1053352ljMCTg'];a298_0x55c7=function(){return _0xaa5e3d;};return a298_0x55c7();}export function getCliVersion(){return VERSION;}