@lovrabet/rabetbase-cli 2.5.1-beta.5 → 2.5.1

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 (319) 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/api/generate-sdk-config-file.js +1 -1
  5. package/lib/auth/auth-server-ui.js +1 -1
  6. package/lib/auth/auth-server.js +1 -1
  7. package/lib/auth/constant.js +1 -1
  8. package/lib/auth/get-cookie.js +1 -1
  9. package/lib/auth/get-session-user.js +1 -1
  10. package/lib/auth/is-session-valid.js +1 -1
  11. package/lib/auth/login-success-html.js +1 -1
  12. package/lib/auth/logout.js +1 -1
  13. package/lib/cli-flags.js +1 -1
  14. package/lib/cli.js +1 -1
  15. package/lib/commands/api/generate.js +1 -1
  16. package/lib/commands/api/index.js +1 -1
  17. package/lib/commands/api/list.js +1 -1
  18. package/lib/commands/api/pull.js +1 -1
  19. package/lib/commands/api/shared.js +1 -1
  20. package/lib/commands/app/index.js +1 -1
  21. package/lib/commands/app/list.js +1 -1
  22. package/lib/commands/app/members-list.js +1 -1
  23. package/lib/commands/app/remote-directory.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app-config/delete.js +1 -1
  26. package/lib/commands/app-config/get.js +1 -1
  27. package/lib/commands/app-config/index.js +1 -1
  28. package/lib/commands/app-config/list.js +1 -1
  29. package/lib/commands/app-config/set.js +1 -1
  30. package/lib/commands/app-config/shared.js +1 -1
  31. package/lib/commands/auth/index.js +1 -1
  32. package/lib/commands/bff/create.js +1 -1
  33. package/lib/commands/bff/delete.js +1 -1
  34. package/lib/commands/bff/detail.js +1 -1
  35. package/lib/commands/bff/index.js +1 -1
  36. package/lib/commands/bff/list.js +1 -1
  37. package/lib/commands/bff/pull.js +1 -1
  38. package/lib/commands/bff/push.js +1 -1
  39. package/lib/commands/bff/status.js +1 -1
  40. package/lib/commands/cli-skill/index.js +1 -1
  41. package/lib/commands/cli-update.js +1 -1
  42. package/lib/commands/codegen/index.js +1 -1
  43. package/lib/commands/codegen/sdk.js +1 -1
  44. package/lib/commands/codegen/sql.js +1 -1
  45. package/lib/commands/common/app-registry.js +1 -1
  46. package/lib/commands/common/app-selector.js +1 -1
  47. package/lib/commands/common/async-task.js +1 -1
  48. package/lib/commands/common/dry-run.js +1 -1
  49. package/lib/commands/common/flags.js +1 -1
  50. package/lib/commands/common/local-file.js +1 -1
  51. package/lib/commands/common/validate.js +1 -1
  52. package/lib/commands/config/delete.js +1 -1
  53. package/lib/commands/config/get.js +1 -1
  54. package/lib/commands/config/index.js +1 -1
  55. package/lib/commands/config/init.js +1 -1
  56. package/lib/commands/config/list.js +1 -1
  57. package/lib/commands/config/set.js +1 -1
  58. package/lib/commands/config/shared.js +1 -1
  59. package/lib/commands/dataset/business-group-update.js +1 -1
  60. package/lib/commands/dataset/business-groups.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-restore.js +1 -1
  66. package/lib/commands/dataset/field-update.js +1 -1
  67. package/lib/commands/dataset/generate.js +1 -1
  68. package/lib/commands/dataset/index.js +1 -1
  69. package/lib/commands/dataset/list.js +1 -1
  70. package/lib/commands/dataset/operations.js +1 -1
  71. package/lib/commands/dataset/relation-audit.js +1 -1
  72. package/lib/commands/dataset/relation-create.js +1 -1
  73. package/lib/commands/dataset/relation-delete.js +1 -1
  74. package/lib/commands/dataset/relation-shared.js +1 -1
  75. package/lib/commands/dataset/relation-update.js +1 -1
  76. package/lib/commands/dataset/relations.js +1 -1
  77. package/lib/commands/dataset/rename.js +1 -1
  78. package/lib/commands/dataset/restore.js +1 -1
  79. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  80. package/lib/commands/db/analysis-batching.js +1 -1
  81. package/lib/commands/db/analyze-batch-plan.js +1 -1
  82. package/lib/commands/db/analyze-cancel.js +1 -1
  83. package/lib/commands/db/analyze-start.js +1 -1
  84. package/lib/commands/db/analyze-status.js +1 -1
  85. package/lib/commands/db/create.js +1 -1
  86. package/lib/commands/db/delete.js +1 -1
  87. package/lib/commands/db/detail.js +1 -1
  88. package/lib/commands/db/diff-refresh-start.js +1 -1
  89. package/lib/commands/db/diff-refresh-status.js +1 -1
  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/table-diff-shared.js +1 -1
  95. package/lib/commands/db/tables.js +1 -1
  96. package/lib/commands/db/test.js +1 -1
  97. package/lib/commands/db/update.js +1 -1
  98. package/lib/commands/deployment/auto-sync.js +1 -1
  99. package/lib/commands/deployment/index.js +1 -1
  100. package/lib/commands/deployment/sync.js +1 -1
  101. package/lib/commands/doctor.js +1 -1
  102. package/lib/commands/file/index.js +1 -1
  103. package/lib/commands/issue/index.js +1 -1
  104. package/lib/commands/issue/nudge.js +1 -1
  105. package/lib/commands/issue/report.js +1 -1
  106. package/lib/commands/issue/shared.js +1 -1
  107. package/lib/commands/kb/create.js +1 -1
  108. package/lib/commands/kb/delete.js +1 -1
  109. package/lib/commands/kb/detail.js +1 -1
  110. package/lib/commands/kb/index.js +1 -1
  111. package/lib/commands/kb/list.js +1 -1
  112. package/lib/commands/kb/search.js +1 -1
  113. package/lib/commands/kb/shared.js +1 -1
  114. package/lib/commands/kb/update.js +1 -1
  115. package/lib/commands/logs/index.js +1 -1
  116. package/lib/commands/menu/asset-update.js +1 -1
  117. package/lib/commands/menu/delete.js +1 -1
  118. package/lib/commands/menu/external-link-create.js +1 -1
  119. package/lib/commands/menu/external-link-update.js +1 -1
  120. package/lib/commands/menu/group-create.js +1 -1
  121. package/lib/commands/menu/group-update.js +1 -1
  122. package/lib/commands/menu/index.js +1 -1
  123. package/lib/commands/menu/list.js +1 -1
  124. package/lib/commands/menu/move.js +1 -1
  125. package/lib/commands/menu/regroup-start.js +1 -1
  126. package/lib/commands/menu/rename.js +1 -1
  127. package/lib/commands/menu/shared/compare-table.js +1 -1
  128. package/lib/commands/menu/shared/delete-plan.js +1 -1
  129. package/lib/commands/menu/shared/facts.js +1 -1
  130. package/lib/commands/menu/shared/index.js +1 -1
  131. package/lib/commands/menu/shared/inquirer.js +1 -1
  132. package/lib/commands/menu/shared/local-pages.js +1 -1
  133. package/lib/commands/menu/shared/logic.js +1 -1
  134. package/lib/commands/menu/shared/mutations.js +1 -1
  135. package/lib/commands/menu/shared/service.js +1 -1
  136. package/lib/commands/menu/shared/sync-core.js +1 -1
  137. package/lib/commands/menu/shared/update-core.js +1 -1
  138. package/lib/commands/menu/shared/valid-url.js +1 -1
  139. package/lib/commands/menu/sync.js +1 -1
  140. package/lib/commands/menu/visibility-update.js +1 -1
  141. package/lib/commands/notification/config-create.js +1 -1
  142. package/lib/commands/notification/config-delete.js +1 -1
  143. package/lib/commands/notification/config-list.js +1 -1
  144. package/lib/commands/notification/config-update.js +1 -1
  145. package/lib/commands/notification/index.js +1 -1
  146. package/lib/commands/notification/shared.js +1 -1
  147. package/lib/commands/ocr/index.js +1 -1
  148. package/lib/commands/page/create.js +1 -1
  149. package/lib/commands/page/custom/detail.js +1 -1
  150. package/lib/commands/page/custom/list.js +1 -1
  151. package/lib/commands/page/custom/publish.js +1 -1
  152. package/lib/commands/page/custom/shared.js +1 -1
  153. package/lib/commands/page/custom/syntax.js +1 -1
  154. package/lib/commands/page/custom/template.js +1 -1
  155. package/lib/commands/page/custom/update.js +1 -1
  156. package/lib/commands/page/data-list-status.js +1 -1
  157. package/lib/commands/page/generate-start.js +1 -1
  158. package/lib/commands/page/generate-status.js +1 -1
  159. package/lib/commands/page/index.js +1 -1
  160. package/lib/commands/page/pull.js +1 -1
  161. package/lib/commands/page/push.js +1 -1
  162. package/lib/commands/page/relation-audit.js +1 -1
  163. package/lib/commands/page/restore.js +1 -1
  164. package/lib/commands/page/shared.js +1 -1
  165. package/lib/commands/page/sync.js +1 -1
  166. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  167. package/lib/commands/project/create/format-elapsed.js +1 -1
  168. package/lib/commands/project/create/main.js +1 -1
  169. package/lib/commands/project/create/materialize-project-template.js +1 -1
  170. package/lib/commands/project/create/project-name.js +1 -1
  171. package/lib/commands/project/create/project-template-archive.js +1 -1
  172. package/lib/commands/project/create/project-template-path.js +1 -1
  173. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  174. package/lib/commands/project/create/use-format-code.js +1 -1
  175. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  176. package/lib/commands/project/domain-routing-sync.js +1 -1
  177. package/lib/commands/project/index.js +1 -1
  178. package/lib/commands/project/upgrade.js +1 -1
  179. package/lib/commands/registry.js +1 -1
  180. package/lib/commands/role/delete.js +1 -1
  181. package/lib/commands/role/detail.js +1 -1
  182. package/lib/commands/role/index.js +1 -1
  183. package/lib/commands/role/list.js +1 -1
  184. package/lib/commands/role/shared.js +1 -1
  185. package/lib/commands/role/update.js +1 -1
  186. package/lib/commands/role/user-add.js +1 -1
  187. package/lib/commands/role/user-remove.js +1 -1
  188. package/lib/commands/role/user-resolve.js +1 -1
  189. package/lib/commands/rule/get.js +1 -1
  190. package/lib/commands/rule/index.js +1 -1
  191. package/lib/commands/rule/list.js +1 -1
  192. package/lib/commands/rule/set.js +1 -1
  193. package/lib/commands/rule/shared.js +1 -1
  194. package/lib/commands/run/index.js +1 -1
  195. package/lib/commands/schema.js +1 -1
  196. package/lib/commands/sql/create.js +1 -1
  197. package/lib/commands/sql/delete.js +1 -1
  198. package/lib/commands/sql/detail.js +1 -1
  199. package/lib/commands/sql/exec.js +1 -1
  200. package/lib/commands/sql/index.js +1 -1
  201. package/lib/commands/sql/list.js +1 -1
  202. package/lib/commands/sql/pull.js +1 -1
  203. package/lib/commands/sql/push.js +1 -1
  204. package/lib/commands/sql/shared.js +1 -1
  205. package/lib/commands/sql/status.js +1 -1
  206. package/lib/commands/sql/validate.js +1 -1
  207. package/lib/commands/task/index.js +1 -1
  208. package/lib/commands/task/status.js +1 -1
  209. package/lib/commands/tenant/index.js +1 -1
  210. package/lib/commands/tenant/members-list.js +1 -1
  211. package/lib/commands/tenant/shared.js +1 -1
  212. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  213. package/lib/commands/user-account/index.js +1 -1
  214. package/lib/commands/workspace/add.js +1 -1
  215. package/lib/commands/workspace/index.js +1 -1
  216. package/lib/commands/workspace/remove.js +1 -1
  217. package/lib/config/deployment-sync.js +1 -1
  218. package/lib/config/domain-config.js +1 -1
  219. package/lib/config/project-domain-routing.js +1 -1
  220. package/lib/config/schema.js +1 -1
  221. package/lib/constant/cdn.js +1 -1
  222. package/lib/constant/cli.js +1 -1
  223. package/lib/constant/defaults.js +1 -1
  224. package/lib/constant/domain.js +1 -1
  225. package/lib/constant/env.js +1 -1
  226. package/lib/constant/output.js +1 -1
  227. package/lib/constant/paths.js +1 -1
  228. package/lib/constant/region.js +1 -1
  229. package/lib/constant/risk.js +1 -1
  230. package/lib/constant/routing-profile.js +1 -1
  231. package/lib/context/app-resolver.js +1 -1
  232. package/lib/context/auth-resolver.js +1 -1
  233. package/lib/context/config-loader.js +1 -1
  234. package/lib/context.js +1 -1
  235. package/lib/core/alias-resolver.js +1 -1
  236. package/lib/core/api-client.d.ts +0 -16
  237. package/lib/core/api-client.js +1 -1
  238. package/lib/core/bff/config.js +1 -1
  239. package/lib/core/bff/file-system.js +1 -1
  240. package/lib/core/bff/hash.js +1 -1
  241. package/lib/core/bff/lock.js +1 -1
  242. package/lib/core/bff/utils.js +1 -1
  243. package/lib/core/db-resolver.js +1 -1
  244. package/lib/core/kb-search-client.d.ts +30 -0
  245. package/lib/core/kb-search-client.js +1 -0
  246. package/lib/core/page/file-system.js +1 -1
  247. package/lib/core/page/hash.js +1 -1
  248. package/lib/core/page/lock.js +1 -1
  249. package/lib/core/sql-index-auditor.js +1 -1
  250. package/lib/core/sql-sync/config.js +1 -1
  251. package/lib/core/sql-sync/file-system.js +1 -1
  252. package/lib/core/sql-sync/hash.js +1 -1
  253. package/lib/core/sql-sync/lock.js +1 -1
  254. package/lib/core/sql-sync/utils.js +1 -1
  255. package/lib/core/sql-validator.js +1 -1
  256. package/lib/errors.js +1 -1
  257. package/lib/framework/build-all-flags.js +1 -1
  258. package/lib/framework/error-output.js +1 -1
  259. package/lib/framework/explicit-yes.js +1 -1
  260. package/lib/framework/flags.js +1 -1
  261. package/lib/framework/help.js +1 -1
  262. package/lib/framework/index.js +1 -1
  263. package/lib/framework/output.js +1 -1
  264. package/lib/framework/response.js +1 -1
  265. package/lib/framework/runner-alias.js +1 -1
  266. package/lib/framework/runner.js +1 -1
  267. package/lib/framework/schema-export.js +1 -1
  268. package/lib/framework/types.d.ts +1 -0
  269. package/lib/framework/types.js +1 -1
  270. package/lib/generated/build-info.d.ts +4 -4
  271. package/lib/generated/build-info.js +1 -1
  272. package/lib/generated/official-routing.js +1 -1
  273. package/lib/generated/routing-contract.js +1 -1
  274. package/lib/help.js +1 -1
  275. package/lib/postinstall.js +1 -1
  276. package/lib/runtime/confirmation.js +1 -1
  277. package/lib/runtime/event.js +1 -1
  278. package/lib/runtime/index.js +1 -1
  279. package/lib/runtime/queue.js +1 -1
  280. package/lib/runtime/resolve.js +1 -1
  281. package/lib/skills/builtin-skill.js +1 -1
  282. package/lib/skills/main.js +1 -1
  283. package/lib/skills/npx-skills-add.js +1 -1
  284. package/lib/skills/skill-presence.js +1 -1
  285. package/lib/telemetry/cli-command-trace.js +1 -1
  286. package/lib/telemetry/cli-help-trace.js +1 -1
  287. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  288. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  289. package/lib/telemetry/send-cli-trace-log.js +1 -1
  290. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  291. package/lib/utils/ai_config.js +1 -1
  292. package/lib/utils/apply-jq-filter.js +1 -1
  293. package/lib/utils/cdn-config.js +1 -1
  294. package/lib/utils/check-sdk-version.js +1 -1
  295. package/lib/utils/cli-version-check.js +1 -1
  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/sleep.js +1 -1
  307. package/lib/utils/template-replacer.js +1 -1
  308. package/lib/utils/update-notice.js +1 -1
  309. package/lib/utils/version.js +1 -1
  310. package/lib/utils/with-active-cookie.js +1 -1
  311. package/lib/utils/write-cli-side-channel.js +1 -1
  312. package/package.json +1 -1
  313. package/skills/rabetbase/SKILL.md +3 -3
  314. package/skills/rabetbase/references/rabetbase-config.md +1 -1
  315. package/skills/rabetbase/references/rabetbase-database-template.md +36 -0
  316. package/skills/rabetbase/references/rabetbase-doctor.md +1 -1
  317. package/skills/rabetbase/references/rabetbase-kb.md +8 -7
  318. package/skills/rabetbase/references/rabetbase-rule.md +15 -0
  319. package/skills/rabetbase.manifest.json +4 -3
@@ -1 +1 @@
1
- (function(_0x404beb,_0x740aee){const _0x37724d=a296_0xa609,_0x34d8f0=_0x404beb();while(!![]){try{const _0x329793=parseInt(_0x37724d(0x133))/0x1*(parseInt(_0x37724d(0x123))/0x2)+parseInt(_0x37724d(0x137))/0x3*(-parseInt(_0x37724d(0x129))/0x4)+-parseInt(_0x37724d(0x120))/0x5+-parseInt(_0x37724d(0x12c))/0x6*(parseInt(_0x37724d(0x12f))/0x7)+parseInt(_0x37724d(0x128))/0x8*(-parseInt(_0x37724d(0x136))/0x9)+-parseInt(_0x37724d(0x138))/0xa+parseInt(_0x37724d(0x139))/0xb;if(_0x329793===_0x740aee)break;else _0x34d8f0['push'](_0x34d8f0['shift']());}catch(_0x1df1f3){_0x34d8f0['push'](_0x34d8f0['shift']());}}}(a296_0x5296,0xdad46));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(_0x472f3c){const _0x36e277=a296_0xa609;return typeof _0x472f3c===_0x36e277(0x126)&&_0x472f3c['trim']()[_0x36e277(0x130)]>0x0?_0x472f3c[_0x36e277(0x135)]():null;}function normalizeCliVersionPolicy(_0x2904fd){const _0x2a597a=a296_0xa609;if(!_0x2904fd||typeof _0x2904fd!==_0x2a597a(0x125))return null;const _0x4035e8=_0x2904fd,_0x529dbe=_0x4035e8[_0x2a597a(0x12e)]&&typeof _0x4035e8[_0x2a597a(0x12e)]===_0x2a597a(0x125)?_0x4035e8[_0x2a597a(0x12e)]:_0x4035e8,_0x45fca4=pickString(_0x529dbe[_0x2a597a(0x12a)])||pickString(_0x529dbe[_0x2a597a(0x13a)])||pickString(_0x529dbe[_0x2a597a(0x122)]),_0x1a7896=pickString(_0x529dbe[_0x2a597a(0x121)])||pickString(_0x529dbe[_0x2a597a(0x131)]);if(!_0x45fca4&&!_0x1a7896)return null;return{'stableVersion':_0x45fca4,'minimumVersion':_0x1a7896,'upgradeMessage':pickString(_0x529dbe[_0x2a597a(0x12b)])||undefined,'minimumVersionMessage':pickString(_0x529dbe[_0x2a597a(0x12d)])||undefined};}function a296_0xa609(_0xa967fb,_0x14be83){_0xa967fb=_0xa967fb-0x120;const _0x5296c4=a296_0x5296();let _0xa6090a=_0x5296c4[_0xa967fb];return _0xa6090a;}export async function fetchRabetbaseCdnConfig(){const _0x11aabc=a296_0xa609,_0x4eabd6=new AbortController(),_0xfacdb1=setTimeout(()=>_0x4eabd6[_0x11aabc(0x127)](),FETCH_TIMEOUT_MS);try{const _0x1b7755=await fetch(CLI_VERSION_POLICY_URL,{'headers':{'Accept':_0x11aabc(0x124)},'signal':_0x4eabd6[_0x11aabc(0x132)]});if(!_0x1b7755['ok'])return null;const _0xd235d2=await _0x1b7755[_0x11aabc(0x134)]();return _0xd235d2&&typeof _0xd235d2===_0x11aabc(0x125)?_0xd235d2:null;}catch{return null;}finally{clearTimeout(_0xfacdb1);}}export async function fetchCliVersionPolicy(){return normalizeCliVersionPolicy(await fetchRabetbaseCdnConfig());}let cachedConfig=null,cacheTime=0x0,hasCachedConfig=![];export async function getRabetbaseCdnConfig(){const _0x2376fd=Date['now']();if(hasCachedConfig){const _0x59376d=cachedConfig?CACHE_TTL:FAILURE_CACHE_TTL;if(_0x2376fd-cacheTime<_0x59376d)return cachedConfig;}return cachedConfig=await fetchRabetbaseCdnConfig(),cacheTime=_0x2376fd,hasCachedConfig=!![],cachedConfig;}export async function getCliVersionPolicy(){return normalizeCliVersionPolicy(await getRabetbaseCdnConfig());}function a296_0x5296(){const _0x4869dc=['6TVMGro','application/json','object','string','abort','248PLZRSq','44aYyqtY','stableVersion','upgradeMessage','18SERJZi','minimumVersionMessage','cli','2271969BwFlDQ','length','minVersion','signal','86888llFpAD','json','trim','296145ofoMli','104808WmLpNo','16361370UYDZjA','58467431WSjltR','latestVersion','3326850PECfWY','minimumVersion','recommendedVersion'];a296_0x5296=function(){return _0x4869dc;};return a296_0x5296();}export function clearCliVersionPolicyCache(){cachedConfig=null,cacheTime=0x0,hasCachedConfig=![];}
1
+ (function(_0x3de087,_0x301ad4){const _0x5346ec=a297_0x397c,_0x4558e1=_0x3de087();while(!![]){try{const _0x4042bf=parseInt(_0x5346ec(0x16e))/0x1*(-parseInt(_0x5346ec(0x17a))/0x2)+-parseInt(_0x5346ec(0x181))/0x3*(-parseInt(_0x5346ec(0x17c))/0x4)+parseInt(_0x5346ec(0x17d))/0x5+parseInt(_0x5346ec(0x170))/0x6+-parseInt(_0x5346ec(0x171))/0x7*(parseInt(_0x5346ec(0x176))/0x8)+parseInt(_0x5346ec(0x180))/0x9*(-parseInt(_0x5346ec(0x17b))/0xa)+-parseInt(_0x5346ec(0x173))/0xb*(-parseInt(_0x5346ec(0x16d))/0xc);if(_0x4042bf===_0x301ad4)break;else _0x4558e1['push'](_0x4558e1['shift']());}catch(_0x4bdb6b){_0x4558e1['push'](_0x4558e1['shift']());}}}(a297_0x39fd,0x40afe));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(_0x1452e8){const _0x579789=a297_0x397c;return typeof _0x1452e8===_0x579789(0x17f)&&_0x1452e8[_0x579789(0x172)]()[_0x579789(0x16c)]>0x0?_0x1452e8['trim']():null;}function normalizeCliVersionPolicy(_0x5ac346){const _0x5c1616=a297_0x397c;if(!_0x5ac346||typeof _0x5ac346!==_0x5c1616(0x179))return null;const _0x1e48e4=_0x5ac346,_0x34f511=_0x1e48e4[_0x5c1616(0x16f)]&&typeof _0x1e48e4[_0x5c1616(0x16f)]===_0x5c1616(0x179)?_0x1e48e4['cli']:_0x1e48e4,_0x1690bb=pickString(_0x34f511[_0x5c1616(0x178)])||pickString(_0x34f511['latestVersion'])||pickString(_0x34f511['recommendedVersion']),_0x5d318f=pickString(_0x34f511[_0x5c1616(0x182)])||pickString(_0x34f511[_0x5c1616(0x174)]);if(!_0x1690bb&&!_0x5d318f)return null;return{'stableVersion':_0x1690bb,'minimumVersion':_0x5d318f,'upgradeMessage':pickString(_0x34f511['upgradeMessage'])||undefined,'minimumVersionMessage':pickString(_0x34f511[_0x5c1616(0x183)])||undefined};}export async function fetchRabetbaseCdnConfig(){const _0xdd9532=a297_0x397c,_0x4ed496=new AbortController(),_0x15ea4e=setTimeout(()=>_0x4ed496['abort'](),FETCH_TIMEOUT_MS);try{const _0x1d96c6=await fetch(CLI_VERSION_POLICY_URL,{'headers':{'Accept':_0xdd9532(0x175)},'signal':_0x4ed496[_0xdd9532(0x177)]});if(!_0x1d96c6['ok'])return null;const _0x3531ea=await _0x1d96c6[_0xdd9532(0x17e)]();return _0x3531ea&&typeof _0x3531ea===_0xdd9532(0x179)?_0x3531ea:null;}catch{return null;}finally{clearTimeout(_0x15ea4e);}}export async function fetchCliVersionPolicy(){return normalizeCliVersionPolicy(await fetchRabetbaseCdnConfig());}let cachedConfig=null,cacheTime=0x0,hasCachedConfig=![];function a297_0x39fd(){const _0x461cec=['cli','931782thNFea','7329yMWXuB','trim','11VIJZik','minVersion','application/json','3704etdJId','signal','stableVersion','object','33898yMGFvG','1590QJNQji','52OozwlK','1696905KhVGHn','json','string','27036yTOvDA','14649nrRuuB','minimumVersion','minimumVersionMessage','length','12708300GBqjwf','23qMCijN'];a297_0x39fd=function(){return _0x461cec;};return a297_0x39fd();}function a297_0x397c(_0x2d8d1a,_0x5d1861){_0x2d8d1a=_0x2d8d1a-0x16c;const _0x39fd06=a297_0x39fd();let _0x397c48=_0x39fd06[_0x2d8d1a];return _0x397c48;}export async function getRabetbaseCdnConfig(){const _0x3d0b0c=Date['now']();if(hasCachedConfig){const _0x59015f=cachedConfig?CACHE_TTL:FAILURE_CACHE_TTL;if(_0x3d0b0c-cacheTime<_0x59015f)return cachedConfig;}return cachedConfig=await fetchRabetbaseCdnConfig(),cacheTime=_0x3d0b0c,hasCachedConfig=!![],cachedConfig;}export async function getCliVersionPolicy(){return normalizeCliVersionPolicy(await getRabetbaseCdnConfig());}export function clearCliVersionPolicyCache(){cachedConfig=null,cacheTime=0x0,hasCachedConfig=![];}
@@ -1 +1 @@
1
- const a297_0x72061a=a297_0x34f3;(function(_0x469127,_0x3bf084){const _0x4a41d3=a297_0x34f3,_0x5cbdb4=_0x469127();while(!![]){try{const _0x37f98a=-parseInt(_0x4a41d3(0x1e0))/0x1+-parseInt(_0x4a41d3(0x1e2))/0x2*(-parseInt(_0x4a41d3(0x1e4))/0x3)+parseInt(_0x4a41d3(0x1e7))/0x4+parseInt(_0x4a41d3(0x1e1))/0x5+parseInt(_0x4a41d3(0x1df))/0x6+parseInt(_0x4a41d3(0x1e8))/0x7+parseInt(_0x4a41d3(0x1e5))/0x8*(-parseInt(_0x4a41d3(0x1de))/0x9);if(_0x37f98a===_0x3bf084)break;else _0x5cbdb4['push'](_0x5cbdb4['shift']());}catch(_0x5a0c70){_0x5cbdb4['push'](_0x5cbdb4['shift']());}}}(a297_0x14c1,0x93123));import{initEnv}from'../constant/env.js';import{readRawConfig,getConfigAppCode as a297_0x894b11,getMultiAppConfigs as a297_0x3a0640,getTemplateBaseUrl as a297_0x1ecc99}from'../context.js';export{getProjectConfigPath,getGlobalConfigPath}from'../context.js';function a297_0x34f3(_0x125cfa,_0xf89d9d){_0x125cfa=_0x125cfa-0x1de;const _0x14c146=a297_0x14c1();let _0x34f35b=_0x14c146[_0x125cfa];return _0x34f35b;}export{isInProject}from'../context.js';export function readConfig(_0x5091a8){const _0x56d29d=a297_0x34f3,_0x3377f5=readRawConfig(_0x5091a8);return _0x3377f5[_0x56d29d(0x1e6)]&&typeof _0x3377f5[_0x56d29d(0x1e6)]==='string'&&initEnv(_0x3377f5[_0x56d29d(0x1e6)]),_0x3377f5;}export function getConfigAppCode(){return a297_0x894b11();}function a297_0x14c1(){const _0x3c3ac3=['env','665596NlbLSZ','7868714ZpVHno','564282IRLeBc','5117268cBaRNN','858493jJAmyg','780120NeUZSN','2hatuwq','project','493983JNggqe','128cRyBuw'];a297_0x14c1=function(){return _0x3c3ac3;};return a297_0x14c1();}export function getMultiAppConfigs(_0x3715dd=a297_0x72061a(0x1e3)){return a297_0x3a0640(_0x3715dd);}export function getTemplateBaseUrl(){return a297_0x1ecc99();}
1
+ function a298_0x19a0(_0x4fb28d,_0x31368e){_0x4fb28d=_0x4fb28d-0x144;const _0x2bb79b=a298_0x2bb7();let _0x19a0c1=_0x2bb79b[_0x4fb28d];return _0x19a0c1;}(function(_0x2f1b6d,_0x2b7a73){const _0x4d7bff=a298_0x19a0,_0xd760c0=_0x2f1b6d();while(!![]){try{const _0x2227bf=parseInt(_0x4d7bff(0x148))/0x1+parseInt(_0x4d7bff(0x14b))/0x2+parseInt(_0x4d7bff(0x14d))/0x3*(parseInt(_0x4d7bff(0x146))/0x4)+-parseInt(_0x4d7bff(0x145))/0x5+-parseInt(_0x4d7bff(0x14c))/0x6+-parseInt(_0x4d7bff(0x149))/0x7*(-parseInt(_0x4d7bff(0x14e))/0x8)+-parseInt(_0x4d7bff(0x147))/0x9;if(_0x2227bf===_0x2b7a73)break;else _0xd760c0['push'](_0xd760c0['shift']());}catch(_0x4c74cd){_0xd760c0['push'](_0xd760c0['shift']());}}}(a298_0x2bb7,0xd62b1));function a298_0x2bb7(){const _0x5d53f6=['env','2708640wGEnfC','10507314LdZnQt','405XTSOto','16ORuPpX','string','689445OTyxAp','26524wRKzEI','17021034TbAGiz','847196NhEqrp','5463031taImqT'];a298_0x2bb7=function(){return _0x5d53f6;};return a298_0x2bb7();}import{initEnv}from'../constant/env.js';import{readRawConfig,getConfigAppCode as a298_0x14b982,getMultiAppConfigs as a298_0x5680d5,getTemplateBaseUrl as a298_0x341960}from'../context.js';export{getProjectConfigPath,getGlobalConfigPath}from'../context.js';export{isInProject}from'../context.js';export function readConfig(_0x25f3bf){const _0x2a379b=a298_0x19a0,_0x148cbe=readRawConfig(_0x25f3bf);return _0x148cbe[_0x2a379b(0x14a)]&&typeof _0x148cbe['env']===_0x2a379b(0x144)&&initEnv(_0x148cbe[_0x2a379b(0x14a)]),_0x148cbe;}export function getConfigAppCode(){return a298_0x14b982();}export function getMultiAppConfigs(_0x1029dc='project'){return a298_0x5680d5(_0x1029dc);}export function getTemplateBaseUrl(){return a298_0x341960();}
@@ -1 +1 @@
1
- (function(_0x122067,_0x4d7dbc){const _0x4863a8=a298_0x525a,_0x5ef928=_0x122067();while(!![]){try{const _0x215ad7=-parseInt(_0x4863a8(0x15b))/0x1+parseInt(_0x4863a8(0x152))/0x2+-parseInt(_0x4863a8(0x155))/0x3*(parseInt(_0x4863a8(0x15d))/0x4)+parseInt(_0x4863a8(0x150))/0x5+parseInt(_0x4863a8(0x157))/0x6*(parseInt(_0x4863a8(0x153))/0x7)+parseInt(_0x4863a8(0x15c))/0x8+-parseInt(_0x4863a8(0x154))/0x9;if(_0x215ad7===_0x4d7dbc)break;else _0x5ef928['push'](_0x5ef928['shift']());}catch(_0x2939b2){_0x5ef928['push'](_0x5ef928['shift']());}}}(a298_0xdf3e,0x6ef0d));function a298_0x525a(_0x4e5004,_0x589997){_0x4e5004=_0x4e5004-0x150;const _0xdf3ea5=a298_0xdf3e();let _0x525afc=_0xdf3ea5[_0x4e5004];return _0x525afc;}function toFiniteNumber(_0x5ed0d2){const _0x5ea840=a298_0x525a;if(typeof _0x5ed0d2===_0x5ea840(0x15a)&&Number[_0x5ea840(0x159)](_0x5ed0d2))return _0x5ed0d2;if(typeof _0x5ed0d2===_0x5ea840(0x156)){const _0x13fdee=_0x5ed0d2[_0x5ea840(0x158)]();if(!_0x13fdee)return undefined;const _0x331771=Number(_0x13fdee);if(Number[_0x5ea840(0x159)](_0x331771))return _0x331771;}return undefined;}export function normalizeEntityWithIdResponse(_0x12b7dd){const _0x2be228=a298_0x525a,_0x195769=toFiniteNumber(_0x12b7dd);if(_0x195769!==undefined)return{'id':_0x195769,'entity':{'id':_0x195769}};if(!_0x12b7dd||typeof _0x12b7dd!==_0x2be228(0x151))return{'id':undefined,'entity':{}};const _0x308cd1={..._0x12b7dd},_0x183c5d=toFiniteNumber(_0x308cd1['id']);return _0x183c5d!==undefined&&(_0x308cd1['id']=_0x183c5d),{'id':_0x183c5d,'entity':_0x308cd1};}function a298_0xdf3e(){const _0x50f530=['60sqsITQ','4185410ijHVya','object','1060598QcOlKi','7xUsDYF','9743895PiLTWY','49947FZtNLG','string','2103942xITpLc','trim','isFinite','number','70418loHqNB','1113464slyjPo'];a298_0xdf3e=function(){return _0x50f530;};return a298_0xdf3e();}
1
+ (function(_0x3cbfc1,_0x172808){const _0x16d2fb=a299_0x11af,_0x1573ae=_0x3cbfc1();while(!![]){try{const _0x2463e9=parseInt(_0x16d2fb(0x8c))/0x1+-parseInt(_0x16d2fb(0x7d))/0x2*(-parseInt(_0x16d2fb(0x7e))/0x3)+-parseInt(_0x16d2fb(0x83))/0x4*(-parseInt(_0x16d2fb(0x80))/0x5)+parseInt(_0x16d2fb(0x87))/0x6*(parseInt(_0x16d2fb(0x81))/0x7)+-parseInt(_0x16d2fb(0x89))/0x8*(-parseInt(_0x16d2fb(0x86))/0x9)+-parseInt(_0x16d2fb(0x88))/0xa+-parseInt(_0x16d2fb(0x8b))/0xb;if(_0x2463e9===_0x172808)break;else _0x1573ae['push'](_0x1573ae['shift']());}catch(_0x4d4adf){_0x1573ae['push'](_0x1573ae['shift']());}}}(a299_0x3859,0xc8d71));function a299_0x3859(){const _0x56c358=['34864368UxMtxQ','836642zmEroA','28gxjduo','301134ytEmui','isFinite','3503645ZDFFNZ','7672413NtVIDv','trim','4ivJgnw','object','number','18dkJUaB','6GzVyGV','7606450iAdIOx','2856208eQImna','string'];a299_0x3859=function(){return _0x56c358;};return a299_0x3859();}function a299_0x11af(_0x1b57f8,_0x28b80e){_0x1b57f8=_0x1b57f8-0x7d;const _0x3859c4=a299_0x3859();let _0x11af0d=_0x3859c4[_0x1b57f8];return _0x11af0d;}function toFiniteNumber(_0x287eb4){const _0xb17371=a299_0x11af;if(typeof _0x287eb4===_0xb17371(0x85)&&Number[_0xb17371(0x7f)](_0x287eb4))return _0x287eb4;if(typeof _0x287eb4===_0xb17371(0x8a)){const _0x1b388b=_0x287eb4[_0xb17371(0x82)]();if(!_0x1b388b)return undefined;const _0x3f46fb=Number(_0x1b388b);if(Number[_0xb17371(0x7f)](_0x3f46fb))return _0x3f46fb;}return undefined;}export function normalizeEntityWithIdResponse(_0x4e539b){const _0x469dde=a299_0x11af,_0x3ba7e8=toFiniteNumber(_0x4e539b);if(_0x3ba7e8!==undefined)return{'id':_0x3ba7e8,'entity':{'id':_0x3ba7e8}};if(!_0x4e539b||typeof _0x4e539b!==_0x469dde(0x84))return{'id':undefined,'entity':{}};const _0x575a94={..._0x4e539b},_0x32b143=toFiniteNumber(_0x575a94['id']);return _0x32b143!==undefined&&(_0x575a94['id']=_0x32b143),{'id':_0x32b143,'entity':_0x575a94};}
@@ -1 +1 @@
1
- function a299_0x406b(_0x645ce0,_0x42f087){_0x645ce0=_0x645ce0-0x115;const _0x125077=a299_0x1250();let _0x406b4c=_0x125077[_0x645ce0];return _0x406b4c;}(function(_0x16df03,_0x485207){const _0x116389=a299_0x406b,_0x5d9be8=_0x16df03();while(!![]){try{const _0x148c0a=-parseInt(_0x116389(0x11f))/0x1+parseInt(_0x116389(0x11c))/0x2*(parseInt(_0x116389(0x117))/0x3)+parseInt(_0x116389(0x115))/0x4+parseInt(_0x116389(0x11e))/0x5*(parseInt(_0x116389(0x11d))/0x6)+parseInt(_0x116389(0x11b))/0x7+parseInt(_0x116389(0x118))/0x8*(-parseInt(_0x116389(0x116))/0x9)+-parseInt(_0x116389(0x11a))/0xa;if(_0x148c0a===_0x485207)break;else _0x5d9be8['push'](_0x5d9be8['shift']());}catch(_0x440f35){_0x5d9be8['push'](_0x5d9be8['shift']());}}}(a299_0x1250,0x6581a));import{existsSync,mkdirSync,copyFileSync,readdirSync,statSync}from'node:fs';import{join}from'node:path';function a299_0x1250(){const _0x540d73=['2Xxrkdz','114ZdDHOU','97855EWfXSt','290219qKhzfY','141388OVeFLx','99dTMlvx','2235084QQNmLd','39144FBDFpG','isDirectory','11775390kDJPFj','5495889NxpnGN'];a299_0x1250=function(){return _0x540d73;};return a299_0x1250();}export async function copyDir(_0x52efb8,_0x44f700){const _0x25a32b=a299_0x406b,_0x46c74d=statSync(_0x52efb8);if(_0x46c74d[_0x25a32b(0x119)]()){!existsSync(_0x44f700)&&mkdirSync(_0x44f700,{'recursive':!![]});const _0x3b6a65=readdirSync(_0x52efb8);for(const _0x10a8ff of _0x3b6a65){await copyDir(join(_0x52efb8,_0x10a8ff),join(_0x44f700,_0x10a8ff));}}else copyFileSync(_0x52efb8,_0x44f700);}export function ensureDir(_0x3f40e6){!existsSync(_0x3f40e6)&&mkdirSync(_0x3f40e6,{'recursive':!![]});}export function pathExists(_0x32fb8f){return existsSync(_0x32fb8f);}
1
+ (function(_0x4e2e0f,_0x5525db){const _0x2d95ed=a300_0x1634,_0x13b538=_0x4e2e0f();while(!![]){try{const _0x25a4b4=-parseInt(_0x2d95ed(0x18c))/0x1*(-parseInt(_0x2d95ed(0x18a))/0x2)+-parseInt(_0x2d95ed(0x18e))/0x3*(parseInt(_0x2d95ed(0x190))/0x4)+-parseInt(_0x2d95ed(0x192))/0x5+parseInt(_0x2d95ed(0x18b))/0x6+parseInt(_0x2d95ed(0x191))/0x7*(-parseInt(_0x2d95ed(0x188))/0x8)+parseInt(_0x2d95ed(0x193))/0x9*(-parseInt(_0x2d95ed(0x18d))/0xa)+parseInt(_0x2d95ed(0x18f))/0xb*(parseInt(_0x2d95ed(0x189))/0xc);if(_0x25a4b4===_0x5525db)break;else _0x13b538['push'](_0x13b538['shift']());}catch(_0x217cb9){_0x13b538['push'](_0x13b538['shift']());}}}(a300_0x3061,0x38204));import{existsSync,mkdirSync,copyFileSync,readdirSync,statSync}from'node:fs';import{join}from'node:path';function a300_0x3061(){const _0xef7a5a=['393754NEkCHm','144330hswSlV','2rbtXjR','40CzmttG','33tLRGKb','2354xzeCts','155392gZFTqu','833098wzKhZG','422535bGNiCt','466614SBDYXH','16lDcvBT','43140gvaHkq'];a300_0x3061=function(){return _0xef7a5a;};return a300_0x3061();}function a300_0x1634(_0x3c1fa9,_0x4a7a08){_0x3c1fa9=_0x3c1fa9-0x188;const _0x30610f=a300_0x3061();let _0x163434=_0x30610f[_0x3c1fa9];return _0x163434;}export async function copyDir(_0xf93195,_0x44cf62){const _0x49036e=statSync(_0xf93195);if(_0x49036e['isDirectory']()){!existsSync(_0x44cf62)&&mkdirSync(_0x44cf62,{'recursive':!![]});const _0x321a58=readdirSync(_0xf93195);for(const _0x1cc576 of _0x321a58){await copyDir(join(_0xf93195,_0x1cc576),join(_0x44cf62,_0x1cc576));}}else copyFileSync(_0xf93195,_0x44cf62);}export function ensureDir(_0x5d01c1){!existsSync(_0x5d01c1)&&mkdirSync(_0x5d01c1,{'recursive':!![]});}export function pathExists(_0x1859af){return existsSync(_0x1859af);}
@@ -1 +1 @@
1
- const a300_0x16c3eb=a300_0x39e8;(function(_0x223875,_0x3e0c18){const _0x1d0588=a300_0x39e8,_0x565118=_0x223875();while(!![]){try{const _0x35537d=parseInt(_0x1d0588(0x1d2))/0x1*(-parseInt(_0x1d0588(0x1d5))/0x2)+-parseInt(_0x1d0588(0x1c5))/0x3+parseInt(_0x1d0588(0x1d1))/0x4*(parseInt(_0x1d0588(0x1c0))/0x5)+-parseInt(_0x1d0588(0x1cc))/0x6*(parseInt(_0x1d0588(0x1c2))/0x7)+parseInt(_0x1d0588(0x1d4))/0x8+-parseInt(_0x1d0588(0x1d3))/0x9*(-parseInt(_0x1d0588(0x1c6))/0xa)+-parseInt(_0x1d0588(0x1c7))/0xb*(-parseInt(_0x1d0588(0x1da))/0xc);if(_0x35537d===_0x3e0c18)break;else _0x565118['push'](_0x565118['shift']());}catch(_0xd44a0e){_0x565118['push'](_0x565118['shift']());}}}(a300_0x3472,0x63d09));import{mkdirSync,writeFileSync}from'node:fs';function a300_0x39e8(_0x53ff41,_0x4ffc99){_0x53ff41=_0x53ff41-0x1bc;const _0x34721f=a300_0x3472();let _0x39e848=_0x34721f[_0x53ff41];return _0x39e848;}import{dirname,join}from'node:path';import{homedir}from'node:os';import{getTemplateBaseUrl}from'../utils/config.js';function getGuidesCdnUrl(){const _0x58742c=a300_0x39e8,_0xbabd70=getTemplateBaseUrl();return _0xbabd70+_0x58742c(0x1d0);}const CACHE_DIR=join(homedir(),a300_0x16c3eb(0x1dd),a300_0x16c3eb(0x1d9));export async function fetchGuidesFromCDN(){const _0x46cc33=a300_0x16c3eb,_0x2a7154=getGuidesCdnUrl(),_0x3f3975=await fetch(_0x2a7154,{'headers':{'Accept':_0x46cc33(0x1c9)}});if(!_0x3f3975['ok'])throw new Error('CDN\x20request\x20failed:\x20'+_0x3f3975[_0x46cc33(0x1bd)]+'\x20'+_0x3f3975['statusText']);const _0x507d1e=await _0x3f3975[_0x46cc33(0x1c4)]();if(!_0x507d1e['guides']||typeof _0x507d1e['guides']!==_0x46cc33(0x1be))throw new Error(_0x46cc33(0x1db));return _0x507d1e;}export function writeGuidesToProject(_0x5cf235,_0x5ca436,_0x43937a='.lovrabet/skill/guides',_0x3a68fa){const _0x5b98ef=a300_0x16c3eb,_0x1528b3=join(_0x5ca436,_0x43937a);mkdirSync(_0x1528b3,{'recursive':!![]});for(const [_0x18f918,_0x1b8021]of Object[_0x5b98ef(0x1cf)](_0x5cf235[_0x5b98ef(0x1bf)])){let _0x139d37=_0x1b8021[_0x5b98ef(0x1ce)];_0x1b8021[_0x5b98ef(0x1c3)]&&(_0x139d37=appendUpdateTime(_0x139d37,_0x1b8021[_0x5b98ef(0x1c3)])),writeFileSync(join(_0x1528b3,_0x18f918+'.md'),_0x139d37,_0x5b98ef(0x1ca));}}function a300_0x3472(){const _0x1c25e2=['/skills/guides.json','260GglDeU','10GosKlR','111114pPgRjc','2622560hDpQEC','39686bLuULH','map','trimEnd','extendContent','cache','36HuYhND','CDN\x20returned\x20invalid\x20data','length','.lovrabet','join','CDN\x20data\x20is\x20missing\x20skillTemplate','status','object','guides','54055FjqTZQ','title','3833137NejRlC','lastUpdated','json','698571PxEiXy','70bxHZOU','992794wFrPkP','skillTemplate','application/json','utf-8','keys','6MHkeRY','replace','content','entries'];a300_0x3472=function(){return _0x1c25e2;};return a300_0x3472();}export function appendUpdateTime(_0x1c9212,_0x33cb1e){const _0x1be08e=a300_0x16c3eb;return _0x1c9212=_0x1c9212[_0x1be08e(0x1cd)](/\n*>更新时间:.*$/m,''),_0x1c9212[_0x1be08e(0x1d7)]()+('\x0a\x0a>更新时间:'+_0x33cb1e);}export function getSkillTemplate(_0x4c8aa3){const _0x33cfc4=a300_0x16c3eb;return _0x4c8aa3[_0x33cfc4(0x1c8)]?.[_0x33cfc4(0x1ce)]||'';}export function appendExtendContents(_0x5ac36a,_0x30ebed,_0x2e2744){const _0x23b755=a300_0x16c3eb,_0x449087=[];for(const [,_0x514ae9]of Object[_0x23b755(0x1cf)](_0x30ebed['guides'])){_0x514ae9[_0x23b755(0x1d8)]&&_0x449087['push'](_0x514ae9[_0x23b755(0x1d8)][_0x23b755(0x1d7)]());}if(_0x449087[_0x23b755(0x1dc)]===0x0)return _0x5ac36a;return _0x5ac36a['trimEnd']()+'\x0a\x0a'+_0x449087[_0x23b755(0x1de)]('\x0a\x0a')+'\x0a';}export function writeSkillFile(_0x2249d1,_0x5b30e8,_0xacd90d){const _0x274470=a300_0x16c3eb,_0x4ac39c=getSkillTemplate(_0x2249d1);if(!_0x4ac39c)throw new Error(_0x274470(0x1bc));const _0xbe2cab=dirname(_0x5b30e8);mkdirSync(_0xbe2cab,{'recursive':!![]});let _0x522a51=_0x4ac39c[_0x274470(0x1cd)](/\{\{IDE_NAME\}\}/g,_0xacd90d);_0x522a51=appendExtendContents(_0x522a51,_0x2249d1),_0x2249d1[_0x274470(0x1c8)]['lastUpdated']&&(_0x522a51=appendUpdateTime(_0x522a51,_0x2249d1[_0x274470(0x1c8)][_0x274470(0x1c3)])),writeFileSync(_0x5b30e8,_0x522a51,_0x274470(0x1ca));}export async function installGuides(_0x3edadb){const _0x540fd5=a300_0x16c3eb,_0x1c3500=await fetchGuidesFromCDN();return writeGuidesToProject(_0x1c3500,_0x3edadb),Object[_0x540fd5(0x1cb)](_0x1c3500[_0x540fd5(0x1bf)])[_0x540fd5(0x1dc)];}export function getGuidesSummary(_0x2b7c82){const _0x2c5092=a300_0x16c3eb;return Object[_0x2c5092(0x1cf)](_0x2b7c82[_0x2c5092(0x1bf)])[_0x2c5092(0x1d6)](([_0x22beec,_0x41599e])=>({'key':_0x22beec,'title':_0x41599e[_0x2c5092(0x1c1)],'path':_0x41599e['path']}));}
1
+ const a301_0x3ca9d1=a301_0x5304;(function(_0x5070af,_0x209929){const _0x59923c=a301_0x5304,_0x26b4fe=_0x5070af();while(!![]){try{const _0x4a9fdf=-parseInt(_0x59923c(0x17a))/0x1+parseInt(_0x59923c(0x177))/0x2+-parseInt(_0x59923c(0x179))/0x3*(parseInt(_0x59923c(0x165))/0x4)+parseInt(_0x59923c(0x178))/0x5*(parseInt(_0x59923c(0x16e))/0x6)+parseInt(_0x59923c(0x168))/0x7*(-parseInt(_0x59923c(0x16b))/0x8)+-parseInt(_0x59923c(0x173))/0x9*(parseInt(_0x59923c(0x15e))/0xa)+-parseInt(_0x59923c(0x160))/0xb*(-parseInt(_0x59923c(0x176))/0xc);if(_0x4a9fdf===_0x209929)break;else _0x26b4fe['push'](_0x26b4fe['shift']());}catch(_0x609675){_0x26b4fe['push'](_0x26b4fe['shift']());}}}(a301_0x2a98,0x33100));import{mkdirSync,writeFileSync}from'node:fs';import{dirname,join}from'node:path';function a301_0x5304(_0x2b0cf7,_0x345f6c){_0x2b0cf7=_0x2b0cf7-0x158;const _0x2a98d3=a301_0x2a98();let _0x53043f=_0x2a98d3[_0x2b0cf7];return _0x53043f;}import{homedir}from'node:os';import{getTemplateBaseUrl}from'../utils/config.js';function getGuidesCdnUrl(){const _0x5efc09=getTemplateBaseUrl();return _0x5efc09+'/skills/guides.json';}const CACHE_DIR=join(homedir(),a301_0x3ca9d1(0x17b),a301_0x3ca9d1(0x166));export async function fetchGuidesFromCDN(){const _0x25c37f=a301_0x3ca9d1,_0x599954=getGuidesCdnUrl(),_0x145dcc=await fetch(_0x599954,{'headers':{'Accept':_0x25c37f(0x170)}});if(!_0x145dcc['ok'])throw new Error(_0x25c37f(0x171)+_0x145dcc[_0x25c37f(0x161)]+'\x20'+_0x145dcc[_0x25c37f(0x167)]);const _0x2b3d12=await _0x145dcc[_0x25c37f(0x159)]();if(!_0x2b3d12[_0x25c37f(0x15c)]||typeof _0x2b3d12['guides']!==_0x25c37f(0x164))throw new Error('CDN\x20returned\x20invalid\x20data');return _0x2b3d12;}function a301_0x2a98(){const _0x1f4ce0=['json','entries','content','guides','\x0a\x0a>更新时间:','10rNsrma','lastUpdated','6604411MYAeIW','status','replace','trimEnd','object','14400xJrnAY','cache','statusText','3290WQmIWV','CDN\x20data\x20is\x20missing\x20skillTemplate','join','712ZvaBiz','utf-8','.md','6DLaNTB','length','application/json','CDN\x20request\x20failed:\x20','path','3455307WxsqkC','push','.lovrabet/skill/guides','12EjjRAV','17600xjWPMS','1391920mXOJxr','117RMDgCR','112280EXgLqR','.lovrabet','keys','skillTemplate','map','title','extendContent'];a301_0x2a98=function(){return _0x1f4ce0;};return a301_0x2a98();}export function writeGuidesToProject(_0x228e92,_0x486c90,_0x20a4c9=a301_0x3ca9d1(0x175),_0x57b1c1){const _0x4a90c6=a301_0x3ca9d1,_0x2a5bc3=join(_0x486c90,_0x20a4c9);mkdirSync(_0x2a5bc3,{'recursive':!![]});for(const [_0x3e8174,_0x5c86d2]of Object[_0x4a90c6(0x15a)](_0x228e92[_0x4a90c6(0x15c)])){let _0x28b101=_0x5c86d2[_0x4a90c6(0x15b)];_0x5c86d2['lastUpdated']&&(_0x28b101=appendUpdateTime(_0x28b101,_0x5c86d2[_0x4a90c6(0x15f)])),writeFileSync(join(_0x2a5bc3,_0x3e8174+_0x4a90c6(0x16d)),_0x28b101,'utf-8');}}export function appendUpdateTime(_0x593e5e,_0x1252c7){const _0x42adbc=a301_0x3ca9d1;return _0x593e5e=_0x593e5e['replace'](/\n*>更新时间:.*$/m,''),_0x593e5e[_0x42adbc(0x163)]()+(_0x42adbc(0x15d)+_0x1252c7);}export function getSkillTemplate(_0x1c56d4){return _0x1c56d4['skillTemplate']?.['content']||'';}export function appendExtendContents(_0x5291b1,_0x3de250,_0x19e499){const _0x17bf86=a301_0x3ca9d1,_0x303437=[];for(const [,_0x57e23a]of Object[_0x17bf86(0x15a)](_0x3de250[_0x17bf86(0x15c)])){_0x57e23a[_0x17bf86(0x158)]&&_0x303437[_0x17bf86(0x174)](_0x57e23a[_0x17bf86(0x158)]['trimEnd']());}if(_0x303437[_0x17bf86(0x16f)]===0x0)return _0x5291b1;return _0x5291b1[_0x17bf86(0x163)]()+'\x0a\x0a'+_0x303437[_0x17bf86(0x16a)]('\x0a\x0a')+'\x0a';}export function writeSkillFile(_0xfd2529,_0x22d9c8,_0x1f85fe){const _0x5343a4=a301_0x3ca9d1,_0x5f4f15=getSkillTemplate(_0xfd2529);if(!_0x5f4f15)throw new Error(_0x5343a4(0x169));const _0x599ebc=dirname(_0x22d9c8);mkdirSync(_0x599ebc,{'recursive':!![]});let _0xdc37b5=_0x5f4f15[_0x5343a4(0x162)](/\{\{IDE_NAME\}\}/g,_0x1f85fe);_0xdc37b5=appendExtendContents(_0xdc37b5,_0xfd2529),_0xfd2529[_0x5343a4(0x17d)][_0x5343a4(0x15f)]&&(_0xdc37b5=appendUpdateTime(_0xdc37b5,_0xfd2529['skillTemplate'][_0x5343a4(0x15f)])),writeFileSync(_0x22d9c8,_0xdc37b5,_0x5343a4(0x16c));}export async function installGuides(_0x2a7f99){const _0x5b9338=a301_0x3ca9d1,_0x31ce67=await fetchGuidesFromCDN();return writeGuidesToProject(_0x31ce67,_0x2a7f99),Object[_0x5b9338(0x17c)](_0x31ce67[_0x5b9338(0x15c)])[_0x5b9338(0x16f)];}export function getGuidesSummary(_0x1e64e9){const _0x369cba=a301_0x3ca9d1;return Object[_0x369cba(0x15a)](_0x1e64e9[_0x369cba(0x15c)])[_0x369cba(0x17e)](([_0x494345,_0x377f79])=>({'key':_0x494345,'title':_0x377f79[_0x369cba(0x17f)],'path':_0x377f79[_0x369cba(0x172)]}));}
@@ -1 +1 @@
1
- (function(_0x4c0526,_0x384f42){const _0x593b8e=a301_0x482c,_0x4d03e0=_0x4c0526();while(!![]){try{const _0x53d5a5=parseInt(_0x593b8e(0xa2))/0x1*(-parseInt(_0x593b8e(0xa1))/0x2)+parseInt(_0x593b8e(0xb1))/0x3+-parseInt(_0x593b8e(0xab))/0x4+-parseInt(_0x593b8e(0xa7))/0x5+parseInt(_0x593b8e(0x9b))/0x6*(-parseInt(_0x593b8e(0xb2))/0x7)+parseInt(_0x593b8e(0xb8))/0x8*(-parseInt(_0x593b8e(0xaf))/0x9)+parseInt(_0x593b8e(0x9f))/0xa;if(_0x53d5a5===_0x384f42)break;else _0x4d03e0['push'](_0x4d03e0['shift']());}catch(_0x6dd168){_0x4d03e0['push'](_0x4d03e0['shift']());}}}(a301_0x130f,0xbab5b));function a301_0x130f(){const _0x4cfff9=['signal','6qSfCaN','headers','TypeError','application/json','50030690BqgxOk','json','2ZNUcAX','1129094CfXUjb','content-type','name','\x20in\x20','fetch','2582285DxmtcE','includes','*\x20Request\x20failed;\x20retry\x20','status','3195016KiFjxB','abort','ms...','AbortError','54yOEGft','url','480846EtgrtH','9317357etXBco','Request\x20failed','text','log','ECONNRESET','message','830976cuBZAj'];a301_0x130f=function(){return _0x4cfff9;};return a301_0x130f();}function a301_0x482c(_0x38cb72,_0x160c00){_0x38cb72=_0x38cb72-0x9a;const _0x130f20=a301_0x130f();let _0x482c1e=_0x130f20[_0x38cb72];return _0x482c1e;}export async function httpRequest(_0x2f1206,_0xbad56e={}){const _0x1fd899=a301_0x482c,{timeout:timeout=0x7530,retries:retries=0x3,retryDelay:retryDelay=0x3e8,headers:headers={}}=_0xbad56e;let _0x448ef5=null;for(let _0x3c3370=0x0;_0x3c3370<=retries;_0x3c3370++){try{const _0x42fd42=new AbortController(),_0xe6c5c6=setTimeout(()=>_0x42fd42[_0x1fd899(0xac)](),timeout),_0x6342e6=await fetch(_0x2f1206,{'headers':headers,'signal':_0x42fd42[_0x1fd899(0x9a)]});clearTimeout(_0xe6c5c6);let _0x433e53;const _0x1307a2=_0x6342e6[_0x1fd899(0x9c)]['get'](_0x1fd899(0xa3));return _0x1307a2?.['includes'](_0x1fd899(0x9e))?_0x433e53=await _0x6342e6[_0x1fd899(0xa0)]():_0x433e53=await _0x6342e6['text'](),{'ok':_0x6342e6['ok'],'status':_0x6342e6[_0x1fd899(0xaa)],'statusText':_0x6342e6['statusText'],'data':_0x433e53,'headers':_0x6342e6[_0x1fd899(0x9c)],'url':_0x6342e6[_0x1fd899(0xb0)],'text':()=>_0x6342e6[_0x1fd899(0xb4)]()};}catch(_0x2a0e9f){_0x448ef5=_0x2a0e9f instanceof Error?_0x2a0e9f:new Error(String(_0x2a0e9f));if(_0x3c3370===retries)break;if(shouldRetry(_0x2a0e9f)){console[_0x1fd899(0xb5)](_0x1fd899(0xa9)+(_0x3c3370+0x1)+_0x1fd899(0xa5)+retryDelay+_0x1fd899(0xad)),await sleep(retryDelay);continue;}else break;}}throw _0x448ef5||new Error(_0x1fd899(0xb3));}function shouldRetry(_0x4d949f){const _0x92e348=a301_0x482c;if(_0x4d949f instanceof Error){if(_0x4d949f['name']===_0x92e348(0xae))return![];if(_0x4d949f[_0x92e348(0xa4)]===_0x92e348(0x9d)&&_0x4d949f[_0x92e348(0xb7)][_0x92e348(0xa8)](_0x92e348(0xa6)))return!![];if(_0x4d949f['message'][_0x92e348(0xa8)](_0x92e348(0xb6)))return!![];if(_0x4d949f[_0x92e348(0xb7)][_0x92e348(0xa8)]('ENOTFOUND'))return![];}return![];}function sleep(_0x45359a){return new Promise(_0xb5ee71=>setTimeout(_0xb5ee71,_0x45359a));}export function validateUrl(_0x404c25){try{return new URL(_0x404c25),!![];}catch{return![];}}
1
+ (function(_0x493626,_0x28e781){const _0x175f59=a302_0x43e1,_0x474ec7=_0x493626();while(!![]){try{const _0x43c55c=parseInt(_0x175f59(0x1a1))/0x1+parseInt(_0x175f59(0x1a7))/0x2*(parseInt(_0x175f59(0x1ac))/0x3)+parseInt(_0x175f59(0x1b9))/0x4+-parseInt(_0x175f59(0x1a5))/0x5+-parseInt(_0x175f59(0x1a0))/0x6+-parseInt(_0x175f59(0x1a4))/0x7+parseInt(_0x175f59(0x1b4))/0x8;if(_0x43c55c===_0x28e781)break;else _0x474ec7['push'](_0x474ec7['shift']());}catch(_0x7e61c1){_0x474ec7['push'](_0x474ec7['shift']());}}}(a302_0x2879,0xbc5c2));function a302_0x2879(){const _0x349ad9=['TypeError','statusText','*\x20Request\x20failed;\x20retry\x20','signal','3XKtyJv','status','ENOTFOUND','headers','text','application/json','includes','ECONNRESET','6989528Rmokng','name','\x20in\x20','ms...','abort','3310836HWKSpQ','url','json','2500440lITsel','271750bPwHcg','message','log','7861245JJCGBo','1757980kMRlAO','Request\x20failed','1379486cZasuR'];a302_0x2879=function(){return _0x349ad9;};return a302_0x2879();}export async function httpRequest(_0x4a2acf,_0x3caac2={}){const _0x4b9c8f=a302_0x43e1,{timeout:timeout=0x7530,retries:retries=0x3,retryDelay:retryDelay=0x3e8,headers:headers={}}=_0x3caac2;let _0x262e82=null;for(let _0x2de8da=0x0;_0x2de8da<=retries;_0x2de8da++){try{const _0x5bb0c3=new AbortController(),_0x575ead=setTimeout(()=>_0x5bb0c3[_0x4b9c8f(0x1b8)](),timeout),_0x29b382=await fetch(_0x4a2acf,{'headers':headers,'signal':_0x5bb0c3[_0x4b9c8f(0x1ab)]});clearTimeout(_0x575ead);let _0x8008fa;const _0x3a2ab5=_0x29b382[_0x4b9c8f(0x1af)]['get']('content-type');return _0x3a2ab5?.['includes'](_0x4b9c8f(0x1b1))?_0x8008fa=await _0x29b382[_0x4b9c8f(0x19f)]():_0x8008fa=await _0x29b382[_0x4b9c8f(0x1b0)](),{'ok':_0x29b382['ok'],'status':_0x29b382[_0x4b9c8f(0x1ad)],'statusText':_0x29b382[_0x4b9c8f(0x1a9)],'data':_0x8008fa,'headers':_0x29b382[_0x4b9c8f(0x1af)],'url':_0x29b382[_0x4b9c8f(0x19e)],'text':()=>_0x29b382[_0x4b9c8f(0x1b0)]()};}catch(_0x20d371){_0x262e82=_0x20d371 instanceof Error?_0x20d371:new Error(String(_0x20d371));if(_0x2de8da===retries)break;if(shouldRetry(_0x20d371)){console[_0x4b9c8f(0x1a3)](_0x4b9c8f(0x1aa)+(_0x2de8da+0x1)+_0x4b9c8f(0x1b6)+retryDelay+_0x4b9c8f(0x1b7)),await sleep(retryDelay);continue;}else break;}}throw _0x262e82||new Error(_0x4b9c8f(0x1a6));}function shouldRetry(_0x5a5aa5){const _0x2aef9e=a302_0x43e1;if(_0x5a5aa5 instanceof Error){if(_0x5a5aa5[_0x2aef9e(0x1b5)]==='AbortError')return![];if(_0x5a5aa5[_0x2aef9e(0x1b5)]===_0x2aef9e(0x1a8)&&_0x5a5aa5['message'][_0x2aef9e(0x1b2)]('fetch'))return!![];if(_0x5a5aa5[_0x2aef9e(0x1a2)]['includes'](_0x2aef9e(0x1b3)))return!![];if(_0x5a5aa5[_0x2aef9e(0x1a2)][_0x2aef9e(0x1b2)](_0x2aef9e(0x1ae)))return![];}return![];}function sleep(_0x2fd2dc){return new Promise(_0x16f4eb=>setTimeout(_0x16f4eb,_0x2fd2dc));}function a302_0x43e1(_0x1c416c,_0x55af7b){_0x1c416c=_0x1c416c-0x19e;const _0x287917=a302_0x2879();let _0x43e11c=_0x287917[_0x1c416c];return _0x43e11c;}export function validateUrl(_0x54410f){try{return new URL(_0x54410f),!![];}catch{return![];}}
@@ -1 +1 @@
1
- function a302_0x5b96(){const _0x102be1=['setRawMode','382844qdjEjV','isTTY','15752TXWwzE','433696agqrTN','stdin','4391296mXaxef','isRaw','1021806XNofzM','true','1436645ZykqqQ','1846896xKveSV','nonInteractive'];a302_0x5b96=function(){return _0x102be1;};return a302_0x5b96();}(function(_0x4538de,_0x2b32d4){const _0x5da2e5=a302_0xa88f,_0x5693db=_0x4538de();while(!![]){try{const _0x3a6b7c=parseInt(_0x5da2e5(0x181))/0x1+-parseInt(_0x5da2e5(0x182))/0x2+-parseInt(_0x5da2e5(0x186))/0x3+parseInt(_0x5da2e5(0x18c))/0x4+-parseInt(_0x5da2e5(0x188))/0x5+parseInt(_0x5da2e5(0x189))/0x6+parseInt(_0x5da2e5(0x184))/0x7;if(_0x3a6b7c===_0x2b32d4)break;else _0x5693db['push'](_0x5693db['shift']());}catch(_0x37869b){_0x5693db['push'](_0x5693db['shift']());}}}(a302_0x5b96,0x31464));function a302_0xa88f(_0x5c4678,_0x1dbc00){_0x5c4678=_0x5c4678-0x180;const _0x5b9699=a302_0x5b96();let _0xa88f75=_0x5b9699[_0x5c4678];return _0xa88f75;}function env(_0x4d9a8d){return process.env[`RABETBASE_${_0x4d9a8d}`]||process.env[`LOVRABET_${_0x4d9a8d}`]||undefined;}export function isNonInteractive(_0x49dcef){const _0x23b7ca=a302_0xa88f;return!!(_0x49dcef[_0x23b7ca(0x18a)]||_0x49dcef['ci']||env('CI')===_0x23b7ca(0x187)||process.env.CI==='true'||!process['stdout'][_0x23b7ca(0x180)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x18337d=a302_0xa88f;if(!process[_0x18337d(0x183)][_0x18337d(0x180)])return![];try{const _0xbef75a=process['stdin'][_0x18337d(0x185)];return process[_0x18337d(0x183)]['setRawMode'](!![]),process[_0x18337d(0x183)][_0x18337d(0x18b)](_0xbef75a??![]),!![];}catch{return![];}}
1
+ (function(_0xedb29a,_0x5ad511){const _0x51d854=a303_0x1d53,_0x573d51=_0xedb29a();while(!![]){try{const _0x33f56d=-parseInt(_0x51d854(0x1ff))/0x1*(parseInt(_0x51d854(0x201))/0x2)+-parseInt(_0x51d854(0x1f2))/0x3+parseInt(_0x51d854(0x200))/0x4*(parseInt(_0x51d854(0x1fa))/0x5)+parseInt(_0x51d854(0x1fd))/0x6*(parseInt(_0x51d854(0x1f8))/0x7)+-parseInt(_0x51d854(0x1fb))/0x8*(-parseInt(_0x51d854(0x1f1))/0x9)+-parseInt(_0x51d854(0x1f4))/0xa+parseInt(_0x51d854(0x1f9))/0xb;if(_0x33f56d===_0x5ad511)break;else _0x573d51['push'](_0x573d51['shift']());}catch(_0x387fcc){_0x573d51['push'](_0x573d51['shift']());}}}(a303_0x1807,0x30923));function a303_0x1807(){const _0x49132d=['setRawMode','stdin','237223AxvYDm','3459115TCZQUR','700655BWIBac','72HswHNb','true','18hkcOLd','nonInteractive','4alHFgY','8HlYIQT','90422qgQxqh','90063yPKXCX','582879kXSYpX','stdout','2123730UqzeAr','isTTY'];a303_0x1807=function(){return _0x49132d;};return a303_0x1807();}function a303_0x1d53(_0x3464f2,_0x4a7ba7){_0x3464f2=_0x3464f2-0x1f1;const _0x18074a=a303_0x1807();let _0x1d5347=_0x18074a[_0x3464f2];return _0x1d5347;}function env(_0x50b02e){return process.env[`RABETBASE_${_0x50b02e}`]||process.env[`LOVRABET_${_0x50b02e}`]||undefined;}export function isNonInteractive(_0x4cf2de){const _0x490e4e=a303_0x1d53;return!!(_0x4cf2de[_0x490e4e(0x1fe)]||_0x4cf2de['ci']||env('CI')===_0x490e4e(0x1fc)||process.env.CI==='true'||!process[_0x490e4e(0x1f3)][_0x490e4e(0x1f5)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x10c480=a303_0x1d53;if(!process[_0x10c480(0x1f7)]['isTTY'])return![];try{const _0x52e15a=process[_0x10c480(0x1f7)]['isRaw'];return process['stdin'][_0x10c480(0x1f6)](!![]),process['stdin'][_0x10c480(0x1f6)](_0x52e15a??![]),!![];}catch{return![];}}
@@ -1 +1 @@
1
- const a303_0x227146=a303_0x4ef5;(function(_0x5aad52,_0x513a10){const _0xa10aab=a303_0x4ef5,_0x31a37d=_0x5aad52();while(!![]){try{const _0x24580e=parseInt(_0xa10aab(0x168))/0x1+-parseInt(_0xa10aab(0x174))/0x2+parseInt(_0xa10aab(0x17f))/0x3*(-parseInt(_0xa10aab(0x19b))/0x4)+-parseInt(_0xa10aab(0x188))/0x5*(-parseInt(_0xa10aab(0x17a))/0x6)+-parseInt(_0xa10aab(0x197))/0x7*(-parseInt(_0xa10aab(0x17d))/0x8)+-parseInt(_0xa10aab(0x172))/0x9+parseInt(_0xa10aab(0x19e))/0xa;if(_0x24580e===_0x513a10)break;else _0x31a37d['push'](_0x31a37d['shift']());}catch(_0x3d04de){_0x31a37d['push'](_0x31a37d['shift']());}}}(a303_0x115b,0xdcbfe));import a303_0x93a879 from'winston';import a303_0x4ec974 from'node:fs';function a303_0x115b(){const _0x4349aa=['trim','utf8','success','748tkNxHT','stringify','logFilePath','26540660XQdhwY','transports','toISOString','182873JEHyJD','yellow','Failed\x20to\x20read\x20logs:','info','Failed\x20to\x20clear\x20logs:','message','logTask','existsSync','timestamp','command','14987448eJBdcj','setRawCommand','2350078UDqkcP','format','File','join','printf','readFileSync','135132ofgpEI','getWinstonInstance','unknown','16tkJTaN','mkdirSync','8736zrdExA','.lovrabet.log','rawCommand','warn','initWinstonLogger','combine','now','Starting:\x20','clear','10PNrXVw','Failed:\x20','red','log','addColors','winstonLogger','split','currentRawCommand','createLogger','error','setLogPath','duration','level','details','parse','4924717FRfQIQ'];a303_0x115b=function(){return _0x4349aa;};return a303_0x115b();}function a303_0x4ef5(_0x8d8eb5,_0x59476c){_0x8d8eb5=_0x8d8eb5-0x168;const _0x115b82=a303_0x115b();let _0x4ef5df=_0x115b82[_0x8d8eb5];return _0x4ef5df;}import a303_0x3100fd from'node:path';class Logger{[a303_0x227146(0x18d)];[a303_0x227146(0x19d)];['currentRawCommand']='';constructor(){const _0x5da08a=a303_0x227146;this[_0x5da08a(0x19d)]='';}[a303_0x227146(0x173)](_0x1d083e){const _0x2c7651=a303_0x227146;this[_0x2c7651(0x18f)]=_0x1d083e;}[a303_0x227146(0x183)](){const _0x1745d0=a303_0x227146,_0x3aef7e=a303_0x3100fd['dirname'](this[_0x1745d0(0x19d)]);!a303_0x4ec974['existsSync'](_0x3aef7e)&&a303_0x4ec974[_0x1745d0(0x17e)](_0x3aef7e,{'recursive':!![]});const _0x17ea93=a303_0x93a879['format'][_0x1745d0(0x184)](a303_0x93a879[_0x1745d0(0x175)][_0x1745d0(0x170)](),a303_0x93a879[_0x1745d0(0x175)]['errors']({'stack':!![]}),a303_0x93a879['format'][_0x1745d0(0x178)](_0x191942=>{const _0x1b819e=_0x1745d0,_0x1c176d={'timestamp':_0x191942[_0x1b819e(0x170)]||new Date()[_0x1b819e(0x1a0)](),'level':_0x191942[_0x1b819e(0x194)]||_0x1b819e(0x16b),'command':_0x191942[_0x1b819e(0x171)]||_0x1b819e(0x17c),'rawCommand':_0x191942[_0x1b819e(0x181)]||this[_0x1b819e(0x18f)]||undefined,'message':_0x191942[_0x1b819e(0x16d)]||'','duration':_0x191942[_0x1b819e(0x193)]||undefined,'details':_0x191942[_0x1b819e(0x195)]||undefined};return JSON[_0x1b819e(0x19c)](_0x1c176d);}));this[_0x1745d0(0x18d)]=a303_0x93a879[_0x1745d0(0x190)]({'level':'info','format':_0x17ea93,'transports':[new a303_0x93a879[(_0x1745d0(0x19f))][(_0x1745d0(0x176))]({'filename':this[_0x1745d0(0x19d)],'level':_0x1745d0(0x16b)})],'silent':![]}),a303_0x93a879[_0x1745d0(0x18c)]({'success':'green','error':_0x1745d0(0x18a),'warn':_0x1745d0(0x169),'info':'blue'});}[a303_0x227146(0x192)](_0x2db36c){const _0x25f39b=a303_0x227146;this[_0x25f39b(0x19d)]=a303_0x3100fd[_0x25f39b(0x177)](_0x2db36c,_0x25f39b(0x180)),this[_0x25f39b(0x18d)]&&this[_0x25f39b(0x18d)][_0x25f39b(0x187)](),this['initWinstonLogger']();}[a303_0x227146(0x16b)](_0x217976,_0x3c80a9,_0x46cbf7){const _0x5e983a=a303_0x227146;if(!this[_0x5e983a(0x19d)]||!this[_0x5e983a(0x18d)])return;this[_0x5e983a(0x18d)][_0x5e983a(0x16b)](_0x3c80a9,{'command':_0x217976,'details':_0x46cbf7});}[a303_0x227146(0x19a)](_0x5cecf5,_0x3c1ea7,_0x3e4a64,_0x225377){const _0x16b8f5=a303_0x227146;if(!this[_0x16b8f5(0x19d)]||!this[_0x16b8f5(0x18d)])return;this['winstonLogger'][_0x16b8f5(0x18b)](_0x16b8f5(0x16b),_0x3c1ea7,{'level':_0x16b8f5(0x19a),'command':_0x5cecf5,'duration':_0x3e4a64,'details':_0x225377});}['error'](_0x3915fc,_0x2c3faf,_0x47800d){const _0x563e3a=a303_0x227146;if(!this['logFilePath']||!this[_0x563e3a(0x18d)])return;this[_0x563e3a(0x18d)][_0x563e3a(0x191)](_0x2c3faf,{'command':_0x3915fc,'details':_0x47800d});}[a303_0x227146(0x182)](_0x28b2fc,_0x41abda,_0x18f54f){const _0x36e5ca=a303_0x227146;if(!this['logFilePath']||!this[_0x36e5ca(0x18d)])return;this['winstonLogger'][_0x36e5ca(0x182)](_0x41abda,{'command':_0x28b2fc,'details':_0x18f54f});}async[a303_0x227146(0x16e)](_0x2ff6b1,_0x3314bc,_0x432160){const _0x3a0d44=a303_0x227146,_0x91e5df=Date[_0x3a0d44(0x185)]();this[_0x3a0d44(0x16b)](_0x2ff6b1,_0x3a0d44(0x186)+_0x3314bc);try{const _0x48f7ad=await _0x432160(),_0x2c2e4f=Date['now']()-_0x91e5df;return this[_0x3a0d44(0x19a)](_0x2ff6b1,'Completed:\x20'+_0x3314bc,_0x2c2e4f),_0x48f7ad;}catch(_0x4e3e2b){const _0x4f6da9=Date[_0x3a0d44(0x185)]()-_0x91e5df;this[_0x3a0d44(0x191)](_0x2ff6b1,_0x3a0d44(0x189)+_0x3314bc,{'error':_0x4e3e2b instanceof Error?_0x4e3e2b['message']:String(_0x4e3e2b),'duration':_0x4f6da9});throw _0x4e3e2b;}}['readLogs'](){const _0x39bba6=a303_0x227146;try{if(!a303_0x4ec974[_0x39bba6(0x16f)](this[_0x39bba6(0x19d)]))return[];const _0x408e89=a303_0x4ec974[_0x39bba6(0x179)](this[_0x39bba6(0x19d)],_0x39bba6(0x199));return _0x408e89[_0x39bba6(0x18e)]('\x0a')['filter'](_0x591a78=>_0x591a78[_0x39bba6(0x198)]())['map'](_0x5f0fa7=>JSON[_0x39bba6(0x196)](_0x5f0fa7));}catch(_0x54d56b){return console['warn'](_0x39bba6(0x16a),_0x54d56b),[];}}['clearLogs'](){const _0x11378f=a303_0x227146;try{a303_0x4ec974[_0x11378f(0x16f)](this['logFilePath'])&&a303_0x4ec974['writeFileSync'](this[_0x11378f(0x19d)],'',_0x11378f(0x199));}catch(_0x545b66){console[_0x11378f(0x182)](_0x11378f(0x16c),_0x545b66);}}[a303_0x227146(0x17b)](){const _0x173721=a303_0x227146;return this[_0x173721(0x18d)];}}export const logger=new Logger();
1
+ function a304_0xe2d2(_0x3f4020,_0x121e7d){_0x3f4020=_0x3f4020-0x6c;const _0x2ec923=a304_0x2ec9();let _0xe2d25c=_0x2ec923[_0x3f4020];return _0xe2d25c;}function a304_0x2ec9(){const _0x28b718=['Failed\x20to\x20read\x20logs:','currentRawCommand','existsSync','toISOString','format','error','22LnPxoA','command','393719VRjcfa','setRawCommand','clear','mkdirSync','errors','duration','2307352vHUiBt','3292584Afxwwk','combine','level','rawCommand','getWinstonInstance','printf','21YAWKuM','success','utf8','addColors','Starting:\x20','warn','113585idPXhA','4476060jyXNhS','Completed:\x20','clearLogs','logTask','unknown','11062770PgAZWG','split','log','readFileSync','188wDHApk','103881fkCMaT','winstonLogger','message','logFilePath','now','readLogs','timestamp','File','yellow','stringify','writeFileSync','Failed:\x20','transports','filter','trim','green','red','22GBelEY','map','createLogger','info'];a304_0x2ec9=function(){return _0x28b718;};return a304_0x2ec9();}const a304_0x41423d=a304_0xe2d2;(function(_0x1ad41d,_0x36a7cd){const _0x3d8493=a304_0xe2d2,_0x18e7d8=_0x1ad41d();while(!![]){try{const _0x358e3a=parseInt(_0x3d8493(0xa4))/0x1+-parseInt(_0x3d8493(0xa2))/0x2*(-parseInt(_0x3d8493(0x87))/0x3)+-parseInt(_0x3d8493(0x86))/0x4*(-parseInt(_0x3d8493(0x7c))/0x5)+parseInt(_0x3d8493(0x70))/0x6+parseInt(_0x3d8493(0x76))/0x7*(parseInt(_0x3d8493(0x6f))/0x8)+-parseInt(_0x3d8493(0x7d))/0x9+parseInt(_0x3d8493(0x82))/0xa*(-parseInt(_0x3d8493(0x98))/0xb);if(_0x358e3a===_0x36a7cd)break;else _0x18e7d8['push'](_0x18e7d8['shift']());}catch(_0x7dd4e6){_0x18e7d8['push'](_0x18e7d8['shift']());}}}(a304_0x2ec9,0x8568a));import a304_0x931b47 from'winston';import a304_0x253816 from'node:fs';import a304_0x43ddd6 from'node:path';class Logger{[a304_0x41423d(0x88)];[a304_0x41423d(0x8a)];[a304_0x41423d(0x9d)]='';constructor(){const _0x7378fe=a304_0x41423d;this[_0x7378fe(0x8a)]='';}[a304_0x41423d(0xa5)](_0x5a5454){this['currentRawCommand']=_0x5a5454;}['initWinstonLogger'](){const _0x21ce6c=a304_0x41423d,_0x3ac43d=a304_0x43ddd6['dirname'](this['logFilePath']);!a304_0x253816[_0x21ce6c(0x9e)](_0x3ac43d)&&a304_0x253816[_0x21ce6c(0x6c)](_0x3ac43d,{'recursive':!![]});const _0x4e9e5e=a304_0x931b47[_0x21ce6c(0xa0)][_0x21ce6c(0x71)](a304_0x931b47[_0x21ce6c(0xa0)][_0x21ce6c(0x8d)](),a304_0x931b47[_0x21ce6c(0xa0)][_0x21ce6c(0x6d)]({'stack':!![]}),a304_0x931b47[_0x21ce6c(0xa0)][_0x21ce6c(0x75)](_0x424495=>{const _0x1aef74=_0x21ce6c,_0x581c52={'timestamp':_0x424495['timestamp']||new Date()[_0x1aef74(0x9f)](),'level':_0x424495[_0x1aef74(0x72)]||_0x1aef74(0x9b),'command':_0x424495[_0x1aef74(0xa3)]||_0x1aef74(0x81),'rawCommand':_0x424495[_0x1aef74(0x73)]||this[_0x1aef74(0x9d)]||undefined,'message':_0x424495[_0x1aef74(0x89)]||'','duration':_0x424495[_0x1aef74(0x6e)]||undefined,'details':_0x424495['details']||undefined};return JSON[_0x1aef74(0x90)](_0x581c52);}));this[_0x21ce6c(0x88)]=a304_0x931b47[_0x21ce6c(0x9a)]({'level':_0x21ce6c(0x9b),'format':_0x4e9e5e,'transports':[new a304_0x931b47[(_0x21ce6c(0x93))][(_0x21ce6c(0x8e))]({'filename':this[_0x21ce6c(0x8a)],'level':_0x21ce6c(0x9b)})],'silent':![]}),a304_0x931b47[_0x21ce6c(0x79)]({'success':_0x21ce6c(0x96),'error':_0x21ce6c(0x97),'warn':_0x21ce6c(0x8f),'info':'blue'});}['setLogPath'](_0x384e47){const _0x460ab8=a304_0x41423d;this[_0x460ab8(0x8a)]=a304_0x43ddd6['join'](_0x384e47,'.lovrabet.log'),this[_0x460ab8(0x88)]&&this[_0x460ab8(0x88)][_0x460ab8(0xa6)](),this['initWinstonLogger']();}['info'](_0x1b6367,_0xec6d85,_0x14ef31){const _0x137294=a304_0x41423d;if(!this['logFilePath']||!this[_0x137294(0x88)])return;this[_0x137294(0x88)][_0x137294(0x9b)](_0xec6d85,{'command':_0x1b6367,'details':_0x14ef31});}[a304_0x41423d(0x77)](_0xf552f8,_0x23661d,_0x4afb7e,_0x4390b8){const _0xd7bd21=a304_0x41423d;if(!this['logFilePath']||!this[_0xd7bd21(0x88)])return;this['winstonLogger'][_0xd7bd21(0x84)]('info',_0x23661d,{'level':'success','command':_0xf552f8,'duration':_0x4afb7e,'details':_0x4390b8});}[a304_0x41423d(0xa1)](_0x1ec2e4,_0x34a545,_0x12e9c9){const _0x1be32d=a304_0x41423d;if(!this['logFilePath']||!this[_0x1be32d(0x88)])return;this[_0x1be32d(0x88)][_0x1be32d(0xa1)](_0x34a545,{'command':_0x1ec2e4,'details':_0x12e9c9});}[a304_0x41423d(0x7b)](_0x32d71b,_0x25f81a,_0x2efb2a){const _0x28f977=a304_0x41423d;if(!this[_0x28f977(0x8a)]||!this[_0x28f977(0x88)])return;this[_0x28f977(0x88)]['warn'](_0x25f81a,{'command':_0x32d71b,'details':_0x2efb2a});}async[a304_0x41423d(0x80)](_0x488025,_0x3c92d1,_0x2cee98){const _0x3d3bc4=a304_0x41423d,_0x3726cb=Date[_0x3d3bc4(0x8b)]();this[_0x3d3bc4(0x9b)](_0x488025,_0x3d3bc4(0x7a)+_0x3c92d1);try{const _0x17155c=await _0x2cee98(),_0x118f1c=Date[_0x3d3bc4(0x8b)]()-_0x3726cb;return this[_0x3d3bc4(0x77)](_0x488025,_0x3d3bc4(0x7e)+_0x3c92d1,_0x118f1c),_0x17155c;}catch(_0xa8b068){const _0x4b62a2=Date['now']()-_0x3726cb;this[_0x3d3bc4(0xa1)](_0x488025,_0x3d3bc4(0x92)+_0x3c92d1,{'error':_0xa8b068 instanceof Error?_0xa8b068[_0x3d3bc4(0x89)]:String(_0xa8b068),'duration':_0x4b62a2});throw _0xa8b068;}}[a304_0x41423d(0x8c)](){const _0x3956d2=a304_0x41423d;try{if(!a304_0x253816[_0x3956d2(0x9e)](this[_0x3956d2(0x8a)]))return[];const _0x3c3c93=a304_0x253816[_0x3956d2(0x85)](this[_0x3956d2(0x8a)],_0x3956d2(0x78));return _0x3c3c93[_0x3956d2(0x83)]('\x0a')[_0x3956d2(0x94)](_0x4b3c42=>_0x4b3c42[_0x3956d2(0x95)]())[_0x3956d2(0x99)](_0x311160=>JSON['parse'](_0x311160));}catch(_0x49000f){return console[_0x3956d2(0x7b)](_0x3956d2(0x9c),_0x49000f),[];}}[a304_0x41423d(0x7f)](){const _0x22cda4=a304_0x41423d;try{a304_0x253816[_0x22cda4(0x9e)](this['logFilePath'])&&a304_0x253816[_0x22cda4(0x91)](this[_0x22cda4(0x8a)],'',_0x22cda4(0x78));}catch(_0x137c21){console[_0x22cda4(0x7b)]('Failed\x20to\x20clear\x20logs:',_0x137c21);}}[a304_0x41423d(0x74)](){const _0x32918f=a304_0x41423d;return this[_0x32918f(0x88)];}}export const logger=new Logger();
@@ -1 +1 @@
1
- (function(_0x43bfd3,_0xa1a40e){const _0x153432=a304_0x3757,_0x4626b8=_0x43bfd3();while(!![]){try{const _0x5ade65=parseInt(_0x153432(0x1df))/0x1*(-parseInt(_0x153432(0x1dc))/0x2)+-parseInt(_0x153432(0x1d3))/0x3*(-parseInt(_0x153432(0x1d2))/0x4)+parseInt(_0x153432(0x1d6))/0x5*(parseInt(_0x153432(0x1d9))/0x6)+parseInt(_0x153432(0x1de))/0x7+-parseInt(_0x153432(0x1e0))/0x8+parseInt(_0x153432(0x1d7))/0x9+parseInt(_0x153432(0x1da))/0xa*(-parseInt(_0x153432(0x1d5))/0xb);if(_0x5ade65===_0xa1a40e)break;else _0x4626b8['push'](_0x4626b8['shift']());}catch(_0x3893a3){_0x4626b8['push'](_0x4626b8['shift']());}}}(a304_0x4831,0xae976));import{CliErrors}from'../errors.js';function a304_0x4831(){const _0x59dc3f=['5958078ucEwKL','3612UeNiPl','9521664owdodS','validation','12876oXUotA','663suXjgl','isArray','1174877QTaXec','235DPiIgH','1288575CXWXag','--params\x20must\x20be\x20a\x20JSON\x20object','151230zjkPFb','30ULswOi','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','368zOGtBU','parse'];a304_0x4831=function(){return _0x59dc3f;};return a304_0x4831();}function a304_0x3757(_0x15a02f,_0x9debe1){_0x15a02f=_0x15a02f-0x1d1;const _0x483107=a304_0x4831();let _0x375742=_0x483107[_0x15a02f];return _0x375742;}export function parseJsonParams(_0xda5442){const _0x1d62f8=a304_0x3757;if(!_0xda5442)return undefined;let _0x2b36ae;try{_0x2b36ae=JSON[_0x1d62f8(0x1dd)](_0xda5442);}catch{throw CliErrors[_0x1d62f8(0x1d1)]('Invalid\x20JSON\x20for\x20--params:\x20'+_0xda5442);}if(!_0x2b36ae||typeof _0x2b36ae!=='object'||Array[_0x1d62f8(0x1d4)](_0x2b36ae))throw CliErrors[_0x1d62f8(0x1d1)](_0x1d62f8(0x1d8),_0x1d62f8(0x1db));return _0x2b36ae;}
1
+ (function(_0x77c7f5,_0x31c9aa){const _0x56148d=a305_0x5200,_0x46e155=_0x77c7f5();while(!![]){try{const _0x219e20=-parseInt(_0x56148d(0x186))/0x1*(parseInt(_0x56148d(0x183))/0x2)+parseInt(_0x56148d(0x18e))/0x3+parseInt(_0x56148d(0x18f))/0x4*(-parseInt(_0x56148d(0x18b))/0x5)+-parseInt(_0x56148d(0x184))/0x6+parseInt(_0x56148d(0x18a))/0x7*(parseInt(_0x56148d(0x188))/0x8)+-parseInt(_0x56148d(0x180))/0x9+parseInt(_0x56148d(0x18c))/0xa*(parseInt(_0x56148d(0x189))/0xb);if(_0x219e20===_0x31c9aa)break;else _0x46e155['push'](_0x46e155['shift']());}catch(_0x16de43){_0x46e155['push'](_0x46e155['shift']());}}}(a305_0x5115,0x46d25));function a305_0x5200(_0x4313b8,_0x5e7eb1){_0x4313b8=_0x4313b8-0x180;const _0x5115f1=a305_0x5115();let _0x520056=_0x5115f1[_0x4313b8];return _0x520056;}import{CliErrors}from'../errors.js';function a305_0x5115(){const _0x30bf13=['1016yWRxqw','11uzUTZX','9772XAKdDN','270ztimBF','9889270fOgohe','validation','486531SPSHwf','35204HmUbek','object','1625931PcUqDh','Invalid\x20JSON\x20for\x20--params:\x20','--params\x20must\x20be\x20a\x20JSON\x20object','8PjeMYk','730596cIdFom','parse','65158jVgFtZ','isArray'];a305_0x5115=function(){return _0x30bf13;};return a305_0x5115();}export function parseJsonParams(_0xbb26b5){const _0xd62404=a305_0x5200;if(!_0xbb26b5)return undefined;let _0x443a23;try{_0x443a23=JSON[_0xd62404(0x185)](_0xbb26b5);}catch{throw CliErrors[_0xd62404(0x18d)](_0xd62404(0x181)+_0xbb26b5);}if(!_0x443a23||typeof _0x443a23!==_0xd62404(0x190)||Array[_0xd62404(0x187)](_0x443a23))throw CliErrors['validation'](_0xd62404(0x182),'Example:\x20--params\x20\x27{\x22id\x22:123}\x27');return _0x443a23;}
@@ -1 +1 @@
1
- function a305_0x3686(_0x57f62e,_0x33953a){_0x57f62e=_0x57f62e-0x131;const _0xf89080=a305_0xf890();let _0x36865e=_0xf89080[_0x57f62e];return _0x36865e;}const a305_0x283903=a305_0x3686;(function(_0x185a87,_0x199e50){const _0x4908c4=a305_0x3686,_0x18fa1f=_0x185a87();while(!![]){try{const _0xb16439=-parseInt(_0x4908c4(0x134))/0x1+-parseInt(_0x4908c4(0x137))/0x2+-parseInt(_0x4908c4(0x138))/0x3*(parseInt(_0x4908c4(0x13b))/0x4)+-parseInt(_0x4908c4(0x136))/0x5+parseInt(_0x4908c4(0x135))/0x6*(parseInt(_0x4908c4(0x131))/0x7)+parseInt(_0x4908c4(0x132))/0x8*(parseInt(_0x4908c4(0x13c))/0x9)+parseInt(_0x4908c4(0x139))/0xa;if(_0xb16439===_0x199e50)break;else _0x18fa1f['push'](_0x18fa1f['shift']());}catch(_0x291fc0){_0x18fa1f['push'](_0x18fa1f['shift']());}}}(a305_0xf890,0xd0622));function a305_0xf890(){const _0x2a12b4=['99768NWafsF','platform','1189905ZwCXKy','24yHjhVF','5183410ROaUjD','147648LSUqCf','137721nKkhep','18780690mvbaAh','win32','68McmRSX','585mEfAXd','.cmd','2179947zCoavn'];a305_0xf890=function(){return _0x2a12b4;};return a305_0xf890();}export const isWindows=process[a305_0x283903(0x133)]===a305_0x283903(0x13a);export function resolveNpmBin(_0x2bf386){const _0x4f3e59=a305_0x283903;return isWindows?_0x2bf386+_0x4f3e59(0x13d):_0x2bf386;}
1
+ function a306_0x2bc0(){const _0x45fd54=['3450235HIfJRK','210452mCYBlp','103HxqPgZ','15914zIDFpK','platform','win32','45eclQTm','9909180rqGnPa','2985120rUfZvL','2773260yoBfca','.cmd','538784EUpBpv'];a306_0x2bc0=function(){return _0x45fd54;};return a306_0x2bc0();}function a306_0x374a(_0x242395,_0x59ebe0){_0x242395=_0x242395-0x148;const _0x2bc069=a306_0x2bc0();let _0x374a7e=_0x2bc069[_0x242395];return _0x374a7e;}const a306_0x2c64da=a306_0x374a;(function(_0x4615c4,_0x251cb2){const _0x379616=a306_0x374a,_0x468058=_0x4615c4();while(!![]){try{const _0x2e50ca=parseInt(_0x379616(0x14a))/0x1*(parseInt(_0x379616(0x14b))/0x2)+-parseInt(_0x379616(0x150))/0x3+parseInt(_0x379616(0x149))/0x4+-parseInt(_0x379616(0x148))/0x5+parseInt(_0x379616(0x14f))/0x6+parseInt(_0x379616(0x151))/0x7+parseInt(_0x379616(0x153))/0x8*(-parseInt(_0x379616(0x14e))/0x9);if(_0x2e50ca===_0x251cb2)break;else _0x468058['push'](_0x468058['shift']());}catch(_0x354e62){_0x468058['push'](_0x468058['shift']());}}}(a306_0x2bc0,0xdb413));export const isWindows=process[a306_0x2c64da(0x14c)]===a306_0x2c64da(0x14d);export function resolveNpmBin(_0x5644a3){const _0x6a92fb=a306_0x2c64da;return isWindows?_0x5644a3+_0x6a92fb(0x152):_0x5644a3;}
@@ -1 +1 @@
1
- export function sleep(_0x5a83fd){return new Promise(_0x4cfaca=>setTimeout(_0x4cfaca,_0x5a83fd));}
1
+ export function sleep(_0x1bbf77){return new Promise(_0x2fd309=>setTimeout(_0x2fd309,_0x1bbf77));}
@@ -1 +1 @@
1
- const a307_0x5d06aa=a307_0x5760;function a307_0x5760(_0x4d6ae2,_0x44ede8){_0x4d6ae2=_0x4d6ae2-0xab;const _0x369064=a307_0x3690();let _0x57607a=_0x369064[_0x4d6ae2];return _0x57607a;}(function(_0x290ad4,_0x30577a){const _0x413e0c=a307_0x5760,_0x51526f=_0x290ad4();while(!![]){try{const _0x349590=parseInt(_0x413e0c(0xd7))/0x1*(parseInt(_0x413e0c(0xbf))/0x2)+parseInt(_0x413e0c(0xcc))/0x3*(-parseInt(_0x413e0c(0xb7))/0x4)+-parseInt(_0x413e0c(0xb0))/0x5*(parseInt(_0x413e0c(0xd8))/0x6)+-parseInt(_0x413e0c(0xc1))/0x7*(-parseInt(_0x413e0c(0xbe))/0x8)+-parseInt(_0x413e0c(0xea))/0x9+-parseInt(_0x413e0c(0xe2))/0xa+parseInt(_0x413e0c(0xb8))/0xb;if(_0x349590===_0x30577a)break;else _0x51526f['push'](_0x51526f['shift']());}catch(_0x52b335){_0x51526f['push'](_0x51526f['shift']());}}}(a307_0x3690,0x2a0c0));import a307_0x2ae4c4 from'node:fs';function a307_0x3690(){const _0x2e8dda=['111aYSOgl','6EOEsvK','mkdir','now','Starting\x20template\x20content\x20replacement','name','formatLocalTimestamp','tableName','toLowerCase','getDate','utf8','716090CPDIea','toISOString','getMonth','map','processTemplate','split','toUpperCase','getSeconds','912123bbpKXT','error','isDirectory','includes','getFullYear','YourModel','pop','replace','pad','template','916915zWlLZd','replaceContent','.jsx','alias:\x20\x22','processFile','default','toDisplayTitle','76GeqOtB','6552315SlLhrs','success','writeFile','padStart','.js','alias','8HRyqcY','2402QyBuce','api','106393WriRQH','readFile','\x0a\x20\x20\x20\x20{\x20','datasetCode','Template\x20content\x20replacement\x20completed','datasetCode:\x20\x22','charAt','join','processDirectory','copyFile','.tpl','34044Zdakqk','.ts','.tsx','extname','.json','promises','info','slice','endsWith','Template\x20content\x20replacement\x20failed','.scss'];a307_0x3690=function(){return _0x2e8dda;};return a307_0x3690();}import a307_0x599f30 from'node:path';import{logger}from'../utils/logger.js';import{getCliVersion}from'../utils/version.js';const CLI_VERSION=getCliVersion();export class TemplateReplacer{static['pad'](_0x2baff3){const _0x518b83=a307_0x5760;return String(_0x2baff3)[_0x518b83(0xbb)](0x2,'0');}static[a307_0x5d06aa(0xdd)](_0x3d9aeb){const _0x2bfd1e=a307_0x5d06aa,_0xbebd7f=_0x3d9aeb[_0x2bfd1e(0xee)](),_0x3b0473=this['pad'](_0x3d9aeb[_0x2bfd1e(0xe4)]()+0x1),_0x2b73cf=this[_0x2bfd1e(0xae)](_0x3d9aeb[_0x2bfd1e(0xe0)]()),_0x5e781a=this['pad'](_0x3d9aeb['getHours']()),_0x4b5397=this[_0x2bfd1e(0xae)](_0x3d9aeb['getMinutes']()),_0x22139f=this[_0x2bfd1e(0xae)](_0x3d9aeb[_0x2bfd1e(0xe9)]());return{'createdAt':_0xbebd7f+'-'+_0x3b0473+'-'+_0x2b73cf+'\x20'+_0x5e781a+':'+_0x4b5397+':'+_0x22139f,'createdDate':_0xbebd7f+'-'+_0x3b0473+'-'+_0x2b73cf,'createdTime':_0x5e781a+':'+_0x4b5397+':'+_0x22139f};}static['toComponentName'](_0x498a9a){const _0x36eedb=a307_0x5d06aa,_0x381051=_0x498a9a['split']('/')[_0x36eedb(0xac)]()||_0x498a9a;return _0x381051['split']('-')['map'](_0x835232=>_0x835232[_0x36eedb(0xc7)](0x0)[_0x36eedb(0xe8)]()+_0x835232[_0x36eedb(0xd3)](0x1)['toLowerCase']())['join']('');}static[a307_0x5d06aa(0xb6)](_0xa35d17){const _0x1c2194=a307_0x5d06aa,_0x501b0e=_0xa35d17[_0x1c2194(0xe7)]('/')[_0x1c2194(0xac)]()||_0xa35d17;return _0x501b0e[_0x1c2194(0xe7)]('-')[_0x1c2194(0xe5)](_0x4fe2e1=>_0x4fe2e1[_0x1c2194(0xc7)](0x0)[_0x1c2194(0xe8)]()+_0x4fe2e1[_0x1c2194(0xd3)](0x1)[_0x1c2194(0xdf)]())[_0x1c2194(0xc8)]('\x20');}static[a307_0x5d06aa(0xb1)](_0x4775cd,_0x51b289,_0x15d56b){const _0x1a3390=a307_0x5d06aa,_0x344532=this['toComponentName'](_0x51b289),_0x29b881=this[_0x1a3390(0xb6)](_0x51b289),{createdAt:_0x3b0a05,createdDate:_0x6ebf8a,createdTime:_0x5d05f6}=this[_0x1a3390(0xdd)](new Date());let _0x3b6947=_0x4775cd[_0x1a3390(0xad)](/\{CliVersion\}/g,CLI_VERSION)[_0x1a3390(0xad)](/\{ComponentName\}/g,_0x344532)[_0x1a3390(0xad)](/\{DisplayTitle\}/g,_0x29b881)[_0x1a3390(0xad)](/\{PageName\}/g,_0x51b289)[_0x1a3390(0xad)](/\{TemplateName\}/g,_0x15d56b)[_0x1a3390(0xad)](/\{CreatedAt\}/g,_0x3b0a05)[_0x1a3390(0xad)](/\{CreatedDate\}/g,_0x6ebf8a)[_0x1a3390(0xad)](/\{CreatedTime\}/g,_0x5d05f6);return _0x3b6947;}static['replaceApiContent'](_0x3d8367,_0xed4c3e,_0x4b18d0,_0x2b5ab2,_0x5b2b32,_0x30dedf,_0x1dda5b,_0x35607a){const _0x1d9bf5=a307_0x5d06aa,_0x5b8ebd=new Date(),_0x1da689=_0x5b8ebd[_0x1d9bf5(0xe3)](),_0x57e7a0=_0x4b18d0[_0x1d9bf5(0xe5)](_0x553e6c=>{const _0x33df5d=_0x1d9bf5,_0x51f90c=[_0x33df5d(0xc6)+_0x553e6c[_0x33df5d(0xc4)]+'\x22','tableName:\x20\x22'+_0x553e6c[_0x33df5d(0xde)]+'\x22','name:\x20\x22'+_0x553e6c[_0x33df5d(0xdc)]+'\x22'];return _0x553e6c[_0x33df5d(0xbd)]&&_0x51f90c['push'](_0x33df5d(0xb3)+_0x553e6c[_0x33df5d(0xbd)]+'\x22'),_0x33df5d(0xc3)+_0x51f90c[_0x33df5d(0xc8)](',\x20')+'\x20},';})[_0x1d9bf5(0xc8)](''),_0x1e0cda=_0x2b5ab2||_0x4b18d0[0x0]?.[_0x1d9bf5(0xbd)]||_0x1d9bf5(0xab);let _0xb4d2d7=_0x3d8367[_0x1d9bf5(0xad)](/\{AppCode\}/g,_0xed4c3e)[_0x1d9bf5(0xad)](/\{ModelConfigs\}/g,_0x57e7a0)[_0x1d9bf5(0xad)](/\{ExampleModelName\}/g,_0x1e0cda)[_0x1d9bf5(0xad)](/\{ApiFileName\}/g,_0x5b2b32||_0x1d9bf5(0xc0))['replace'](/\{ConfigName\}/g,_0x30dedf||_0x1d9bf5(0xb5))[_0x1d9bf5(0xad)](/\{ClientConfigParam\}/g,_0x1dda5b||'')['replace'](/\{VarPrefix\}/g,_0x35607a||'LOVRABET')[_0x1d9bf5(0xad)](/\{CreatedAt\}/g,_0x1da689);return _0xb4d2d7;}static async[a307_0x5d06aa(0xe6)](_0x475a25,_0x69d970,_0x4271d3,_0xb4b26b,_0x3e171d=!![]){const _0x1f23ca=a307_0x5d06aa,_0x264f81=Date[_0x1f23ca(0xda)]();try{_0x3e171d&&logger[_0x1f23ca(0xd2)](_0x1f23ca(0xaf),_0x1f23ca(0xdb),{'templatePath':_0x475a25,'targetPath':_0x69d970,'pageName':_0x4271d3,'templateName':_0xb4b26b});await a307_0x2ae4c4['promises'][_0x1f23ca(0xd9)](_0x69d970,{'recursive':!![]}),await this[_0x1f23ca(0xc9)](_0x475a25,_0x69d970,_0x4271d3,_0xb4b26b);if(_0x3e171d){const _0x203d1b=Date['now']()-_0x264f81;logger[_0x1f23ca(0xb9)]('template',_0x1f23ca(0xc5),_0x203d1b,{'pageName':_0x4271d3,'templateName':_0xb4b26b});}}catch(_0x17af14){if(_0x3e171d){const _0x15a197=Date[_0x1f23ca(0xda)]()-_0x264f81;logger[_0x1f23ca(0xeb)](_0x1f23ca(0xaf),_0x1f23ca(0xd5),{'templatePath':_0x475a25,'targetPath':_0x69d970,'pageName':_0x4271d3,'templateName':_0xb4b26b,'error':_0x17af14 instanceof Error?_0x17af14['message']:String(_0x17af14),'duration':_0x15a197});}throw _0x17af14;}}static async['processDirectory'](_0x12fb86,_0x4cb2db,_0x12ea29,_0x43239e){const _0x473e54=a307_0x5d06aa,_0x4050c9=await a307_0x2ae4c4['promises']['readdir'](_0x12fb86,{'withFileTypes':!![]});for(const _0x436c6d of _0x4050c9){const _0x1eb991=a307_0x599f30[_0x473e54(0xc8)](_0x12fb86,_0x436c6d[_0x473e54(0xdc)]);let _0x1ad06f=a307_0x599f30[_0x473e54(0xc8)](_0x4cb2db,_0x436c6d['name']);_0x436c6d[_0x473e54(0xdc)][_0x473e54(0xd4)](_0x473e54(0xcb))&&(_0x1ad06f=a307_0x599f30['join'](_0x4cb2db,_0x436c6d[_0x473e54(0xdc)][_0x473e54(0xad)](/\.tpl$/,'')));if(_0x436c6d[_0x473e54(0xec)]())await a307_0x2ae4c4['promises'][_0x473e54(0xd9)](_0x1ad06f,{'recursive':!![]}),await this[_0x473e54(0xc9)](_0x1eb991,_0x1ad06f,_0x12ea29,_0x43239e);else _0x436c6d['isFile']()&&await this[_0x473e54(0xb4)](_0x1eb991,_0x1ad06f,_0x12ea29,_0x43239e);}}static async['processFile'](_0x1bd924,_0x1be1ee,_0x57c044,_0x385873){const _0x4b3f51=a307_0x5d06aa,_0x10edaa=a307_0x599f30[_0x4b3f51(0xcf)](_0x1bd924)[_0x4b3f51(0xdf)]();_0x1bd924[_0x4b3f51(0xd4)](_0x4b3f51(0xcb))&&(_0x1be1ee=_0x1be1ee[_0x4b3f51(0xad)](/\.tpl$/,''));const _0x534a54=[_0x4b3f51(0xce),_0x4b3f51(0xcd),_0x4b3f51(0xb2),_0x4b3f51(0xbc),_0x4b3f51(0xd0),'.md','.css',_0x4b3f51(0xd6),_0x4b3f51(0xcb)];if(_0x534a54[_0x4b3f51(0xed)](_0x10edaa)||_0x1bd924[_0x4b3f51(0xd4)](_0x4b3f51(0xcb))){const _0x37e0ce=await a307_0x2ae4c4[_0x4b3f51(0xd1)][_0x4b3f51(0xc2)](_0x1bd924,_0x4b3f51(0xe1)),_0x20ed08=this[_0x4b3f51(0xb1)](_0x37e0ce,_0x57c044,_0x385873);await a307_0x2ae4c4['promises'][_0x4b3f51(0xba)](_0x1be1ee,_0x20ed08,_0x4b3f51(0xe1));}else await a307_0x2ae4c4[_0x4b3f51(0xd1)][_0x4b3f51(0xca)](_0x1bd924,_0x1be1ee);}}
1
+ const a308_0x4c5585=a308_0x2e05;(function(_0x549282,_0x4d72d8){const _0x3f889e=a308_0x2e05,_0x1890b0=_0x549282();while(!![]){try{const _0x537944=-parseInt(_0x3f889e(0x7e))/0x1*(-parseInt(_0x3f889e(0xa2))/0x2)+parseInt(_0x3f889e(0x89))/0x3*(-parseInt(_0x3f889e(0x70))/0x4)+parseInt(_0x3f889e(0xaf))/0x5+parseInt(_0x3f889e(0x99))/0x6*(-parseInt(_0x3f889e(0x97))/0x7)+-parseInt(_0x3f889e(0x76))/0x8+parseInt(_0x3f889e(0x6e))/0x9*(-parseInt(_0x3f889e(0x82))/0xa)+parseInt(_0x3f889e(0x9b))/0xb;if(_0x537944===_0x4d72d8)break;else _0x1890b0['push'](_0x1890b0['shift']());}catch(_0x5c3da7){_0x1890b0['push'](_0x1890b0['shift']());}}}(a308_0xc930,0x97b04));import a308_0x1a3b79 from'node:fs';function a308_0x2e05(_0x52c839,_0x34f724){_0x52c839=_0x52c839-0x6a;const _0xc930e0=a308_0xc930();let _0x2e0533=_0xc930e0[_0x52c839];return _0x2e0533;}import a308_0x1fd478 from'node:path';import{logger}from'../utils/logger.js';import{getCliVersion}from'../utils/version.js';const CLI_VERSION=getCliVersion();function a308_0xc930(){const _0x380d03=['promises','7cESevP','default','1360362fwxzgT','utf8','15273819FPLvzn','pad','extname','tableName','info','alias:\x20\x22','toUpperCase','4610cIhYGR','name','.tsx','datasetCode','formatLocalTimestamp','api','processTemplate','readdir','\x20},','.js','mkdir','Template\x20content\x20replacement\x20failed','.ts','2372590ruYqCL','writeFile','.scss','toComponentName','toDisplayTitle','9OfpdmF','readFile','3698068IUCXgf','isDirectory','copyFile','.md','alias','toLowerCase','2516320mDOUEL','\x0a\x20\x20\x20\x20{\x20','.json','replaceApiContent','.tpl','tableName:\x20\x22','pop','endsWith','235Teaixn','.css','replace','getMonth','3176220FSmxBG','toISOString','join','.jsx','datasetCode:\x20\x22','getMinutes','error','3pkROaa','now','getSeconds','padStart','slice','Starting\x20template\x20content\x20replacement','charAt','replaceContent','template','includes','split','processFile','message'];a308_0xc930=function(){return _0x380d03;};return a308_0xc930();}export class TemplateReplacer{static[a308_0x4c5585(0x9c)](_0x3f0167){const _0x183258=a308_0x4c5585;return String(_0x3f0167)[_0x183258(0x8c)](0x2,'0');}static[a308_0x4c5585(0xa6)](_0x18f9ed){const _0x3890e7=a308_0x4c5585,_0x33798b=_0x18f9ed['getFullYear'](),_0x409f5a=this[_0x3890e7(0x9c)](_0x18f9ed[_0x3890e7(0x81)]()+0x1),_0x58dab0=this[_0x3890e7(0x9c)](_0x18f9ed['getDate']()),_0x2850fd=this[_0x3890e7(0x9c)](_0x18f9ed['getHours']()),_0x57a48f=this[_0x3890e7(0x9c)](_0x18f9ed[_0x3890e7(0x87)]()),_0x43e1fa=this[_0x3890e7(0x9c)](_0x18f9ed[_0x3890e7(0x8b)]());return{'createdAt':_0x33798b+'-'+_0x409f5a+'-'+_0x58dab0+'\x20'+_0x2850fd+':'+_0x57a48f+':'+_0x43e1fa,'createdDate':_0x33798b+'-'+_0x409f5a+'-'+_0x58dab0,'createdTime':_0x2850fd+':'+_0x57a48f+':'+_0x43e1fa};}static['toComponentName'](_0x413c6f){const _0x4a171d=a308_0x4c5585,_0x565a8a=_0x413c6f[_0x4a171d(0x93)]('/')[_0x4a171d(0x7c)]()||_0x413c6f;return _0x565a8a[_0x4a171d(0x93)]('-')['map'](_0x246bd4=>_0x246bd4[_0x4a171d(0x8f)](0x0)[_0x4a171d(0xa1)]()+_0x246bd4['slice'](0x1)['toLowerCase']())[_0x4a171d(0x84)]('');}static[a308_0x4c5585(0x6d)](_0x412a06){const _0x441ce2=a308_0x4c5585,_0x710bea=_0x412a06[_0x441ce2(0x93)]('/')['pop']()||_0x412a06;return _0x710bea['split']('-')['map'](_0x3db81c=>_0x3db81c[_0x441ce2(0x8f)](0x0)['toUpperCase']()+_0x3db81c[_0x441ce2(0x8d)](0x1)[_0x441ce2(0x75)]())[_0x441ce2(0x84)]('\x20');}static[a308_0x4c5585(0x90)](_0x208ae0,_0x409dbc,_0x344aa6){const _0x230dd5=a308_0x4c5585,_0x29595b=this[_0x230dd5(0x6c)](_0x409dbc),_0x5f3c71=this[_0x230dd5(0x6d)](_0x409dbc),{createdAt:_0x1b7101,createdDate:_0x1771bc,createdTime:_0x2622f2}=this['formatLocalTimestamp'](new Date());let _0x51bd52=_0x208ae0[_0x230dd5(0x80)](/\{CliVersion\}/g,CLI_VERSION)['replace'](/\{ComponentName\}/g,_0x29595b)['replace'](/\{DisplayTitle\}/g,_0x5f3c71)[_0x230dd5(0x80)](/\{PageName\}/g,_0x409dbc)[_0x230dd5(0x80)](/\{TemplateName\}/g,_0x344aa6)[_0x230dd5(0x80)](/\{CreatedAt\}/g,_0x1b7101)[_0x230dd5(0x80)](/\{CreatedDate\}/g,_0x1771bc)['replace'](/\{CreatedTime\}/g,_0x2622f2);return _0x51bd52;}static[a308_0x4c5585(0x79)](_0x49451f,_0x3334d7,_0x25aa08,_0x2567b4,_0x4f9cb3,_0x569c13,_0x50a20f,_0x614178){const _0x3e57a=a308_0x4c5585,_0x153e5c=new Date(),_0x225ea7=_0x153e5c[_0x3e57a(0x83)](),_0x31a4ba=_0x25aa08['map'](_0x1cbb76=>{const _0x10629a=_0x3e57a,_0x3702a0=[_0x10629a(0x86)+_0x1cbb76[_0x10629a(0xa5)]+'\x22',_0x10629a(0x7b)+_0x1cbb76[_0x10629a(0x9e)]+'\x22','name:\x20\x22'+_0x1cbb76[_0x10629a(0xa3)]+'\x22'];return _0x1cbb76[_0x10629a(0x74)]&&_0x3702a0['push'](_0x10629a(0xa0)+_0x1cbb76[_0x10629a(0x74)]+'\x22'),_0x10629a(0x77)+_0x3702a0[_0x10629a(0x84)](',\x20')+_0x10629a(0xaa);})['join'](''),_0x55a662=_0x2567b4||_0x25aa08[0x0]?.[_0x3e57a(0x74)]||'YourModel';let _0x3cff91=_0x49451f[_0x3e57a(0x80)](/\{AppCode\}/g,_0x3334d7)[_0x3e57a(0x80)](/\{ModelConfigs\}/g,_0x31a4ba)[_0x3e57a(0x80)](/\{ExampleModelName\}/g,_0x55a662)[_0x3e57a(0x80)](/\{ApiFileName\}/g,_0x4f9cb3||_0x3e57a(0xa7))[_0x3e57a(0x80)](/\{ConfigName\}/g,_0x569c13||_0x3e57a(0x98))[_0x3e57a(0x80)](/\{ClientConfigParam\}/g,_0x50a20f||'')[_0x3e57a(0x80)](/\{VarPrefix\}/g,_0x614178||'LOVRABET')[_0x3e57a(0x80)](/\{CreatedAt\}/g,_0x225ea7);return _0x3cff91;}static async[a308_0x4c5585(0xa8)](_0x54da1c,_0x46d7c2,_0x1e47ea,_0x339457,_0x5b8d8b=!![]){const _0x47ddb3=a308_0x4c5585,_0x23c4e5=Date[_0x47ddb3(0x8a)]();try{_0x5b8d8b&&logger[_0x47ddb3(0x9f)](_0x47ddb3(0x91),_0x47ddb3(0x8e),{'templatePath':_0x54da1c,'targetPath':_0x46d7c2,'pageName':_0x1e47ea,'templateName':_0x339457});await a308_0x1a3b79[_0x47ddb3(0x96)][_0x47ddb3(0xac)](_0x46d7c2,{'recursive':!![]}),await this['processDirectory'](_0x54da1c,_0x46d7c2,_0x1e47ea,_0x339457);if(_0x5b8d8b){const _0x51a9ee=Date[_0x47ddb3(0x8a)]()-_0x23c4e5;logger['success'](_0x47ddb3(0x91),'Template\x20content\x20replacement\x20completed',_0x51a9ee,{'pageName':_0x1e47ea,'templateName':_0x339457});}}catch(_0x348c0a){if(_0x5b8d8b){const _0x290e14=Date[_0x47ddb3(0x8a)]()-_0x23c4e5;logger[_0x47ddb3(0x88)](_0x47ddb3(0x91),_0x47ddb3(0xad),{'templatePath':_0x54da1c,'targetPath':_0x46d7c2,'pageName':_0x1e47ea,'templateName':_0x339457,'error':_0x348c0a instanceof Error?_0x348c0a[_0x47ddb3(0x95)]:String(_0x348c0a),'duration':_0x290e14});}throw _0x348c0a;}}static async['processDirectory'](_0xaa0b80,_0x59637d,_0x5b2b00,_0x2eca9c){const _0x59503a=a308_0x4c5585,_0x583940=await a308_0x1a3b79[_0x59503a(0x96)][_0x59503a(0xa9)](_0xaa0b80,{'withFileTypes':!![]});for(const _0x167ffd of _0x583940){const _0x4f54d2=a308_0x1fd478['join'](_0xaa0b80,_0x167ffd['name']);let _0x4d0d05=a308_0x1fd478[_0x59503a(0x84)](_0x59637d,_0x167ffd['name']);_0x167ffd['name']['endsWith'](_0x59503a(0x7a))&&(_0x4d0d05=a308_0x1fd478['join'](_0x59637d,_0x167ffd['name'][_0x59503a(0x80)](/\.tpl$/,'')));if(_0x167ffd[_0x59503a(0x71)]())await a308_0x1a3b79[_0x59503a(0x96)][_0x59503a(0xac)](_0x4d0d05,{'recursive':!![]}),await this['processDirectory'](_0x4f54d2,_0x4d0d05,_0x5b2b00,_0x2eca9c);else _0x167ffd['isFile']()&&await this['processFile'](_0x4f54d2,_0x4d0d05,_0x5b2b00,_0x2eca9c);}}static async[a308_0x4c5585(0x94)](_0x3a48ef,_0x22e538,_0x5258e2,_0x49f4af){const _0x9a4aa3=a308_0x4c5585,_0x2ed6a1=a308_0x1fd478[_0x9a4aa3(0x9d)](_0x3a48ef)[_0x9a4aa3(0x75)]();_0x3a48ef[_0x9a4aa3(0x7d)](_0x9a4aa3(0x7a))&&(_0x22e538=_0x22e538[_0x9a4aa3(0x80)](/\.tpl$/,''));const _0x286de6=[_0x9a4aa3(0xa4),_0x9a4aa3(0xae),_0x9a4aa3(0x85),_0x9a4aa3(0xab),_0x9a4aa3(0x78),_0x9a4aa3(0x73),_0x9a4aa3(0x7f),_0x9a4aa3(0x6b),_0x9a4aa3(0x7a)];if(_0x286de6[_0x9a4aa3(0x92)](_0x2ed6a1)||_0x3a48ef['endsWith']('.tpl')){const _0x5f11b1=await a308_0x1a3b79[_0x9a4aa3(0x96)][_0x9a4aa3(0x6f)](_0x3a48ef,_0x9a4aa3(0x9a)),_0x5bd06d=this['replaceContent'](_0x5f11b1,_0x5258e2,_0x49f4af);await a308_0x1a3b79['promises'][_0x9a4aa3(0x6a)](_0x22e538,_0x5bd06d,_0x9a4aa3(0x9a));}else await a308_0x1a3b79[_0x9a4aa3(0x96)][_0x9a4aa3(0x72)](_0x3a48ef,_0x22e538);}}
@@ -1 +1 @@
1
- (function(_0x42c7de,_0x2e2bdc){const _0x4d05bc=a308_0xef00,_0x3c366c=_0x42c7de();while(!![]){try{const _0x39d948=-parseInt(_0x4d05bc(0x1c0))/0x1*(-parseInt(_0x4d05bc(0x1b8))/0x2)+-parseInt(_0x4d05bc(0x1b6))/0x3+parseInt(_0x4d05bc(0x1b9))/0x4*(parseInt(_0x4d05bc(0x1d3))/0x5)+-parseInt(_0x4d05bc(0x1bf))/0x6*(parseInt(_0x4d05bc(0x1d0))/0x7)+parseInt(_0x4d05bc(0x1b4))/0x8*(-parseInt(_0x4d05bc(0x1c7))/0x9)+-parseInt(_0x4d05bc(0x1ce))/0xa+parseInt(_0x4d05bc(0x1d1))/0xb*(parseInt(_0x4d05bc(0x1d4))/0xc);if(_0x39d948===_0x2e2bdc)break;else _0x3c366c['push'](_0x3c366c['shift']());}catch(_0x754b86){_0x3c366c['push'](_0x3c366c['shift']());}}}(a308_0x3d68,0x59325));import{mkdir,readFile,writeFile}from'node:fs/promises';import{homedir}from'node:os';import{dirname,join}from'node:path';import a308_0x586753 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 _0x46aedf=a308_0xef00,_0x324727=process.env.RABETBASE_NO_UPDATE_NOTICE?.['trim']()[_0x46aedf(0x1bd)]();return _0x324727==='1'||_0x324727===_0x46aedf(0x1ba)||_0x324727===_0x46aedf(0x1c6);}function cacheRoot(){const _0x2a1b2d=a308_0xef00;return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),_0x2a1b2d(0x1c3));}export function getUpdateNoticeCachePath(){const _0x194897=a308_0xef00;return join(cacheRoot(),_0x194897(0x1c5),_0x194897(0x1bc));}async function readUpdateNoticeCache(){const _0x10a440=a308_0xef00;try{const _0x2a2920=await readFile(getUpdateNoticeCachePath(),_0x10a440(0x1cd)),_0x23afe8=JSON[_0x10a440(0x1c4)](_0x2a2920);if(!_0x23afe8||typeof _0x23afe8!==_0x10a440(0x1b7))return{};return _0x23afe8;}catch{return{};}}async function writeUpdateNoticeCache(_0x4a8a3c){const _0x2a35f2=a308_0xef00;try{const _0x11fffd=getUpdateNoticeCachePath();await mkdir(dirname(_0x11fffd),{'recursive':!![]}),await writeFile(_0x11fffd,JSON['stringify'](_0x4a8a3c,null,0x2)+'\x0a',_0x2a35f2(0x1cd));}catch{}}function isFreshCheck(_0x275b42,_0x3ef3ab){const _0x5b4e68=a308_0xef00;return typeof _0x275b42[_0x5b4e68(0x1cc)]===_0x5b4e68(0x1ca)&&_0x3ef3ab-_0x275b42[_0x5b4e68(0x1cc)]<UPDATE_CHECK_TTL_MS;}function a308_0xef00(_0x21f807,_0x3fa9ac){_0x21f807=_0x21f807-0x1b4;const _0x3d6888=a308_0x3d68();let _0xef0089=_0x3d6888[_0x21f807];return _0xef0089;}function isRecentlyNotified(_0x9b949c,_0x5df6a6,_0x52d141){const _0x278266=a308_0xef00;return _0x9b949c[_0x278266(0x1c2)]===_0x5df6a6&&typeof _0x9b949c[_0x278266(0x1c8)]===_0x278266(0x1ca)&&_0x52d141-_0x9b949c[_0x278266(0x1c8)]<UPDATE_NOTICE_TTL_MS;}export function buildNpmVersionUrl(_0x281a46){const _0x5f354a=a308_0xef00;return _0x5f354a(0x1bb)+NPM_PACKAGE_NAME+_0x5f354a(0x1c1)+_0x281a46;}export async function resolveLatestUpdateNotice(){const _0x25af2c=a308_0xef00;if(isUpdateNoticeDisabled())return null;try{const _0x55fe5f=Date[_0x25af2c(0x1c9)](),_0x2dc339=getCliVersion(),_0xf20e13=await readUpdateNoticeCache();let _0x19af13=isFreshCheck(_0xf20e13,_0x55fe5f)?_0xf20e13['latest']?.['trim']():undefined;if(!_0x19af13&&!isFreshCheck(_0xf20e13,_0x55fe5f)){const _0x41e059=await getCliVersionPolicy();_0x19af13=_0x41e059?.[_0x25af2c(0x1cb)]?.['trim']()||undefined,await writeUpdateNoticeCache({..._0xf20e13,'checkedAt':_0x55fe5f,'latest':_0x19af13,'failed':!_0x19af13});}if(!_0x19af13||!a308_0x586753[_0x25af2c(0x1cf)](_0x2dc339)||!a308_0x586753[_0x25af2c(0x1cf)](_0x19af13))return null;if(a308_0x586753['gte'](_0x2dc339,_0x19af13))return null;if(isRecentlyNotified(_0xf20e13,_0x19af13,_0x55fe5f))return null;const _0x3a9cc7=CLI_BIN_NAME+_0x25af2c(0x1be);return await writeUpdateNoticeCache({..._0xf20e13,'checkedAt':isFreshCheck(_0xf20e13,_0x55fe5f)?_0xf20e13[_0x25af2c(0x1cc)]:_0x55fe5f,'latest':_0x19af13,'failed':![],'lastNotifiedVersion':_0x19af13,'lastNotifiedAt':_0x55fe5f}),{'command':_0x3a9cc7,'current':_0x2dc339,'latest':_0x19af13,'url':buildNpmVersionUrl(_0x19af13),'message':CLI_BIN_NAME+'\x20'+_0x19af13+_0x25af2c(0x1b5)+_0x2dc339+_0x25af2c(0x1d2)+_0x3a9cc7};}catch{return null;}}function a308_0x3d68(){const _0x1659be=['number','stableVersion','checkedAt','utf8','4372720TjwJAU','valid','1057JcoTEI','55NdsyVz',',\x20run:\x20','586455ptCdUV','1917588MYyVXs','262552qAOjDP','\x20available,\x20current\x20','716925zObODk','object','2714yQEvPU','8cyMlJP','true','https://www.npmjs.com/package/','update-check.json','toLowerCase','\x20update','20970bWAfDF','419mkDBRK','/v/','lastNotifiedVersion','.cache','parse','rabetbase-cli','yes','9QJwmCN','lastNotifiedAt','now'];a308_0x3d68=function(){return _0x1659be;};return a308_0x3d68();}
1
+ function a309_0x2907(){const _0x45f6de=['114VnRjdd','latest','number','\x20update','yes','.cache','10JmYXbg','1107090auKMOU','toLowerCase','3517065yauRUC','64epdoOa','6314315fiUJfs','stringify','valid','14BkNyag','update-check.json','/v/','\x20available,\x20current\x20','lastNotifiedAt','lastNotifiedVersion','checkedAt','utf8','185591uaCTAN','true','5747088bnJYwM','object','stableVersion','295708idrlyo','14569357AmZMVt','https://www.npmjs.com/package/','trim','parse',',\x20run:\x20'];a309_0x2907=function(){return _0x45f6de;};return a309_0x2907();}(function(_0x49e95b,_0x42d56d){const _0x4f513c=a309_0x4368,_0x2465ab=_0x49e95b();while(!![]){try{const _0x30cd3a=parseInt(_0x4f513c(0x9a))/0x1*(parseInt(_0x4f513c(0x92))/0x2)+parseInt(_0x4f513c(0xae))/0x3+-parseInt(_0x4f513c(0x9c))/0x4+parseInt(_0x4f513c(0xb0))/0x5+-parseInt(_0x4f513c(0xa5))/0x6*(-parseInt(_0x4f513c(0x9f))/0x7)+-parseInt(_0x4f513c(0xaf))/0x8*(parseInt(_0x4f513c(0xac))/0x9)+parseInt(_0x4f513c(0xab))/0xa*(-parseInt(_0x4f513c(0xa0))/0xb);if(_0x30cd3a===_0x42d56d)break;else _0x2465ab['push'](_0x2465ab['shift']());}catch(_0x48936b){_0x2465ab['push'](_0x2465ab['shift']());}}}(a309_0x2907,0xc1464));import{mkdir,readFile,writeFile}from'node:fs/promises';import{homedir}from'node:os';import{dirname,join}from'node:path';import a309_0xd54da3 from'semver';function a309_0x4368(_0x3d5b93,_0x4bb829){_0x3d5b93=_0x3d5b93-0x90;const _0x2907f8=a309_0x2907();let _0x43683f=_0x2907f8[_0x3d5b93];return _0x43683f;}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 _0x17a5f8=a309_0x4368,_0x24d5b5=process.env.RABETBASE_NO_UPDATE_NOTICE?.[_0x17a5f8(0xa2)]()[_0x17a5f8(0xad)]();return _0x24d5b5==='1'||_0x24d5b5===_0x17a5f8(0x9b)||_0x24d5b5===_0x17a5f8(0xa9);}function cacheRoot(){const _0x48ece5=a309_0x4368;return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),_0x48ece5(0xaa));}export function getUpdateNoticeCachePath(){const _0x291537=a309_0x4368;return join(cacheRoot(),'rabetbase-cli',_0x291537(0x93));}async function readUpdateNoticeCache(){const _0x37c5ea=a309_0x4368;try{const _0x19a907=await readFile(getUpdateNoticeCachePath(),_0x37c5ea(0x99)),_0x23201e=JSON[_0x37c5ea(0xa3)](_0x19a907);if(!_0x23201e||typeof _0x23201e!==_0x37c5ea(0x9d))return{};return _0x23201e;}catch{return{};}}async function writeUpdateNoticeCache(_0x17f9d2){const _0x49755b=a309_0x4368;try{const _0x10e3b6=getUpdateNoticeCachePath();await mkdir(dirname(_0x10e3b6),{'recursive':!![]}),await writeFile(_0x10e3b6,JSON[_0x49755b(0x90)](_0x17f9d2,null,0x2)+'\x0a',_0x49755b(0x99));}catch{}}function isFreshCheck(_0x157fd4,_0x400c31){const _0x24d858=a309_0x4368;return typeof _0x157fd4[_0x24d858(0x98)]===_0x24d858(0xa7)&&_0x400c31-_0x157fd4[_0x24d858(0x98)]<UPDATE_CHECK_TTL_MS;}function isRecentlyNotified(_0x592654,_0xb45f16,_0x24847b){const _0x39ba75=a309_0x4368;return _0x592654[_0x39ba75(0x97)]===_0xb45f16&&typeof _0x592654[_0x39ba75(0x96)]==='number'&&_0x24847b-_0x592654[_0x39ba75(0x96)]<UPDATE_NOTICE_TTL_MS;}export function buildNpmVersionUrl(_0x1102a2){const _0x41977b=a309_0x4368;return _0x41977b(0xa1)+NPM_PACKAGE_NAME+_0x41977b(0x94)+_0x1102a2;}export async function resolveLatestUpdateNotice(){const _0x46197a=a309_0x4368;if(isUpdateNoticeDisabled())return null;try{const _0x343b8f=Date['now'](),_0x3ea9f8=getCliVersion(),_0x145e31=await readUpdateNoticeCache();let _0x309561=isFreshCheck(_0x145e31,_0x343b8f)?_0x145e31[_0x46197a(0xa6)]?.[_0x46197a(0xa2)]():undefined;if(!_0x309561&&!isFreshCheck(_0x145e31,_0x343b8f)){const _0x232683=await getCliVersionPolicy();_0x309561=_0x232683?.[_0x46197a(0x9e)]?.[_0x46197a(0xa2)]()||undefined,await writeUpdateNoticeCache({..._0x145e31,'checkedAt':_0x343b8f,'latest':_0x309561,'failed':!_0x309561});}if(!_0x309561||!a309_0xd54da3['valid'](_0x3ea9f8)||!a309_0xd54da3[_0x46197a(0x91)](_0x309561))return null;if(a309_0xd54da3['gte'](_0x3ea9f8,_0x309561))return null;if(isRecentlyNotified(_0x145e31,_0x309561,_0x343b8f))return null;const _0xeb492=CLI_BIN_NAME+_0x46197a(0xa8);return await writeUpdateNoticeCache({..._0x145e31,'checkedAt':isFreshCheck(_0x145e31,_0x343b8f)?_0x145e31[_0x46197a(0x98)]:_0x343b8f,'latest':_0x309561,'failed':![],'lastNotifiedVersion':_0x309561,'lastNotifiedAt':_0x343b8f}),{'command':_0xeb492,'current':_0x3ea9f8,'latest':_0x309561,'url':buildNpmVersionUrl(_0x309561),'message':CLI_BIN_NAME+'\x20'+_0x309561+_0x46197a(0x95)+_0x3ea9f8+_0x46197a(0xa4)+_0xeb492};}catch{return null;}}
@@ -1 +1 @@
1
- (function(_0x38ffeb,_0x4d8f15){var _0x151020=a309_0x10ed,_0x251a8d=_0x38ffeb();while(!![]){try{var _0x45fcfd=parseInt(_0x151020(0x122))/0x1+parseInt(_0x151020(0x120))/0x2+-parseInt(_0x151020(0x11f))/0x3+-parseInt(_0x151020(0x11e))/0x4+-parseInt(_0x151020(0x124))/0x5*(-parseInt(_0x151020(0x123))/0x6)+parseInt(_0x151020(0x11c))/0x7*(-parseInt(_0x151020(0x11d))/0x8)+parseInt(_0x151020(0x121))/0x9;if(_0x45fcfd===_0x4d8f15)break;else _0x251a8d['push'](_0x251a8d['shift']());}catch(_0x2971a2){_0x251a8d['push'](_0x251a8d['shift']());}}}(a309_0x53bc,0x7dd27));function a309_0x53bc(){var _0x5df1eb=['4197006ppNpAP','460655jfqlSD','3975294qQvnqL','5IrcXLj','14WfQyLs','1188784ivjbtS','3282940IXmyee','591303ErpJnq','481722QhekgP'];a309_0x53bc=function(){return _0x5df1eb;};return a309_0x53bc();}import{VERSION}from'../generated/build-info.js';function a309_0x10ed(_0x703dc7,_0x2e140b){_0x703dc7=_0x703dc7-0x11c;var _0x53bc2e=a309_0x53bc();var _0x10ed9a=_0x53bc2e[_0x703dc7];return _0x10ed9a;}export function getCliVersion(){return VERSION;}
1
+ (function(_0x20609c,_0x93d62e){var _0x50096c=a310_0x3c20,_0x5eee45=_0x20609c();while(!![]){try{var _0x21a3e9=parseInt(_0x50096c(0x91))/0x1*(parseInt(_0x50096c(0x90))/0x2)+parseInt(_0x50096c(0x8b))/0x3*(-parseInt(_0x50096c(0x8c))/0x4)+parseInt(_0x50096c(0x8f))/0x5+parseInt(_0x50096c(0x94))/0x6*(parseInt(_0x50096c(0x8a))/0x7)+-parseInt(_0x50096c(0x8d))/0x8*(-parseInt(_0x50096c(0x89))/0x9)+-parseInt(_0x50096c(0x88))/0xa*(parseInt(_0x50096c(0x93))/0xb)+parseInt(_0x50096c(0x92))/0xc*(parseInt(_0x50096c(0x8e))/0xd);if(_0x21a3e9===_0x93d62e)break;else _0x5eee45['push'](_0x5eee45['shift']());}catch(_0x4876fa){_0x5eee45['push'](_0x5eee45['shift']());}}}(a310_0x923e,0x6d82b));import{VERSION}from'../generated/build-info.js';function a310_0x3c20(_0x51dfb2,_0x2217b1){_0x51dfb2=_0x51dfb2-0x88;var _0x923ecb=a310_0x923e();var _0x3c20f8=_0x923ecb[_0x51dfb2];return _0x3c20f8;}function a310_0x923e(){var _0x16b703=['1588027oKdKiQ','2569743vYDkMJ','4GjnmnS','3056392GRHTEK','13lcUSDx','1110070uEQuKq','1738wbzPnk','649JufcOA','1735248KwJpSt','2266UMiPhQ','12fkDAOt','22390IRHBcL','9dRThlY'];a310_0x923e=function(){return _0x16b703;};return a310_0x923e();}export function getCliVersion(){return VERSION;}
@@ -1 +1 @@
1
- (function(_0x223fe0,_0x2f9dce){var _0x779c1f=a310_0x4c9a,_0x368283=_0x223fe0();while(!![]){try{var _0x3613f6=parseInt(_0x779c1f(0xac))/0x1*(parseInt(_0x779c1f(0xb2))/0x2)+parseInt(_0x779c1f(0xaa))/0x3*(-parseInt(_0x779c1f(0xab))/0x4)+parseInt(_0x779c1f(0xad))/0x5*(-parseInt(_0x779c1f(0xae))/0x6)+parseInt(_0x779c1f(0xb3))/0x7+-parseInt(_0x779c1f(0xb0))/0x8+-parseInt(_0x779c1f(0xaf))/0x9+parseInt(_0x779c1f(0xb1))/0xa;if(_0x3613f6===_0x2f9dce)break;else _0x368283['push'](_0x368283['shift']());}catch(_0x3c62a5){_0x368283['push'](_0x368283['shift']());}}}(a310_0x1f10,0x9fca5));function a310_0x4c9a(_0x49cc77,_0x21f8a9){_0x49cc77=_0x49cc77-0xaa;var _0x1f1004=a310_0x1f10();var _0x4c9aa0=_0x1f1004[_0x49cc77];return _0x4c9aa0;}import{setActiveCookie,clearActiveCookie}from'../core/api-client.js';export async function withActiveCookie(_0x1106de,_0x239986){setActiveCookie(_0x1106de);try{return await _0x239986();}finally{clearActiveCookie();}}function a310_0x1f10(){var _0x9fb203=['1038SAWSfC','1319733ytyMnA','6933824QerPCv','29785110csCxcB','675504DowBoW','3088925aUajOJ','1821957RLgnBz','8diIBBf','1JuCEgc','25290XntPoa'];a310_0x1f10=function(){return _0x9fb203;};return a310_0x1f10();}
1
+ (function(_0x3dac68,_0x571e9d){var _0x3a589c=a311_0x2c4d,_0x5c5d9b=_0x3dac68();while(!![]){try{var _0x3c1b94=parseInt(_0x3a589c(0x16d))/0x1+parseInt(_0x3a589c(0x16e))/0x2+-parseInt(_0x3a589c(0x168))/0x3+parseInt(_0x3a589c(0x16b))/0x4*(parseInt(_0x3a589c(0x167))/0x5)+-parseInt(_0x3a589c(0x16a))/0x6+parseInt(_0x3a589c(0x16f))/0x7*(parseInt(_0x3a589c(0x16c))/0x8)+-parseInt(_0x3a589c(0x169))/0x9;if(_0x3c1b94===_0x571e9d)break;else _0x5c5d9b['push'](_0x5c5d9b['shift']());}catch(_0x232221){_0x5c5d9b['push'](_0x5c5d9b['shift']());}}}(a311_0x622b,0x51def));function a311_0x2c4d(_0x13d1e5,_0x4f8e06){_0x13d1e5=_0x13d1e5-0x167;var _0x622bf8=a311_0x622b();var _0x2c4dda=_0x622bf8[_0x13d1e5];return _0x2c4dda;}function a311_0x622b(){var _0x2223da=['3338532kbhewE','1863908zqYjqW','19056UYYLJP','625404fkkmoj','915392MPuDzl','1953qFyiDR','5NWXKjo','1542900LkZfnz','7268310qcGETd'];a311_0x622b=function(){return _0x2223da;};return a311_0x622b();}import{setActiveCookie,clearActiveCookie}from'../core/api-client.js';export async function withActiveCookie(_0x4fbbec,_0x3cdbf1){setActiveCookie(_0x4fbbec);try{return await _0x3cdbf1();}finally{clearActiveCookie();}}
@@ -1 +1 @@
1
- function a311_0x2be0(_0x20b0a6,_0x1d2352){_0x20b0a6=_0x20b0a6-0xde;var _0x4a3c6a=a311_0x4a3c();var _0x2be01=_0x4a3c6a[_0x20b0a6];return _0x2be01;}(function(_0xc8a146,_0x4a5b88){var _0x26256b=a311_0x2be0,_0x4e280e=_0xc8a146();while(!![]){try{var _0x4d7cf8=parseInt(_0x26256b(0xde))/0x1*(-parseInt(_0x26256b(0xe6))/0x2)+-parseInt(_0x26256b(0xe1))/0x3+parseInt(_0x26256b(0xe8))/0x4+parseInt(_0x26256b(0xe7))/0x5+parseInt(_0x26256b(0xe0))/0x6*(parseInt(_0x26256b(0xe3))/0x7)+parseInt(_0x26256b(0xe5))/0x8+-parseInt(_0x26256b(0xe4))/0x9;if(_0x4d7cf8===_0x4a5b88)break;else _0x4e280e['push'](_0x4e280e['shift']());}catch(_0xe2bf5b){_0x4e280e['push'](_0x4e280e['shift']());}}}(a311_0x4a3c,0xc9662));function a311_0x4a3c(){var _0x36759c=['1595160NaxrZZ','215777OsMfHg','write','12rNApsb','2932122NloDCy','stderr','5237799DKSWQv','3290535bRGmbW','3255344gwbKml','8tGYQtd','3644025QcHcPL'];a311_0x4a3c=function(){return _0x36759c;};return a311_0x4a3c();}export function writeCliSideChannelLine(_0x575c81){var _0x48a0ee=a311_0x2be0;process[_0x48a0ee(0xe2)][_0x48a0ee(0xdf)](_0x575c81+'\x0a');}
1
+ (function(_0x4b099a,_0x26e175){var _0x281bee=a312_0x675d,_0x5ebb20=_0x4b099a();while(!![]){try{var _0x503803=parseInt(_0x281bee(0x17b))/0x1*(-parseInt(_0x281bee(0x17d))/0x2)+-parseInt(_0x281bee(0x183))/0x3*(-parseInt(_0x281bee(0x185))/0x4)+-parseInt(_0x281bee(0x186))/0x5*(-parseInt(_0x281bee(0x182))/0x6)+-parseInt(_0x281bee(0x17c))/0x7+parseInt(_0x281bee(0x17f))/0x8*(parseInt(_0x281bee(0x188))/0x9)+parseInt(_0x281bee(0x181))/0xa*(-parseInt(_0x281bee(0x187))/0xb)+parseInt(_0x281bee(0x17e))/0xc;if(_0x503803===_0x26e175)break;else _0x5ebb20['push'](_0x5ebb20['shift']());}catch(_0xf19d87){_0x5ebb20['push'](_0x5ebb20['shift']());}}}(a312_0x3080,0x9659c));function a312_0x3080(){var _0x5b1fb1=['5329258IsetxL','7088751YWeaQX','1ZEsYMY','5149543rOqQGo','2316838tLrqtQ','18234816BAHeEO','8fTdnQV','stderr','20XvBzhg','89022WQLhTA','3SVUVYM','write','3440304jaBxIF','105GuvaAR'];a312_0x3080=function(){return _0x5b1fb1;};return a312_0x3080();}function a312_0x675d(_0x129ec1,_0x192bdc){_0x129ec1=_0x129ec1-0x17b;var _0x3080ce=a312_0x3080();var _0x675df7=_0x3080ce[_0x129ec1];return _0x675df7;}export function writeCliSideChannelLine(_0xd7f08c){var _0x239604=a312_0x675d;process[_0x239604(0x180)][_0x239604(0x184)](_0xd7f08c+'\x0a');}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lovrabet/rabetbase-cli",
3
- "version": "2.5.1-beta.5",
3
+ "version": "2.5.1",
4
4
  "description": "Developer CLI for Lovrabet apps, datasets, pages, SQL, Backend Function, database connections, skills, and AI agent workflows.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "keywords": [
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: rabetbase
3
- version: 2.5.1-beta.5
4
- description: "Use for Lovrabet development work through the rabetbase CLI: create or bind projects (including creating an AppCode project in the current folder), pull Dataset/API facts and maintain SDK clients, or manage datasets, database connections, pages, SQL, Backend Functions, menus, notifications, knowledge bases, Agent Context Rules, roles, files, OCR, deployment metadata, platform issues, and 钉钉沙箱账号绑定. Trigger when the user mentions rabetbase, Lovrabet development, AppCode, Dataset, project creation, api pull/codegen, dblink, page, SQL, BFF, menu, notification, knowledge base, Agent Context Rules, RULES.md, DATABASE.md, rule list/get/set, role, file/OCR, or related development workflows."
3
+ version: 2.5.1
4
+ description: "Use for Lovrabet development work through the rabetbase CLI: create or bind projects (including creating an AppCode project in the current folder), pull Dataset/API facts and maintain SDK clients, or manage datasets, database connections, pages, SQL, Backend Functions, menus, notifications, knowledge bases and kb search, Agent Context Rules, roles, files, OCR, deployment metadata, platform issues, and 钉钉沙箱账号绑定. Trigger when the user mentions rabetbase, Lovrabet development, AppCode, Dataset, project creation, api pull/codegen, dblink, page, SQL, BFF, menu, notification, knowledge base, kb search, Agent Context Rules, RULES.md, DATABASE.md, rule list/get/set, role, file/OCR, or related development workflows."
5
5
  metadata:
6
6
  requires:
7
7
  bins: ["rabetbase"]
@@ -316,7 +316,7 @@ const result = await client.bff.execute<DashboardData>({
316
316
  | 修改配置文件 | [`rabetbase config set <key> <value>`](references/rabetbase-config.md) | 默认写项目;无项目配置且未 `--global` 会拒绝;`--global` 写 `~/.rabetbase.json` |
317
317
  | 列出配置 | [`rabetbase config list`](references/rabetbase-config.md) | 查看当前生效的配置 |
318
318
  | 管理运行态 app-config | [`rabetbase app-config list/get/set/delete`](references/rabetbase-app-config.md) | 运行态 app-config 管理面;默认不输出明文 value;`set` 为 `write`,`delete` 保持 `high-risk-write` |
319
- | 管理和检索当前研发应用的企业知识库 | [`rabetbase kb list/detail/search/create/update/delete`](references/rabetbase-kb.md) | 管理仅 company scope;search 仅 COMPANY/PUBLIC;`create/update` 为 `write`,`delete` 保持 `high-risk-write` |
319
+ | 管理和检索当前研发应用的企业知识库 | [`rabetbase kb list/detail/search/create/update/delete`](references/rabetbase-kb.md) | 管理仅 company scope;search 固定 Development 且仅 `public/company`;`create/update` 为 `write`,`delete` 保持 `high-risk-write` |
320
320
  | 管理当前研发应用的 Agent context 规则 | [`rabetbase rule list/get/set`](references/rabetbase-rule.md) | `RULES.md` 供页面、API 等研发 Agent 使用且排除 DB Agent;`DATABASE.md` 仅供数据库分析时 DB Agent 使用;两者在各自流程全程参与 context;set 为 `write`,先 dry-run |
321
321
  | 查询或管理应用级通知配置 | [`rabetbase notification config-list`](references/rabetbase-notification-config-list.md) / [`rabetbase notification config-create`](references/rabetbase-notification-config-mutations.md) / [`rabetbase notification config-update`](references/rabetbase-notification-config-mutations.md) / [`rabetbase notification config-delete`](references/rabetbase-notification-config-mutations.md) | list 获取 Backend Function 所需 `configCode`;写入只接收单一敏感 JSON 源,先 dry-run;update/delete 必须 `--yes` |
322
322
  | 查看线上菜单事实 / 菜单异常审计 | [`rabetbase menu list`](references/rabetbase-menu-list.md) | 返回 DFS 事实、children/page、URL、最近更新人/时间和 snapshotHash;异常治理先读 [`menu-anomaly-manual-cleanup`](guides/menu-anomaly-manual-cleanup.md) |
@@ -136,7 +136,7 @@ rabetbase workspace remove product --yes
136
136
  | `userDomain` | string | 平台默认 | 自定义用户域名 |
137
137
  | `runtimeDomain` | string | 平台默认 | 自定义运行时域名 |
138
138
  | `skillDomain` | string | 节点默认 | SkillHub HTTPS origin 覆盖 |
139
- | `kbDomain` | string | 跟随 `apiDomain` / 节点 API 默认值 | 企业知识库 HTTPS origin 覆盖;显式配置时优先,`runtimeDomain` 不参与回退 |
139
+ | `kbDomain` | string | 跟随 `apiDomain` / 节点 API 默认值 | 企业知识库管理与 `kb search` 的 SmartCode Java HTTPS origin;KB Service 下游地址由 Java 配置 |
140
140
  | `appDomain` | string | 节点默认 | 工作台、页面编辑器和发布页面域名 |
141
141
  | `localDomain` | string | 独立部署默认 `http://localhost` | 自定义 HTTPS 本地回调 origin;与 `certificateDomain` 同时配置 |
142
142
  | `certificateDomain` | string | 节点默认;独立部署无 | 本地 HTTPS 证书服务 origin;与 `localDomain` 同时配置 |
@@ -0,0 +1,36 @@
1
+ # DATABASE
2
+
3
+ > 仅记录当前应用特有、稳定,且无法从实时数据库结构、约束、索引、字段注释及通用数据库约定可靠推断的业务事实。删除不适用条目;完成后的文件建议不超过 5000 个 Unicode 字符,重要规则优先。物理结构以实时元数据为准,业务语义以已确认业务合同为准。
4
+
5
+ ## BUSINESS_DOMAIN
6
+
7
+ - 系统定位:{一句话说明系统服务的业务与核心目标}。
8
+ - 业务边界:{明确包含与不包含的业务范围}。
9
+ - 数据隔离:{租户、组织、门店或其他隔离维度及判定字段}。
10
+ - 权威来源:{主数据、交易事实或配置分别以哪些表或外部系统为准}。
11
+ - 业务分组:{表前缀、模块或领域之间的稳定映射}。
12
+
13
+ ## ENTITY_DICTIONARY
14
+
15
+ - `<table>`:业务对象={名称};类型={coreEntity/dictionaryTable/config/other};职责={该表保存什么事实};主记录判定={条件或字段}。
16
+ - `<child_table>`:从属于 `<parent_table>`;生命周期={随主对象创建、独立维护或历史保留};一条记录表示={业务含义}。
17
+ - `<snapshot_or_log_table>`:类型={snapshot/log/history};固化时点={事件};用途={审计、展示或计算};不作为={不应承担的当前事实来源}。
18
+
19
+ ## COLUMN_SEMANTIC
20
+
21
+ - `<table>.<column>`:含义={业务含义};值域/单位={枚举、金额单位、时区等};空值={未设置、未知或不适用}。
22
+ - 系统字段:创建时间={field};修改时间={field};创建人={field};修改人={field};逻辑删除={field, 正常值/删除值}。
23
+ - 人员标识:`<table>.<column>` 表示 {employee/account/customer/external id},关联目标={table.column 或外部系统}。
24
+ - 状态流:`<table>.<status_column>` 的关键状态={value: meaning};终态={value};允许回退={条件}。
25
+ - 冗余或快照字段:`<table>.<column>` 来源={table.column/计算规则};刷新时机={事件};分析时优先级={源字段或快照字段}。
26
+
27
+ ## RELATION_RULE
28
+
29
+ - `<source_table>.<source_column> -> <target_table>.<target_column>`;关系={many-to-one/one-to-one};唯一性依据={PK/unique index};展示字段={target.column}。
30
+ - `<source_table>.(<column_a>, <column_b>) -> <target_table>.(<column_x>, <column_y>)`;关系={复合关联含义};成立条件={过滤条件}。
31
+ - `<source_table>.<code_column> -> <dictionary_table>.<code_column>`;字典分类={类型字段及取值};展示字段={name_column}。
32
+
33
+ ### 禁止关联
34
+
35
+ - `<table>.<column>` 是多态引用;由 `<type_column>` 判定目标:`<value> -> <target_table>`;缺少类型条件时不得直接关联。
36
+ - `<table>.<column>` 是 {快照文本/ID 列表/外部标识},不得按普通外键关联;正确解释={规则}。
@@ -25,7 +25,7 @@ rabetbase doctor check
25
25
  | Country/Region Configuration | 检查项目与全局 `region`;显式未知值会标明来源,并给出对应作用域的 `config delete region` 修复命令 |
26
26
  | Merged Config | 合并后的所有配置项(appCode / env / cookie / apiDir 等) |
27
27
  | Apps | 多应用模式下的应用列表及各自配置 |
28
- | API Endpoints | 最终生效的 region 与六个域名(user / api / runtime / skill / kb / app) |
28
+ | API Endpoints | 最终生效的 region 与域名(user / api / runtime / skill / kb / app);KB 管理与 search 共用 SmartCode Java origin |
29
29
  | Auth | 登录状态及 cookie 有效性 |
30
30
 
31
31
  ## 典型场景
@@ -2,7 +2,7 @@
2
2
 
3
3
  管理开发者侧当前解析应用下的 `company` 知识库,并检索当前应用可访问的公司与公共知识。所有命令都通过标准工作区、`--app <name>` 或 `--appcode <code>` 解析目标应用。
4
4
 
5
- 企业知识库请求使用独立的 `kbDomain`。当前官方节点的 KB 仍由平台 API 服务承载,因此未显式配置 `kbDomain` 时跟随 `apiDomain`;KB 服务拆分或企业独立部署时可单独覆盖 `kbDomain`。`runtimeDomain` 不参与 rabetbase 企业 KB 路由。当前 rabetbase-cli 没有调用 SkillHub 业务 API,未来新增时必须使用独立的 `skillDomain`。
5
+ 企业知识库管理与 `kb search` 都使用 `kbDomain`;未显式配置时跟随当前 region/env 的 `apiDomain`,`runtimeDomain` 不参与。`kb search` Cookie-only 调用 SmartCode Java,KB Service 下游域名由 Java 配置,CLI 不再持有或直连该地址。
6
6
 
7
7
  > 边界:`lovrabet kb` 使用运行态 AK/当前应用/当前用户,面向个人知识库和可见知识搜索;`rabetbase kb` 使用开发者登录态,面向公司知识库管理以及公司/公共知识检索。不要用其中一个替代另一个。
8
8
 
@@ -37,11 +37,12 @@ rabetbase kb delete --id 60 --yes
37
37
 
38
38
  ## search
39
39
 
40
- - 调用 `POST /smartapi/knowledge/company-public/search`,请求仅包含 `query`、解析后的 `appCode` 和可选 `topK`。
41
- - 不传 `userId`,不查询个人知识库;命中 `scope` 只可能为 `COMPANY` 或 `PUBLIC`。
42
- - `--query` 必填且不能是纯空白;`--topk` 可选,必须是正整数。不传时沿用服务端缺省规则。
43
- - 输出 `total` 与 `hits`,命中字段为 `scope/title/docId/score/weightedScore/content/jsonPath/jsonData`;无命中时返回空数组。
44
- - 同时判断 HTTP 状态和平台业务结果;未登录、无权限、参数错误、检索异常或响应字段漂移都会以结构化错误失败。
40
+ - Cookie-only 调用 SmartCode Java `POST /smartapi/knowledge/company-public/search`,请求体包含 `appCode`、`query` 和可选 `topK`;不发送 AK、`userId`、profile 或 scope。
41
+ - SmartCode Java 是统一鉴权、调用量记录与后续计费入口,并按自身配置转发 KB Service 固定 Development 接口;响应保持完整 V2 证据且带 `Cache-Control: no-store`。
42
+ - Development profile 在检索前固定限制为 `public/company`;任何 `personal` 命中都按协议错误失败关闭。
43
+ - `--query` 必填且不能是纯空白;`--topk` 可选,必须为 1–50 的整数。不传时沿用服务端缺省规则。
44
+ - 结构化输出固定为 `data: { schemaVersion:2, profile:"development", total, strategyFingerprint, timingsMs, hits }`。`total` 等于命中数;每个命中完整保留 `documentId/revision/chunkId/scope/title/text/tags/rank/rawScore/finalScore/scoreKind` 的服务端顺序和值,无 legacy 别名。
45
+ - 无命中是 `total:0/hits:[]` 的成功。HTTP、`no-store`、JSON、字段、rank、score、timing、TopK 或 scope 漂移均以脱敏结构化错误失败;错误不包含查询、正文或后端 body。
45
46
 
46
47
  ## create
47
48
 
@@ -73,4 +74,4 @@ rabetbase kb delete --id 60 --yes
73
74
 
74
75
  - 使用 `--env daily` 或 `--env production` 选择 Profile 环境,不通过 URL 参数切换。
75
76
  - Production 写操作必须单独取得授权;需求、dry-run 或命令可用不等于写入授权。
76
- - 输出和错误不得包含 Cookie、Token、AccessKey 或知识正文。
77
+ - 输出和错误不得包含 Cookie、Token 或 AccessKey。只有成功的 `search` 按上述 V2 合同返回知识正文;失败输出不得包含查询、正文、后端 body 或原始异常。
@@ -41,6 +41,21 @@ rabetbase rule set --type database --file ./DATABASE.md --dry-run
41
41
  - 响应丢失但回读可证明结果时返回 verified 并标记恢复;证据不足时返回 outcome unknown,禁止自动重提。
42
42
  - dry-run 和正式结构化输出都不包含新正文,只包含 `contentByteSize`、`contentHash` 等安全元数据。
43
43
 
44
+ ## DATABASE.md 结构模板
45
+
46
+ 创建数据库规则时,优先复制 [DATABASE.md 结构模板](./rabetbase-database-template.md),再用当前应用中无法从 DDL、索引、约束和注释可靠推断的事实替换占位符。模板按 DB Agent 可识别的四类语义组织:
47
+
48
+ - `BUSINESS_DOMAIN`:系统定位、业务边界、数据隔离和权威来源。
49
+ - `ENTITY_DICTIONARY`:表对应的业务对象、职责、类型和生命周期。
50
+ - `COLUMN_SEMANTIC`:系统字段、人员标识、枚举状态、单位和快照语义。
51
+ - `RELATION_RULE`:明确的关联方向、唯一性依据、复合关系及禁止误关联的例外。
52
+
53
+ 四个二级标题已经提供分类语义,不要在每条规则前重复 `[BUSINESS_DOMAIN]`、`[ENTITY_DICTIONARY]`、`[COLUMN_SEMANTIC]` 或 `[RELATION_RULE]` 标签。准入标准是“当前应用特有且无法可靠推断”,不以某个 LLM 版本是否声称知道该知识为判断依据。
54
+
55
+ 完整 `DATABASE.md` 建议不超过 5000 个 Unicode 字符,并把影响范围最大的规则放在前面。这是控制 Agent context 的编写建议,不是 `rule set` 的硬校验;CLI 仍遵循服务端现有的 5 MiB 文件限制。字符数也不应换算为固定 token 数,因为不同语言和模型的分词结果不同。
56
+
57
+ 不要重复普通主外键、字段类型等可直接推断的信息,也不要写入凭证、连接串、样例业务数据或短期排障结论。`one-to-one` 必须有主键或唯一索引依据;多态引用、ID 列表、快照文本和外部标识应放入 `RELATION_RULE` 下的“禁止关联”小节,明确排除普通外键推断。
58
+
44
59
  ## 最佳实践
45
60
 
46
61
  1. 先执行 `rule list`,确认目标文件是否存在及当前版本。