@lovrabet/rabetbase-cli 2.5.1-beta.4 → 2.5.1-beta.6

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 (344) hide show
  1. package/README.md +75 -1
  2. package/lib/api/api-doc.js +1 -1
  3. package/lib/api/fetch-model-list.js +1 -1
  4. package/lib/api/generate-api-file.js +1 -1
  5. package/lib/api/generate-sdk-config-file.d.ts +0 -1
  6. package/lib/api/generate-sdk-config-file.js +1 -1
  7. package/lib/auth/auth-server-ui.js +1 -1
  8. package/lib/auth/auth-server.js +1 -1
  9. package/lib/auth/constant.js +1 -1
  10. package/lib/auth/get-cookie.js +1 -1
  11. package/lib/auth/get-session-user.js +1 -1
  12. package/lib/auth/is-session-valid.js +1 -1
  13. package/lib/auth/login-success-html.js +1 -1
  14. package/lib/auth/logout.js +1 -1
  15. package/lib/cli-flags.js +1 -1
  16. package/lib/cli.js +1 -1
  17. package/lib/commands/api/generate.js +1 -1
  18. package/lib/commands/api/index.js +1 -1
  19. package/lib/commands/api/list.js +1 -1
  20. package/lib/commands/api/pull.js +1 -1
  21. package/lib/commands/api/shared.js +1 -1
  22. package/lib/commands/app/index.js +1 -1
  23. package/lib/commands/app/list.js +1 -1
  24. package/lib/commands/app/members-list.js +1 -1
  25. package/lib/commands/app/remote-directory.js +1 -1
  26. package/lib/commands/app/shared.js +1 -1
  27. package/lib/commands/app-config/delete.js +1 -1
  28. package/lib/commands/app-config/get.js +1 -1
  29. package/lib/commands/app-config/index.js +1 -1
  30. package/lib/commands/app-config/list.js +1 -1
  31. package/lib/commands/app-config/set.js +1 -1
  32. package/lib/commands/app-config/shared.js +1 -1
  33. package/lib/commands/auth/index.js +1 -1
  34. package/lib/commands/bff/create.js +1 -1
  35. package/lib/commands/bff/delete.js +1 -1
  36. package/lib/commands/bff/detail.js +1 -1
  37. package/lib/commands/bff/index.js +1 -1
  38. package/lib/commands/bff/list.js +1 -1
  39. package/lib/commands/bff/pull.js +1 -1
  40. package/lib/commands/bff/push.js +1 -1
  41. package/lib/commands/bff/status.js +1 -1
  42. package/lib/commands/cli-skill/index.js +1 -1
  43. package/lib/commands/cli-update.js +1 -1
  44. package/lib/commands/codegen/index.js +1 -1
  45. package/lib/commands/codegen/sdk.js +1 -1
  46. package/lib/commands/codegen/sql.js +1 -1
  47. package/lib/commands/common/app-registry.js +1 -1
  48. package/lib/commands/common/app-selector.js +1 -1
  49. package/lib/commands/common/async-task.js +1 -1
  50. package/lib/commands/common/dry-run.js +1 -1
  51. package/lib/commands/common/flags.d.ts +2 -0
  52. package/lib/commands/common/flags.js +1 -1
  53. package/lib/commands/common/local-file.js +1 -1
  54. package/lib/commands/common/validate.js +1 -1
  55. package/lib/commands/config/delete.js +1 -1
  56. package/lib/commands/config/get.js +1 -1
  57. package/lib/commands/config/index.js +1 -1
  58. package/lib/commands/config/init.d.ts +2 -0
  59. package/lib/commands/config/init.js +1 -1
  60. package/lib/commands/config/list.js +1 -1
  61. package/lib/commands/config/set.js +1 -1
  62. package/lib/commands/config/shared.js +1 -1
  63. package/lib/commands/dataset/business-group-update.js +1 -1
  64. package/lib/commands/dataset/business-groups.js +1 -1
  65. package/lib/commands/dataset/capability.js +1 -1
  66. package/lib/commands/dataset/delete.js +1 -1
  67. package/lib/commands/dataset/detail.js +1 -1
  68. package/lib/commands/dataset/extend-update.js +1 -1
  69. package/lib/commands/dataset/field-restore.js +1 -1
  70. package/lib/commands/dataset/field-update.js +1 -1
  71. package/lib/commands/dataset/generate.js +1 -1
  72. package/lib/commands/dataset/index.js +1 -1
  73. package/lib/commands/dataset/list.js +1 -1
  74. package/lib/commands/dataset/operations.js +1 -1
  75. package/lib/commands/dataset/relation-audit.js +1 -1
  76. package/lib/commands/dataset/relation-create.js +1 -1
  77. package/lib/commands/dataset/relation-delete.js +1 -1
  78. package/lib/commands/dataset/relation-shared.js +1 -1
  79. package/lib/commands/dataset/relation-update.js +1 -1
  80. package/lib/commands/dataset/relations.js +1 -1
  81. package/lib/commands/dataset/rename.js +1 -1
  82. package/lib/commands/dataset/restore.js +1 -1
  83. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  84. package/lib/commands/db/analysis-batching.js +1 -1
  85. package/lib/commands/db/analyze-batch-plan.js +1 -1
  86. package/lib/commands/db/analyze-cancel.js +1 -1
  87. package/lib/commands/db/analyze-start.js +1 -1
  88. package/lib/commands/db/analyze-status.js +1 -1
  89. package/lib/commands/db/create.js +1 -1
  90. package/lib/commands/db/delete.js +1 -1
  91. package/lib/commands/db/detail.js +1 -1
  92. package/lib/commands/db/diff-refresh-start.js +1 -1
  93. package/lib/commands/db/diff-refresh-status.js +1 -1
  94. package/lib/commands/db/diff.js +1 -1
  95. package/lib/commands/db/index.js +1 -1
  96. package/lib/commands/db/list.js +1 -1
  97. package/lib/commands/db/shared.js +1 -1
  98. package/lib/commands/db/table-diff-shared.js +1 -1
  99. package/lib/commands/db/tables.js +1 -1
  100. package/lib/commands/db/test.js +1 -1
  101. package/lib/commands/db/update.js +1 -1
  102. package/lib/commands/deployment/auto-sync.js +1 -1
  103. package/lib/commands/deployment/index.js +1 -1
  104. package/lib/commands/deployment/sync.js +1 -1
  105. package/lib/commands/doctor.js +1 -1
  106. package/lib/commands/file/index.js +1 -1
  107. package/lib/commands/issue/index.js +1 -1
  108. package/lib/commands/issue/nudge.js +1 -1
  109. package/lib/commands/issue/report.js +1 -1
  110. package/lib/commands/issue/shared.js +1 -1
  111. package/lib/commands/kb/create.js +1 -1
  112. package/lib/commands/kb/delete.js +1 -1
  113. package/lib/commands/kb/detail.js +1 -1
  114. package/lib/commands/kb/index.js +1 -1
  115. package/lib/commands/kb/list.js +1 -1
  116. package/lib/commands/kb/search.js +1 -1
  117. package/lib/commands/kb/shared.js +1 -1
  118. package/lib/commands/kb/update.js +1 -1
  119. package/lib/commands/logs/index.js +1 -1
  120. package/lib/commands/menu/asset-update.js +1 -1
  121. package/lib/commands/menu/delete.js +1 -1
  122. package/lib/commands/menu/external-link-create.js +1 -1
  123. package/lib/commands/menu/external-link-update.js +1 -1
  124. package/lib/commands/menu/group-create.js +1 -1
  125. package/lib/commands/menu/group-update.js +1 -1
  126. package/lib/commands/menu/index.js +1 -1
  127. package/lib/commands/menu/list.js +1 -1
  128. package/lib/commands/menu/move.js +1 -1
  129. package/lib/commands/menu/regroup-start.js +1 -1
  130. package/lib/commands/menu/rename.js +1 -1
  131. package/lib/commands/menu/shared/compare-table.js +1 -1
  132. package/lib/commands/menu/shared/delete-plan.js +1 -1
  133. package/lib/commands/menu/shared/facts.js +1 -1
  134. package/lib/commands/menu/shared/index.js +1 -1
  135. package/lib/commands/menu/shared/inquirer.js +1 -1
  136. package/lib/commands/menu/shared/local-pages.js +1 -1
  137. package/lib/commands/menu/shared/logic.js +1 -1
  138. package/lib/commands/menu/shared/mutations.js +1 -1
  139. package/lib/commands/menu/shared/service.js +1 -1
  140. package/lib/commands/menu/shared/sync-core.js +1 -1
  141. package/lib/commands/menu/shared/update-core.js +1 -1
  142. package/lib/commands/menu/shared/valid-url.js +1 -1
  143. package/lib/commands/menu/sync.js +1 -1
  144. package/lib/commands/menu/visibility-update.js +1 -1
  145. package/lib/commands/notification/config-create.js +1 -1
  146. package/lib/commands/notification/config-delete.js +1 -1
  147. package/lib/commands/notification/config-list.js +1 -1
  148. package/lib/commands/notification/config-update.js +1 -1
  149. package/lib/commands/notification/index.js +1 -1
  150. package/lib/commands/notification/shared.js +1 -1
  151. package/lib/commands/ocr/index.js +1 -1
  152. package/lib/commands/page/create.js +1 -1
  153. package/lib/commands/page/custom/detail.js +1 -1
  154. package/lib/commands/page/custom/list.js +1 -1
  155. package/lib/commands/page/custom/publish.js +1 -1
  156. package/lib/commands/page/custom/shared.js +1 -1
  157. package/lib/commands/page/custom/syntax.js +1 -1
  158. package/lib/commands/page/custom/template.js +1 -1
  159. package/lib/commands/page/custom/update.js +1 -1
  160. package/lib/commands/page/data-list-status.js +1 -1
  161. package/lib/commands/page/generate-start.js +1 -1
  162. package/lib/commands/page/generate-status.js +1 -1
  163. package/lib/commands/page/index.js +1 -1
  164. package/lib/commands/page/pull.js +1 -1
  165. package/lib/commands/page/push.js +1 -1
  166. package/lib/commands/page/relation-audit.js +1 -1
  167. package/lib/commands/page/restore.js +1 -1
  168. package/lib/commands/page/shared.js +1 -1
  169. package/lib/commands/page/sync.js +1 -1
  170. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  171. package/lib/commands/project/create/format-elapsed.js +1 -1
  172. package/lib/commands/project/create/main.d.ts +1 -0
  173. package/lib/commands/project/create/main.js +1 -1
  174. package/lib/commands/project/create/materialize-project-template.js +1 -1
  175. package/lib/commands/project/create/project-name.js +1 -1
  176. package/lib/commands/project/create/project-template-archive.js +1 -1
  177. package/lib/commands/project/create/project-template-path.js +1 -1
  178. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  179. package/lib/commands/project/create/use-format-code.js +1 -1
  180. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  181. package/lib/commands/project/domain-routing-sync.d.ts +2 -0
  182. package/lib/commands/project/domain-routing-sync.js +1 -0
  183. package/lib/commands/project/index.js +1 -1
  184. package/lib/commands/project/upgrade.js +1 -1
  185. package/lib/commands/registry.js +1 -1
  186. package/lib/commands/role/delete.js +1 -1
  187. package/lib/commands/role/detail.js +1 -1
  188. package/lib/commands/role/index.js +1 -1
  189. package/lib/commands/role/list.js +1 -1
  190. package/lib/commands/role/shared.js +1 -1
  191. package/lib/commands/role/update.js +1 -1
  192. package/lib/commands/role/user-add.js +1 -1
  193. package/lib/commands/role/user-remove.js +1 -1
  194. package/lib/commands/role/user-resolve.js +1 -1
  195. package/lib/commands/rule/get.d.ts +2 -0
  196. package/lib/commands/rule/get.js +1 -0
  197. package/lib/commands/rule/index.d.ts +2 -0
  198. package/lib/commands/rule/index.js +1 -0
  199. package/lib/commands/rule/list.d.ts +2 -0
  200. package/lib/commands/rule/list.js +1 -0
  201. package/lib/commands/rule/set.d.ts +2 -0
  202. package/lib/commands/rule/set.js +1 -0
  203. package/lib/commands/rule/shared.d.ts +43 -0
  204. package/lib/commands/rule/shared.js +1 -0
  205. package/lib/commands/run/index.js +1 -1
  206. package/lib/commands/schema.js +1 -1
  207. package/lib/commands/sql/create.js +1 -1
  208. package/lib/commands/sql/delete.js +1 -1
  209. package/lib/commands/sql/detail.js +1 -1
  210. package/lib/commands/sql/exec.js +1 -1
  211. package/lib/commands/sql/index.js +1 -1
  212. package/lib/commands/sql/list.js +1 -1
  213. package/lib/commands/sql/pull.js +1 -1
  214. package/lib/commands/sql/push.js +1 -1
  215. package/lib/commands/sql/shared.js +1 -1
  216. package/lib/commands/sql/status.js +1 -1
  217. package/lib/commands/sql/validate.js +1 -1
  218. package/lib/commands/task/index.js +1 -1
  219. package/lib/commands/task/status.js +1 -1
  220. package/lib/commands/tenant/index.js +1 -1
  221. package/lib/commands/tenant/members-list.js +1 -1
  222. package/lib/commands/tenant/shared.js +1 -1
  223. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  224. package/lib/commands/user-account/index.js +1 -1
  225. package/lib/commands/workspace/add.js +1 -1
  226. package/lib/commands/workspace/index.js +1 -1
  227. package/lib/commands/workspace/remove.js +1 -1
  228. package/lib/config/deployment-sync.js +1 -1
  229. package/lib/config/domain-config.d.ts +37 -1
  230. package/lib/config/domain-config.js +1 -1
  231. package/lib/config/project-domain-routing.d.ts +27 -0
  232. package/lib/config/project-domain-routing.js +1 -0
  233. package/lib/config/schema.d.ts +1 -1
  234. package/lib/config/schema.js +1 -1
  235. package/lib/constant/cdn.js +1 -1
  236. package/lib/constant/cli.js +1 -1
  237. package/lib/constant/defaults.js +1 -1
  238. package/lib/constant/domain.d.ts +10 -4
  239. package/lib/constant/domain.js +1 -1
  240. package/lib/constant/env.js +1 -1
  241. package/lib/constant/output.js +1 -1
  242. package/lib/constant/paths.js +1 -1
  243. package/lib/constant/region.d.ts +4 -1
  244. package/lib/constant/region.js +1 -1
  245. package/lib/constant/risk.js +1 -1
  246. package/lib/constant/routing-profile.d.ts +43 -49
  247. package/lib/constant/routing-profile.js +1 -1
  248. package/lib/context/app-resolver.js +1 -1
  249. package/lib/context/auth-resolver.js +1 -1
  250. package/lib/context/config-loader.js +1 -1
  251. package/lib/context.d.ts +2 -0
  252. package/lib/context.js +1 -1
  253. package/lib/core/alias-resolver.js +1 -1
  254. package/lib/core/api-client.d.ts +21 -0
  255. package/lib/core/api-client.js +1 -1
  256. package/lib/core/bff/config.js +1 -1
  257. package/lib/core/bff/file-system.js +1 -1
  258. package/lib/core/bff/hash.js +1 -1
  259. package/lib/core/bff/lock.js +1 -1
  260. package/lib/core/bff/utils.js +1 -1
  261. package/lib/core/db-resolver.js +1 -1
  262. package/lib/core/kb-search-client.js +1 -1
  263. package/lib/core/page/file-system.js +1 -1
  264. package/lib/core/page/hash.js +1 -1
  265. package/lib/core/page/lock.js +1 -1
  266. package/lib/core/sql-index-auditor.js +1 -1
  267. package/lib/core/sql-sync/config.js +1 -1
  268. package/lib/core/sql-sync/file-system.js +1 -1
  269. package/lib/core/sql-sync/hash.js +1 -1
  270. package/lib/core/sql-sync/lock.js +1 -1
  271. package/lib/core/sql-sync/utils.js +1 -1
  272. package/lib/core/sql-validator.js +1 -1
  273. package/lib/errors.js +1 -1
  274. package/lib/framework/build-all-flags.js +1 -1
  275. package/lib/framework/error-output.js +1 -1
  276. package/lib/framework/explicit-yes.js +1 -1
  277. package/lib/framework/flags.js +1 -1
  278. package/lib/framework/help.js +1 -1
  279. package/lib/framework/index.js +1 -1
  280. package/lib/framework/output.js +1 -1
  281. package/lib/framework/response.js +1 -1
  282. package/lib/framework/runner-alias.js +1 -1
  283. package/lib/framework/runner.js +1 -1
  284. package/lib/framework/schema-export.js +1 -1
  285. package/lib/framework/types.js +1 -1
  286. package/lib/generated/build-info.d.ts +4 -4
  287. package/lib/generated/build-info.js +1 -1
  288. package/lib/generated/official-routing.d.ts +83 -0
  289. package/lib/generated/official-routing.js +1 -0
  290. package/lib/generated/routing-contract.d.ts +9 -0
  291. package/lib/generated/routing-contract.js +1 -0
  292. package/lib/help.js +1 -1
  293. package/lib/postinstall.js +1 -1
  294. package/lib/runtime/confirmation.js +1 -1
  295. package/lib/runtime/event.js +1 -1
  296. package/lib/runtime/index.js +1 -1
  297. package/lib/runtime/queue.js +1 -1
  298. package/lib/runtime/resolve.js +1 -1
  299. package/lib/skills/builtin-skill.js +1 -1
  300. package/lib/skills/main.js +1 -1
  301. package/lib/skills/npx-skills-add.js +1 -1
  302. package/lib/skills/skill-presence.js +1 -1
  303. package/lib/telemetry/cli-command-trace.js +1 -1
  304. package/lib/telemetry/cli-help-trace.js +1 -1
  305. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  306. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  307. package/lib/telemetry/send-cli-trace-log.js +1 -1
  308. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  309. package/lib/types/index.d.ts +0 -1
  310. package/lib/utils/ai_config.js +1 -1
  311. package/lib/utils/apply-jq-filter.js +1 -1
  312. package/lib/utils/cdn-config.js +1 -1
  313. package/lib/utils/check-sdk-version.js +1 -1
  314. package/lib/utils/cli-version-check.js +1 -1
  315. package/lib/utils/cli-version-policy.js +1 -1
  316. package/lib/utils/config.js +1 -1
  317. package/lib/utils/entity-with-id.js +1 -1
  318. package/lib/utils/file-utils.js +1 -1
  319. package/lib/utils/guides-cdn.js +1 -1
  320. package/lib/utils/http-client.js +1 -1
  321. package/lib/utils/is-non-interactive.js +1 -1
  322. package/lib/utils/logger.js +1 -1
  323. package/lib/utils/params.js +1 -1
  324. package/lib/utils/platform.js +1 -1
  325. package/lib/utils/sleep.js +1 -1
  326. package/lib/utils/template-replacer.js +1 -1
  327. package/lib/utils/update-notice.js +1 -1
  328. package/lib/utils/version.js +1 -1
  329. package/lib/utils/with-active-cookie.js +1 -1
  330. package/lib/utils/write-cli-side-channel.js +1 -1
  331. package/package.json +2 -1
  332. package/skills/rabetbase/SKILL.md +15 -12
  333. package/skills/rabetbase/guides/sdk-client-generation.md +10 -8
  334. package/skills/rabetbase/references/rabetbase-api-pull.md +16 -11
  335. package/skills/rabetbase/references/rabetbase-config.md +3 -3
  336. package/skills/rabetbase/references/rabetbase-database-template.md +36 -0
  337. package/skills/rabetbase/references/rabetbase-doctor.md +1 -0
  338. package/skills/rabetbase/references/rabetbase-init.md +32 -8
  339. package/skills/rabetbase/references/rabetbase-project-create.md +33 -8
  340. package/skills/rabetbase/references/rabetbase-project-domain-routing-sync.md +28 -0
  341. package/skills/rabetbase/references/rabetbase-rule.md +64 -0
  342. package/skills/rabetbase.manifest.json +6 -3
  343. package/lib/config/project-routing.d.ts +0 -30
  344. package/lib/config/project-routing.js +0 -1
@@ -1 +1 @@
1
- function a296_0x3314(_0x4be4b4,_0x566db9){_0x4be4b4=_0x4be4b4-0x1c3;const _0x813b2f=a296_0x813b();let _0x331425=_0x813b2f[_0x4be4b4];return _0x331425;}const a296_0x31dd78=a296_0x3314;(function(_0x4ac278,_0x1c84d2){const _0x5109b7=a296_0x3314,_0x49e7d8=_0x4ac278();while(!![]){try{const _0x3e0cf5=-parseInt(_0x5109b7(0x1c8))/0x1+-parseInt(_0x5109b7(0x1d9))/0x2*(parseInt(_0x5109b7(0x1e8))/0x3)+parseInt(_0x5109b7(0x1dc))/0x4+-parseInt(_0x5109b7(0x1d4))/0x5+-parseInt(_0x5109b7(0x1eb))/0x6+parseInt(_0x5109b7(0x1c6))/0x7*(-parseInt(_0x5109b7(0x1d0))/0x8)+parseInt(_0x5109b7(0x1db))/0x9;if(_0x3e0cf5===_0x1c84d2)break;else _0x49e7d8['push'](_0x49e7d8['shift']());}catch(_0x148dee){_0x49e7d8['push'](_0x49e7d8['shift']());}}}(a296_0x813b,0x3cc53));import a296_0x2ddd2c from'winston';import a296_0x51cb34 from'node:fs';import a296_0x5158db from'node:path';class Logger{[a296_0x31dd78(0x1f2)];[a296_0x31dd78(0x1ca)];[a296_0x31dd78(0x1f8)]='';constructor(){const _0x2d6ca2=a296_0x31dd78;this[_0x2d6ca2(0x1ca)]='';}[a296_0x31dd78(0x1cb)](_0xc4e7e3){const _0x226bea=a296_0x31dd78;this[_0x226bea(0x1f8)]=_0xc4e7e3;}[a296_0x31dd78(0x1e5)](){const _0x53682b=a296_0x31dd78,_0x15d6a4=a296_0x5158db['dirname'](this[_0x53682b(0x1ca)]);!a296_0x51cb34[_0x53682b(0x1f6)](_0x15d6a4)&&a296_0x51cb34['mkdirSync'](_0x15d6a4,{'recursive':!![]});const _0x3a58e7=a296_0x2ddd2c[_0x53682b(0x1f9)]['combine'](a296_0x2ddd2c[_0x53682b(0x1f9)][_0x53682b(0x1ef)](),a296_0x2ddd2c['format'][_0x53682b(0x1ce)]({'stack':!![]}),a296_0x2ddd2c[_0x53682b(0x1f9)][_0x53682b(0x1d7)](_0xb5b750=>{const _0xc8ec92=_0x53682b,_0x89a428={'timestamp':_0xb5b750['timestamp']||new Date()[_0xc8ec92(0x1ed)](),'level':_0xb5b750['level']||_0xc8ec92(0x1d2),'command':_0xb5b750[_0xc8ec92(0x1dd)]||_0xc8ec92(0x1e0),'rawCommand':_0xb5b750[_0xc8ec92(0x1de)]||this[_0xc8ec92(0x1f8)]||undefined,'message':_0xb5b750[_0xc8ec92(0x1f0)]||'','duration':_0xb5b750[_0xc8ec92(0x1d6)]||undefined,'details':_0xb5b750[_0xc8ec92(0x1e9)]||undefined};return JSON[_0xc8ec92(0x1f1)](_0x89a428);}));this[_0x53682b(0x1f2)]=a296_0x2ddd2c[_0x53682b(0x1c4)]({'level':_0x53682b(0x1d2),'format':_0x3a58e7,'transports':[new a296_0x2ddd2c[(_0x53682b(0x1da))][(_0x53682b(0x1d8))]({'filename':this[_0x53682b(0x1ca)],'level':_0x53682b(0x1d2)})],'silent':![]}),a296_0x2ddd2c[_0x53682b(0x1e4)]({'success':_0x53682b(0x1c7),'error':_0x53682b(0x1d1),'warn':_0x53682b(0x1cf),'info':_0x53682b(0x1cc)});}['setLogPath'](_0x17be24){const _0xe25474=a296_0x31dd78;this['logFilePath']=a296_0x5158db[_0xe25474(0x1cd)](_0x17be24,_0xe25474(0x1c3)),this[_0xe25474(0x1f2)]&&this['winstonLogger'][_0xe25474(0x1ee)](),this[_0xe25474(0x1e5)]();}['info'](_0x35c3cc,_0x1b1ea3,_0x27356f){const _0x137419=a296_0x31dd78;if(!this[_0x137419(0x1ca)]||!this[_0x137419(0x1f2)])return;this['winstonLogger'][_0x137419(0x1d2)](_0x1b1ea3,{'command':_0x35c3cc,'details':_0x27356f});}[a296_0x31dd78(0x1ec)](_0x294ac3,_0x57e536,_0x5a9286,_0xf3533b){const _0x121284=a296_0x31dd78;if(!this[_0x121284(0x1ca)]||!this[_0x121284(0x1f2)])return;this[_0x121284(0x1f2)][_0x121284(0x1e7)](_0x121284(0x1d2),_0x57e536,{'level':_0x121284(0x1ec),'command':_0x294ac3,'duration':_0x5a9286,'details':_0xf3533b});}[a296_0x31dd78(0x1f7)](_0x31bca6,_0x2fdab5,_0x13294a){const _0x3e296c=a296_0x31dd78;if(!this[_0x3e296c(0x1ca)]||!this[_0x3e296c(0x1f2)])return;this[_0x3e296c(0x1f2)][_0x3e296c(0x1f7)](_0x2fdab5,{'command':_0x31bca6,'details':_0x13294a});}['warn'](_0x3aab12,_0x1312f5,_0x4189c6){const _0x462057=a296_0x31dd78;if(!this['logFilePath']||!this[_0x462057(0x1f2)])return;this[_0x462057(0x1f2)][_0x462057(0x1d5)](_0x1312f5,{'command':_0x3aab12,'details':_0x4189c6});}async['logTask'](_0x520564,_0x2fe4d8,_0x100a93){const _0x18a17f=a296_0x31dd78,_0x31af16=Date['now']();this[_0x18a17f(0x1d2)](_0x520564,'Starting:\x20'+_0x2fe4d8);try{const _0x409d58=await _0x100a93(),_0x227c31=Date[_0x18a17f(0x1e3)]()-_0x31af16;return this[_0x18a17f(0x1ec)](_0x520564,_0x18a17f(0x1e1)+_0x2fe4d8,_0x227c31),_0x409d58;}catch(_0x453160){const _0x520eff=Date['now']()-_0x31af16;this[_0x18a17f(0x1f7)](_0x520564,_0x18a17f(0x1f3)+_0x2fe4d8,{'error':_0x453160 instanceof Error?_0x453160[_0x18a17f(0x1f0)]:String(_0x453160),'duration':_0x520eff});throw _0x453160;}}['readLogs'](){const _0x16bca5=a296_0x31dd78;try{if(!a296_0x51cb34['existsSync'](this[_0x16bca5(0x1ca)]))return[];const _0xf1a5f2=a296_0x51cb34[_0x16bca5(0x1c9)](this['logFilePath'],_0x16bca5(0x1f4));return _0xf1a5f2[_0x16bca5(0x1df)]('\x0a')[_0x16bca5(0x1e6)](_0x59533d=>_0x59533d['trim']())[_0x16bca5(0x1e2)](_0x2b1579=>JSON[_0x16bca5(0x1d3)](_0x2b1579));}catch(_0x4c1599){return console[_0x16bca5(0x1d5)](_0x16bca5(0x1ea),_0x4c1599),[];}}['clearLogs'](){const _0x224639=a296_0x31dd78;try{a296_0x51cb34['existsSync'](this['logFilePath'])&&a296_0x51cb34['writeFileSync'](this[_0x224639(0x1ca)],'','utf8');}catch(_0x2ef2d8){console['warn'](_0x224639(0x1f5),_0x2ef2d8);}}[a296_0x31dd78(0x1c5)](){const _0x93dba9=a296_0x31dd78;return this[_0x93dba9(0x1f2)];}}function a296_0x813b(){const _0x1a9fa2=['red','info','parse','898175ktcPko','warn','duration','printf','File','386350kchLeE','transports','9677673LguhNj','326536qyliUj','command','rawCommand','split','unknown','Completed:\x20','map','now','addColors','initWinstonLogger','filter','log','3LydmMr','details','Failed\x20to\x20read\x20logs:','873840wKHhmY','success','toISOString','clear','timestamp','message','stringify','winstonLogger','Failed:\x20','utf8','Failed\x20to\x20clear\x20logs:','existsSync','error','currentRawCommand','format','.lovrabet.log','createLogger','getWinstonInstance','132902yTJRzM','green','256664RxnDFv','readFileSync','logFilePath','setRawCommand','blue','join','errors','yellow','56hYVMvG'];a296_0x813b=function(){return _0x1a9fa2;};return a296_0x813b();}export const logger=new Logger();
1
+ const a304_0x5eba21=a304_0x1ba2;function a304_0x1ba2(_0x296b86,_0x2b3b2b){_0x296b86=_0x296b86-0xea;const _0x143204=a304_0x1432();let _0x1ba267=_0x143204[_0x296b86];return _0x1ba267;}(function(_0x53fdf9,_0x1813c0){const _0x2988aa=a304_0x1ba2,_0x2f0479=_0x53fdf9();while(!![]){try{const _0x2ff148=-parseInt(_0x2988aa(0xf2))/0x1*(parseInt(_0x2988aa(0xf6))/0x2)+parseInt(_0x2988aa(0xff))/0x3*(parseInt(_0x2988aa(0x10e))/0x4)+-parseInt(_0x2988aa(0x117))/0x5+parseInt(_0x2988aa(0xfe))/0x6+parseInt(_0x2988aa(0x102))/0x7*(-parseInt(_0x2988aa(0x119))/0x8)+parseInt(_0x2988aa(0x105))/0x9+parseInt(_0x2988aa(0xfd))/0xa;if(_0x2ff148===_0x1813c0)break;else _0x2f0479['push'](_0x2f0479['shift']());}catch(_0x1140f1){_0x2f0479['push'](_0x2f0479['shift']());}}}(a304_0x1432,0xa7432));import a304_0x1c6c7a from'winston';import a304_0x4a6249 from'node:fs';import a304_0x1fdc1 from'node:path';function a304_0x1432(){const _0x1d679f=['7537884enprpT','346254cjYyGt','logFilePath','rawCommand','77HszSig','utf8','yellow','8735742fMbCIB','Failed\x20to\x20clear\x20logs:','setLogPath','File','toISOString','Failed\x20to\x20read\x20logs:','info','trim','mkdirSync','4ZkvrKQ','join','level','timestamp','winstonLogger','command','errors','readFileSync','transports','6361840mDBkKt','format','978232ZXrhGI','clear','combine','createLogger','currentRawCommand','initWinstonLogger','printf','now','success','warn','115GCzZAK','readLogs','existsSync','Starting:\x20','10684TeVqho','error','filter','message','duration','blue','writeFileSync','15745030lwcjcp'];a304_0x1432=function(){return _0x1d679f;};return a304_0x1432();}class Logger{[a304_0x5eba21(0x112)];[a304_0x5eba21(0x100)];[a304_0x5eba21(0xec)]='';constructor(){this['logFilePath']='';}['setRawCommand'](_0xcce94){const _0xfdc5dd=a304_0x5eba21;this[_0xfdc5dd(0xec)]=_0xcce94;}[a304_0x5eba21(0xed)](){const _0x6c50ed=a304_0x5eba21,_0x5ad217=a304_0x1fdc1['dirname'](this['logFilePath']);!a304_0x4a6249[_0x6c50ed(0xf4)](_0x5ad217)&&a304_0x4a6249[_0x6c50ed(0x10d)](_0x5ad217,{'recursive':!![]});const _0x31d412=a304_0x1c6c7a[_0x6c50ed(0x118)][_0x6c50ed(0xea)](a304_0x1c6c7a[_0x6c50ed(0x118)][_0x6c50ed(0x111)](),a304_0x1c6c7a[_0x6c50ed(0x118)][_0x6c50ed(0x114)]({'stack':!![]}),a304_0x1c6c7a['format'][_0x6c50ed(0xee)](_0x2058c4=>{const _0x279af1=_0x6c50ed,_0x5c2696={'timestamp':_0x2058c4[_0x279af1(0x111)]||new Date()[_0x279af1(0x109)](),'level':_0x2058c4[_0x279af1(0x110)]||'info','command':_0x2058c4[_0x279af1(0x113)]||'unknown','rawCommand':_0x2058c4[_0x279af1(0x101)]||this['currentRawCommand']||undefined,'message':_0x2058c4[_0x279af1(0xf9)]||'','duration':_0x2058c4[_0x279af1(0xfa)]||undefined,'details':_0x2058c4['details']||undefined};return JSON['stringify'](_0x5c2696);}));this[_0x6c50ed(0x112)]=a304_0x1c6c7a[_0x6c50ed(0xeb)]({'level':'info','format':_0x31d412,'transports':[new a304_0x1c6c7a[(_0x6c50ed(0x116))][(_0x6c50ed(0x108))]({'filename':this[_0x6c50ed(0x100)],'level':_0x6c50ed(0x10b)})],'silent':![]}),a304_0x1c6c7a['addColors']({'success':'green','error':'red','warn':_0x6c50ed(0x104),'info':_0x6c50ed(0xfb)});}[a304_0x5eba21(0x107)](_0x2f9772){const _0x48efc5=a304_0x5eba21;this[_0x48efc5(0x100)]=a304_0x1fdc1[_0x48efc5(0x10f)](_0x2f9772,'.lovrabet.log'),this[_0x48efc5(0x112)]&&this[_0x48efc5(0x112)][_0x48efc5(0x11a)](),this[_0x48efc5(0xed)]();}[a304_0x5eba21(0x10b)](_0xfa04f,_0x350273,_0x3419ae){const _0x17c996=a304_0x5eba21;if(!this['logFilePath']||!this['winstonLogger'])return;this[_0x17c996(0x112)][_0x17c996(0x10b)](_0x350273,{'command':_0xfa04f,'details':_0x3419ae});}['success'](_0x12db69,_0x3dab62,_0x216a5e,_0x331005){const _0x29f9b3=a304_0x5eba21;if(!this['logFilePath']||!this[_0x29f9b3(0x112)])return;this[_0x29f9b3(0x112)]['log'](_0x29f9b3(0x10b),_0x3dab62,{'level':_0x29f9b3(0xf0),'command':_0x12db69,'duration':_0x216a5e,'details':_0x331005});}[a304_0x5eba21(0xf7)](_0x3bfd2d,_0x1cf5e3,_0x3905d8){const _0x5445de=a304_0x5eba21;if(!this['logFilePath']||!this['winstonLogger'])return;this[_0x5445de(0x112)][_0x5445de(0xf7)](_0x1cf5e3,{'command':_0x3bfd2d,'details':_0x3905d8});}[a304_0x5eba21(0xf1)](_0x1d42ab,_0x580f6d,_0x5ef269){const _0xf7767a=a304_0x5eba21;if(!this[_0xf7767a(0x100)]||!this[_0xf7767a(0x112)])return;this[_0xf7767a(0x112)][_0xf7767a(0xf1)](_0x580f6d,{'command':_0x1d42ab,'details':_0x5ef269});}async['logTask'](_0x310821,_0x411690,_0x4b0afa){const _0x5b58cd=a304_0x5eba21,_0x34de2f=Date[_0x5b58cd(0xef)]();this[_0x5b58cd(0x10b)](_0x310821,_0x5b58cd(0xf5)+_0x411690);try{const _0x4c32a3=await _0x4b0afa(),_0x29c8fa=Date[_0x5b58cd(0xef)]()-_0x34de2f;return this[_0x5b58cd(0xf0)](_0x310821,'Completed:\x20'+_0x411690,_0x29c8fa),_0x4c32a3;}catch(_0x76c297){const _0x491f2a=Date[_0x5b58cd(0xef)]()-_0x34de2f;this[_0x5b58cd(0xf7)](_0x310821,'Failed:\x20'+_0x411690,{'error':_0x76c297 instanceof Error?_0x76c297[_0x5b58cd(0xf9)]:String(_0x76c297),'duration':_0x491f2a});throw _0x76c297;}}[a304_0x5eba21(0xf3)](){const _0x22825a=a304_0x5eba21;try{if(!a304_0x4a6249[_0x22825a(0xf4)](this['logFilePath']))return[];const _0x2852c0=a304_0x4a6249[_0x22825a(0x115)](this['logFilePath'],_0x22825a(0x103));return _0x2852c0['split']('\x0a')[_0x22825a(0xf8)](_0x505357=>_0x505357[_0x22825a(0x10c)]())['map'](_0x57acf5=>JSON['parse'](_0x57acf5));}catch(_0x4e5a0b){return console[_0x22825a(0xf1)](_0x22825a(0x10a),_0x4e5a0b),[];}}['clearLogs'](){const _0x4eb86c=a304_0x5eba21;try{a304_0x4a6249[_0x4eb86c(0xf4)](this[_0x4eb86c(0x100)])&&a304_0x4a6249[_0x4eb86c(0xfc)](this[_0x4eb86c(0x100)],'',_0x4eb86c(0x103));}catch(_0x2dd0c0){console[_0x4eb86c(0xf1)](_0x4eb86c(0x106),_0x2dd0c0);}}['getWinstonInstance'](){const _0x1bc4fc=a304_0x5eba21;return this[_0x1bc4fc(0x112)];}}export const logger=new Logger();
@@ -1 +1 @@
1
- (function(_0x165304,_0x189ecb){const _0xde761f=a297_0x5917,_0x175ec8=_0x165304();while(!![]){try{const _0xd15033=-parseInt(_0xde761f(0x1c1))/0x1*(parseInt(_0xde761f(0x1ce))/0x2)+parseInt(_0xde761f(0x1c5))/0x3+-parseInt(_0xde761f(0x1c7))/0x4+parseInt(_0xde761f(0x1c6))/0x5*(parseInt(_0xde761f(0x1c4))/0x6)+-parseInt(_0xde761f(0x1c0))/0x7*(parseInt(_0xde761f(0x1c8))/0x8)+-parseInt(_0xde761f(0x1c2))/0x9+parseInt(_0xde761f(0x1bf))/0xa*(parseInt(_0xde761f(0x1cd))/0xb);if(_0xd15033===_0x189ecb)break;else _0x175ec8['push'](_0x175ec8['shift']());}catch(_0x56b2f4){_0x175ec8['push'](_0x175ec8['shift']());}}}(a297_0x388e,0x24e98));import{CliErrors}from'../errors.js';export function parseJsonParams(_0x4c5bb2){const _0x28c5ec=a297_0x5917;if(!_0x4c5bb2)return undefined;let _0x5b90c7;try{_0x5b90c7=JSON['parse'](_0x4c5bb2);}catch{throw CliErrors['validation'](_0x28c5ec(0x1cc)+_0x4c5bb2);}if(!_0x5b90c7||typeof _0x5b90c7!==_0x28c5ec(0x1c3)||Array[_0x28c5ec(0x1cf)](_0x5b90c7))throw CliErrors[_0x28c5ec(0x1ca)](_0x28c5ec(0x1cb),_0x28c5ec(0x1c9));return _0x5b90c7;}function a297_0x5917(_0xcfff78,_0x43c035){_0xcfff78=_0xcfff78-0x1bf;const _0x388e51=a297_0x388e();let _0x59179e=_0x388e51[_0xcfff78];return _0x59179e;}function a297_0x388e(){const _0x14191f=['--params\x20must\x20be\x20a\x20JSON\x20object','Invalid\x20JSON\x20for\x20--params:\x20','3036fgszZD','266KWWWnP','isArray','18020jZDxVO','7fsAGJJ','1456pEThTJ','1445679gUKogI','object','15366vTNwof','617493ppRGWG','225zNzkAH','749280AZEgva','1005096tYjVgI','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','validation'];a297_0x388e=function(){return _0x14191f;};return a297_0x388e();}
1
+ function a305_0x1153(){const _0x4a931c=['validation','isArray','98574auXcGA','2863491Sacvjy','Invalid\x20JSON\x20for\x20--params:\x20','5295241txHAbo','10Stopls','7466208dHVNnb','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','19286145hUBAnS','3674aifVpi','object','356576iTARMh','208NoIIhm','parse','120eAsrSJ'];a305_0x1153=function(){return _0x4a931c;};return a305_0x1153();}(function(_0x34e702,_0x426c3){const _0x7f748a=a305_0x2952,_0x3922f3=_0x34e702();while(!![]){try{const _0x31f79d=parseInt(_0x7f748a(0xa1))/0x1*(-parseInt(_0x7f748a(0xae))/0x2)+-parseInt(_0x7f748a(0xa7))/0x3+-parseInt(_0x7f748a(0xb0))/0x4+parseInt(_0x7f748a(0xa3))/0x5*(-parseInt(_0x7f748a(0xa6))/0x6)+-parseInt(_0x7f748a(0xa9))/0x7+parseInt(_0x7f748a(0xab))/0x8+-parseInt(_0x7f748a(0xad))/0x9*(-parseInt(_0x7f748a(0xaa))/0xa);if(_0x31f79d===_0x426c3)break;else _0x3922f3['push'](_0x3922f3['shift']());}catch(_0x24c93c){_0x3922f3['push'](_0x3922f3['shift']());}}}(a305_0x1153,0x79fe5));import{CliErrors}from'../errors.js';function a305_0x2952(_0x5821b0,_0x554144){_0x5821b0=_0x5821b0-0xa1;const _0x1153a1=a305_0x1153();let _0x295228=_0x1153a1[_0x5821b0];return _0x295228;}export function parseJsonParams(_0x377ca1){const _0x5c3cfb=a305_0x2952;if(!_0x377ca1)return undefined;let _0xcb8a25;try{_0xcb8a25=JSON[_0x5c3cfb(0xa2)](_0x377ca1);}catch{throw CliErrors['validation'](_0x5c3cfb(0xa8)+_0x377ca1);}if(!_0xcb8a25||typeof _0xcb8a25!==_0x5c3cfb(0xaf)||Array[_0x5c3cfb(0xa5)](_0xcb8a25))throw CliErrors[_0x5c3cfb(0xa4)]('--params\x20must\x20be\x20a\x20JSON\x20object',_0x5c3cfb(0xac));return _0xcb8a25;}
@@ -1 +1 @@
1
- function a298_0x159b(_0x43d59a,_0x1f9254){_0x43d59a=_0x43d59a-0x17b;const _0x42fae8=a298_0x42fa();let _0x159bb9=_0x42fae8[_0x43d59a];return _0x159bb9;}(function(_0x23d99c,_0x55e616){const _0x339e4c=a298_0x159b,_0x1e3189=_0x23d99c();while(!![]){try{const _0x4741c9=parseInt(_0x339e4c(0x17e))/0x1*(-parseInt(_0x339e4c(0x182))/0x2)+parseInt(_0x339e4c(0x180))/0x3+parseInt(_0x339e4c(0x17c))/0x4+parseInt(_0x339e4c(0x181))/0x5+-parseInt(_0x339e4c(0x17b))/0x6+parseInt(_0x339e4c(0x183))/0x7*(-parseInt(_0x339e4c(0x17f))/0x8)+-parseInt(_0x339e4c(0x17d))/0x9;if(_0x4741c9===_0x55e616)break;else _0x1e3189['push'](_0x1e3189['shift']());}catch(_0x3bdc54){_0x1e3189['push'](_0x1e3189['shift']());}}}(a298_0x42fa,0x7b84d));function a298_0x42fa(){const _0xe322bb=['6341661chrVIc','58516wfGfwA','12200DHBghP','1528251wAjWdz','4941780RPbIWU','14mdsfgu','581TimImn','275028fMMBjM','1179256oOiTLw'];a298_0x42fa=function(){return _0xe322bb;};return a298_0x42fa();}export const isWindows=process['platform']==='win32';export function resolveNpmBin(_0x19825e){return isWindows?_0x19825e+'.cmd':_0x19825e;}
1
+ function a306_0x2e66(){const _0x254ebc=['980pbalwO','1160MvniLB','4sRsYAb','3979728Oscotn','1380945qDznQs','6672232MtFuUA','21660885GKUAQC','.cmd','553431eZMoms','1229396SBglNZ'];a306_0x2e66=function(){return _0x254ebc;};return a306_0x2e66();}(function(_0x17379c,_0x2541e1){const _0x5ed7f6=a306_0x1515,_0x32e878=_0x17379c();while(!![]){try{const _0x55e14c=parseInt(_0x5ed7f6(0x1ec))/0x1*(parseInt(_0x5ed7f6(0x1ed))/0x2)+-parseInt(_0x5ed7f6(0x1ea))/0x3*(parseInt(_0x5ed7f6(0x1ee))/0x4)+-parseInt(_0x5ed7f6(0x1e6))/0x5+-parseInt(_0x5ed7f6(0x1ef))/0x6+-parseInt(_0x5ed7f6(0x1eb))/0x7+-parseInt(_0x5ed7f6(0x1e7))/0x8+parseInt(_0x5ed7f6(0x1e8))/0x9;if(_0x55e14c===_0x2541e1)break;else _0x32e878['push'](_0x32e878['shift']());}catch(_0x1b6485){_0x32e878['push'](_0x32e878['shift']());}}}(a306_0x2e66,0xcd752));function a306_0x1515(_0x1abfba,_0x55b1d8){_0x1abfba=_0x1abfba-0x1e6;const _0x2e66c4=a306_0x2e66();let _0x15156c=_0x2e66c4[_0x1abfba];return _0x15156c;}export const isWindows=process['platform']==='win32';export function resolveNpmBin(_0x1fc976){const _0xb42351=a306_0x1515;return isWindows?_0x1fc976+_0xb42351(0x1e9):_0x1fc976;}
@@ -1 +1 @@
1
- export function sleep(_0x10fb47){return new Promise(_0x133792=>setTimeout(_0x133792,_0x10fb47));}
1
+ export function sleep(_0x329304){return new Promise(_0x432048=>setTimeout(_0x432048,_0x329304));}
@@ -1 +1 @@
1
- const a300_0x534cf0=a300_0x4770;(function(_0xd29b64,_0x26a499){const _0x2d5f85=a300_0x4770,_0x1b1d1a=_0xd29b64();while(!![]){try{const _0x145a06=-parseInt(_0x2d5f85(0x9a))/0x1*(parseInt(_0x2d5f85(0xa7))/0x2)+-parseInt(_0x2d5f85(0xac))/0x3+-parseInt(_0x2d5f85(0x8a))/0x4*(parseInt(_0x2d5f85(0x77))/0x5)+-parseInt(_0x2d5f85(0xa8))/0x6*(parseInt(_0x2d5f85(0x93))/0x7)+-parseInt(_0x2d5f85(0xad))/0x8*(parseInt(_0x2d5f85(0x75))/0x9)+parseInt(_0x2d5f85(0xaf))/0xa+parseInt(_0x2d5f85(0x8b))/0xb;if(_0x145a06===_0x26a499)break;else _0x1b1d1a['push'](_0x1b1d1a['shift']());}catch(_0x71f326){_0x1b1d1a['push'](_0x1b1d1a['shift']());}}}(a300_0x52ff,0x66f43));import a300_0x18c55a from'node:fs';import a300_0x473e4b from'node:path';function a300_0x52ff(){const _0x4db39c=['info','endsWith','toDisplayTitle','name','toLowerCase','51055YTpKhN','push','map','promises','mkdir','tableName','utf8','.tpl','processFile','readFile','.tsx','tableName:\x20\x22','getHours','2zHMVVI','2368602oZqkxs','writeFile','charAt','padStart','1404645JOJrju','4504QodRXY','getDate','6460260qjeHqc','datasetCode:\x20\x22','processDirectory','name:\x20\x22','datasetCode','alias','Template\x20content\x20replacement\x20failed','now','alias:\x20\x22','api','.scss','copyFile','toComponentName','replace','6795VDNEWq','.js','376990cJgvnj','split','YourModel','isFile','toUpperCase','getMinutes','success','\x20},','.css','includes','\x0a\x20\x20\x20\x20{\x20','join','replaceContent','isDirectory','error','.jsx','replaceApiContent','extname','Template\x20content\x20replacement\x20completed','16iltrsn','15580037laduWJ','pad','template','getFullYear','.md','readdir','getSeconds','.ts','7kkqAQK','pop'];a300_0x52ff=function(){return _0x4db39c;};return a300_0x52ff();}function a300_0x4770(_0x4f81bb,_0x211edb){_0x4f81bb=_0x4f81bb-0x69;const _0x52ff43=a300_0x52ff();let _0x477084=_0x52ff43[_0x4f81bb];return _0x477084;}import{logger}from'../utils/logger.js';import{getCliVersion}from'../utils/version.js';const CLI_VERSION=getCliVersion();export class TemplateReplacer{static[a300_0x534cf0(0x8c)](_0xc0445d){const _0x23bffd=a300_0x534cf0;return String(_0xc0445d)[_0x23bffd(0xab)](0x2,'0');}static['formatLocalTimestamp'](_0x3bf8fc){const _0x159497=a300_0x534cf0,_0x32d81f=_0x3bf8fc[_0x159497(0x8e)](),_0x2fa638=this[_0x159497(0x8c)](_0x3bf8fc['getMonth']()+0x1),_0x1df42e=this[_0x159497(0x8c)](_0x3bf8fc[_0x159497(0xae)]()),_0x2e0b91=this[_0x159497(0x8c)](_0x3bf8fc[_0x159497(0xa6)]()),_0x743b7b=this[_0x159497(0x8c)](_0x3bf8fc[_0x159497(0x7c)]()),_0x474a02=this[_0x159497(0x8c)](_0x3bf8fc[_0x159497(0x91)]());return{'createdAt':_0x32d81f+'-'+_0x2fa638+'-'+_0x1df42e+'\x20'+_0x2e0b91+':'+_0x743b7b+':'+_0x474a02,'createdDate':_0x32d81f+'-'+_0x2fa638+'-'+_0x1df42e,'createdTime':_0x2e0b91+':'+_0x743b7b+':'+_0x474a02};}static[a300_0x534cf0(0x73)](_0x322a37){const _0x3fc74a=a300_0x534cf0,_0x45338a=_0x322a37[_0x3fc74a(0x78)]('/')[_0x3fc74a(0x94)]()||_0x322a37;return _0x45338a[_0x3fc74a(0x78)]('-')[_0x3fc74a(0x9c)](_0x47f099=>_0x47f099[_0x3fc74a(0xaa)](0x0)['toUpperCase']()+_0x47f099['slice'](0x1)[_0x3fc74a(0x99)]())[_0x3fc74a(0x82)]('');}static[a300_0x534cf0(0x97)](_0x57eafd){const _0x5af2d2=a300_0x534cf0,_0x49449b=_0x57eafd[_0x5af2d2(0x78)]('/')[_0x5af2d2(0x94)]()||_0x57eafd;return _0x49449b[_0x5af2d2(0x78)]('-')[_0x5af2d2(0x9c)](_0x55395d=>_0x55395d[_0x5af2d2(0xaa)](0x0)[_0x5af2d2(0x7b)]()+_0x55395d['slice'](0x1)['toLowerCase']())[_0x5af2d2(0x82)]('\x20');}static[a300_0x534cf0(0x83)](_0x292a8a,_0x4ee478,_0x47ff4b){const _0x566ff6=a300_0x534cf0,_0x297390=this[_0x566ff6(0x73)](_0x4ee478),_0x13364b=this['toDisplayTitle'](_0x4ee478),{createdAt:_0x260785,createdDate:_0x3b80cc,createdTime:_0x4353d0}=this['formatLocalTimestamp'](new Date());let _0x3ba184=_0x292a8a[_0x566ff6(0x74)](/\{CliVersion\}/g,CLI_VERSION)[_0x566ff6(0x74)](/\{ComponentName\}/g,_0x297390)[_0x566ff6(0x74)](/\{DisplayTitle\}/g,_0x13364b)[_0x566ff6(0x74)](/\{PageName\}/g,_0x4ee478)['replace'](/\{TemplateName\}/g,_0x47ff4b)['replace'](/\{CreatedAt\}/g,_0x260785)[_0x566ff6(0x74)](/\{CreatedDate\}/g,_0x3b80cc)['replace'](/\{CreatedTime\}/g,_0x4353d0);return _0x3ba184;}static[a300_0x534cf0(0x87)](_0x81f965,_0x44b5b6,_0x2456ed,_0x3862f1,_0x27dbc1,_0x484afe,_0x1bff4f,_0xa63b9a){const _0x387d48=a300_0x534cf0,_0x2e8ab7=new Date(),_0x575315=_0x2e8ab7['toISOString'](),_0x25fb56=_0x2456ed[_0x387d48(0x9c)](_0xdfd7d0=>{const _0xb093a9=_0x387d48,_0x335ae0=[_0xb093a9(0xb0)+_0xdfd7d0[_0xb093a9(0x6b)]+'\x22',_0xb093a9(0xa5)+_0xdfd7d0[_0xb093a9(0x9f)]+'\x22',_0xb093a9(0x6a)+_0xdfd7d0[_0xb093a9(0x98)]+'\x22'];return _0xdfd7d0[_0xb093a9(0x6c)]&&_0x335ae0[_0xb093a9(0x9b)](_0xb093a9(0x6f)+_0xdfd7d0[_0xb093a9(0x6c)]+'\x22'),_0xb093a9(0x81)+_0x335ae0['join'](',\x20')+_0xb093a9(0x7e);})[_0x387d48(0x82)](''),_0x173c47=_0x3862f1||_0x2456ed[0x0]?.[_0x387d48(0x6c)]||_0x387d48(0x79);let _0x243d09=_0x81f965[_0x387d48(0x74)](/\{AppCode\}/g,_0x44b5b6)['replace'](/\{ModelConfigs\}/g,_0x25fb56)[_0x387d48(0x74)](/\{ExampleModelName\}/g,_0x173c47)['replace'](/\{ApiFileName\}/g,_0x27dbc1||_0x387d48(0x70))['replace'](/\{ConfigName\}/g,_0x484afe||'default')[_0x387d48(0x74)](/\{ClientConfigParam\}/g,_0x1bff4f||'')[_0x387d48(0x74)](/\{VarPrefix\}/g,_0xa63b9a||'LOVRABET')[_0x387d48(0x74)](/\{CreatedAt\}/g,_0x575315);return _0x243d09;}static async['processTemplate'](_0xf15f98,_0xbcc686,_0x4c5747,_0x3ba082,_0x4d1497=!![]){const _0x1371fb=a300_0x534cf0,_0x4bfa84=Date[_0x1371fb(0x6e)]();try{_0x4d1497&&logger[_0x1371fb(0x95)](_0x1371fb(0x8d),'Starting\x20template\x20content\x20replacement',{'templatePath':_0xf15f98,'targetPath':_0xbcc686,'pageName':_0x4c5747,'templateName':_0x3ba082});await a300_0x18c55a['promises'][_0x1371fb(0x9e)](_0xbcc686,{'recursive':!![]}),await this[_0x1371fb(0x69)](_0xf15f98,_0xbcc686,_0x4c5747,_0x3ba082);if(_0x4d1497){const _0x1ded52=Date[_0x1371fb(0x6e)]()-_0x4bfa84;logger[_0x1371fb(0x7d)](_0x1371fb(0x8d),_0x1371fb(0x89),_0x1ded52,{'pageName':_0x4c5747,'templateName':_0x3ba082});}}catch(_0x4e20d1){if(_0x4d1497){const _0x17ac5c=Date[_0x1371fb(0x6e)]()-_0x4bfa84;logger[_0x1371fb(0x85)](_0x1371fb(0x8d),_0x1371fb(0x6d),{'templatePath':_0xf15f98,'targetPath':_0xbcc686,'pageName':_0x4c5747,'templateName':_0x3ba082,'error':_0x4e20d1 instanceof Error?_0x4e20d1['message']:String(_0x4e20d1),'duration':_0x17ac5c});}throw _0x4e20d1;}}static async[a300_0x534cf0(0x69)](_0x2b9c73,_0x139951,_0x8df1ee,_0x5e104a){const _0x2fe104=a300_0x534cf0,_0x4baed5=await a300_0x18c55a['promises'][_0x2fe104(0x90)](_0x2b9c73,{'withFileTypes':!![]});for(const _0x14917f of _0x4baed5){const _0x46de53=a300_0x473e4b['join'](_0x2b9c73,_0x14917f[_0x2fe104(0x98)]);let _0xdfab07=a300_0x473e4b[_0x2fe104(0x82)](_0x139951,_0x14917f[_0x2fe104(0x98)]);_0x14917f[_0x2fe104(0x98)][_0x2fe104(0x96)](_0x2fe104(0xa1))&&(_0xdfab07=a300_0x473e4b[_0x2fe104(0x82)](_0x139951,_0x14917f[_0x2fe104(0x98)]['replace'](/\.tpl$/,'')));if(_0x14917f[_0x2fe104(0x84)]())await a300_0x18c55a[_0x2fe104(0x9d)]['mkdir'](_0xdfab07,{'recursive':!![]}),await this[_0x2fe104(0x69)](_0x46de53,_0xdfab07,_0x8df1ee,_0x5e104a);else _0x14917f[_0x2fe104(0x7a)]()&&await this['processFile'](_0x46de53,_0xdfab07,_0x8df1ee,_0x5e104a);}}static async[a300_0x534cf0(0xa2)](_0x5c8648,_0x6ac623,_0x1a905d,_0x5f5dfa){const _0x152f75=a300_0x534cf0,_0x2cea93=a300_0x473e4b[_0x152f75(0x88)](_0x5c8648)[_0x152f75(0x99)]();_0x5c8648[_0x152f75(0x96)](_0x152f75(0xa1))&&(_0x6ac623=_0x6ac623[_0x152f75(0x74)](/\.tpl$/,''));const _0x1c5d75=[_0x152f75(0xa4),_0x152f75(0x92),_0x152f75(0x86),_0x152f75(0x76),'.json',_0x152f75(0x8f),_0x152f75(0x7f),_0x152f75(0x71),_0x152f75(0xa1)];if(_0x1c5d75[_0x152f75(0x80)](_0x2cea93)||_0x5c8648[_0x152f75(0x96)](_0x152f75(0xa1))){const _0x4365c2=await a300_0x18c55a['promises'][_0x152f75(0xa3)](_0x5c8648,'utf8'),_0x1f4f93=this['replaceContent'](_0x4365c2,_0x1a905d,_0x5f5dfa);await a300_0x18c55a[_0x152f75(0x9d)][_0x152f75(0xa9)](_0x6ac623,_0x1f4f93,_0x152f75(0xa0));}else await a300_0x18c55a[_0x152f75(0x9d)][_0x152f75(0x72)](_0x5c8648,_0x6ac623);}}
1
+ const a308_0x524b46=a308_0xf44c;function a308_0x1471(){const _0x1fca53=['toLowerCase','pad','template','isFile','974922wKwLGE','writeFile','promises','LOVRABET','toComponentName','extname','success','name','now','default','3232593AAvNkX','replaceContent','processTemplate','join','getFullYear','toDisplayTitle','padStart','readdir','6931200Rbqieg','.tsx','.jsx','isDirectory','replace','endsWith','push','.json','split','.ts','5105JStprE','getDate','error','includes','processFile','formatLocalTimestamp','.js','tableName:\x20\x22','name:\x20\x22','24HMgSjA','datasetCode','charAt','pop','950syTeFl','message','.tpl','\x20},','alias','1196766emphii','getHours','mkdir','slice','toUpperCase','getMinutes','.md','toISOString','.css','map','readFile','1036TUFZMD','\x0a\x20\x20\x20\x20{\x20','processDirectory','YourModel','Template\x20content\x20replacement\x20failed','tableName','25249sLuuuF','utf8','1259OgYYkv'];a308_0x1471=function(){return _0x1fca53;};return a308_0x1471();}(function(_0x2dc7f9,_0xd7863a){const _0x418168=a308_0xf44c,_0x165f41=_0x2dc7f9();while(!![]){try{const _0x2fd0f0=parseInt(_0x418168(0x15a))/0x1*(-parseInt(_0x418168(0x142))/0x2)+parseInt(_0x418168(0x119))/0x3+-parseInt(_0x418168(0x152))/0x4*(parseInt(_0x418168(0x135))/0x5)+-parseInt(_0x418168(0x147))/0x6+parseInt(_0x418168(0x158))/0x7*(-parseInt(_0x418168(0x13e))/0x8)+parseInt(_0x418168(0x123))/0x9+parseInt(_0x418168(0x12b))/0xa;if(_0x2fd0f0===_0xd7863a)break;else _0x165f41['push'](_0x165f41['shift']());}catch(_0x17cbb9){_0x165f41['push'](_0x165f41['shift']());}}}(a308_0x1471,0x4a58d));import a308_0x5a8490 from'node:fs';function a308_0xf44c(_0x186b3d,_0x2b063f){_0x186b3d=_0x186b3d-0x117;const _0x1471c6=a308_0x1471();let _0xf44cac=_0x1471c6[_0x186b3d];return _0xf44cac;}import a308_0xe92256 from'node:path';import{logger}from'../utils/logger.js';import{getCliVersion}from'../utils/version.js';const CLI_VERSION=getCliVersion();export class TemplateReplacer{static[a308_0x524b46(0x15c)](_0x4a8a3d){const _0x47c9d8=a308_0x524b46;return String(_0x4a8a3d)[_0x47c9d8(0x129)](0x2,'0');}static[a308_0x524b46(0x13a)](_0x2d6e37){const _0x2bad9a=a308_0x524b46,_0x5722dc=_0x2d6e37[_0x2bad9a(0x127)](),_0x2cd45e=this[_0x2bad9a(0x15c)](_0x2d6e37['getMonth']()+0x1),_0x2fe73f=this[_0x2bad9a(0x15c)](_0x2d6e37[_0x2bad9a(0x136)]()),_0x5cc1dc=this[_0x2bad9a(0x15c)](_0x2d6e37[_0x2bad9a(0x148)]()),_0x2cfba7=this[_0x2bad9a(0x15c)](_0x2d6e37[_0x2bad9a(0x14c)]()),_0x9f1475=this['pad'](_0x2d6e37['getSeconds']());return{'createdAt':_0x5722dc+'-'+_0x2cd45e+'-'+_0x2fe73f+'\x20'+_0x5cc1dc+':'+_0x2cfba7+':'+_0x9f1475,'createdDate':_0x5722dc+'-'+_0x2cd45e+'-'+_0x2fe73f,'createdTime':_0x5cc1dc+':'+_0x2cfba7+':'+_0x9f1475};}static[a308_0x524b46(0x11d)](_0x3d1687){const _0x31ef85=a308_0x524b46,_0x3cc768=_0x3d1687['split']('/')[_0x31ef85(0x141)]()||_0x3d1687;return _0x3cc768[_0x31ef85(0x133)]('-')[_0x31ef85(0x150)](_0x45a37e=>_0x45a37e[_0x31ef85(0x140)](0x0)[_0x31ef85(0x14b)]()+_0x45a37e[_0x31ef85(0x14a)](0x1)['toLowerCase']())[_0x31ef85(0x126)]('');}static[a308_0x524b46(0x128)](_0x241421){const _0x39503a=a308_0x524b46,_0x6698e8=_0x241421['split']('/')[_0x39503a(0x141)]()||_0x241421;return _0x6698e8[_0x39503a(0x133)]('-')[_0x39503a(0x150)](_0x1363d6=>_0x1363d6['charAt'](0x0)[_0x39503a(0x14b)]()+_0x1363d6[_0x39503a(0x14a)](0x1)[_0x39503a(0x15b)]())['join']('\x20');}static[a308_0x524b46(0x124)](_0x3473a3,_0x232ec,_0x3ba49f){const _0x106eba=a308_0x524b46,_0xe9a8f7=this[_0x106eba(0x11d)](_0x232ec),_0x209a4d=this[_0x106eba(0x128)](_0x232ec),{createdAt:_0x1110ce,createdDate:_0x4f4dfd,createdTime:_0x5c3582}=this[_0x106eba(0x13a)](new Date());let _0xef53ad=_0x3473a3['replace'](/\{CliVersion\}/g,CLI_VERSION)['replace'](/\{ComponentName\}/g,_0xe9a8f7)[_0x106eba(0x12f)](/\{DisplayTitle\}/g,_0x209a4d)['replace'](/\{PageName\}/g,_0x232ec)['replace'](/\{TemplateName\}/g,_0x3ba49f)[_0x106eba(0x12f)](/\{CreatedAt\}/g,_0x1110ce)[_0x106eba(0x12f)](/\{CreatedDate\}/g,_0x4f4dfd)[_0x106eba(0x12f)](/\{CreatedTime\}/g,_0x5c3582);return _0xef53ad;}static['replaceApiContent'](_0x167705,_0x522bd0,_0x2afdc8,_0x23169f,_0x3abbb2,_0x41f68a,_0x1526dd,_0x35050e){const _0x14ff85=a308_0x524b46,_0x5bb6fb=new Date(),_0x314b04=_0x5bb6fb[_0x14ff85(0x14e)](),_0x2afadd=_0x2afdc8[_0x14ff85(0x150)](_0x21fa50=>{const _0x4381b1=_0x14ff85,_0x5c12e5=['datasetCode:\x20\x22'+_0x21fa50[_0x4381b1(0x13f)]+'\x22',_0x4381b1(0x13c)+_0x21fa50[_0x4381b1(0x157)]+'\x22',_0x4381b1(0x13d)+_0x21fa50[_0x4381b1(0x120)]+'\x22'];return _0x21fa50[_0x4381b1(0x146)]&&_0x5c12e5[_0x4381b1(0x131)]('alias:\x20\x22'+_0x21fa50[_0x4381b1(0x146)]+'\x22'),_0x4381b1(0x153)+_0x5c12e5[_0x4381b1(0x126)](',\x20')+_0x4381b1(0x145);})['join'](''),_0x47fce3=_0x23169f||_0x2afdc8[0x0]?.[_0x14ff85(0x146)]||_0x14ff85(0x155);let _0xd934dd=_0x167705['replace'](/\{AppCode\}/g,_0x522bd0)[_0x14ff85(0x12f)](/\{ModelConfigs\}/g,_0x2afadd)[_0x14ff85(0x12f)](/\{ExampleModelName\}/g,_0x47fce3)[_0x14ff85(0x12f)](/\{ApiFileName\}/g,_0x3abbb2||'api')[_0x14ff85(0x12f)](/\{ConfigName\}/g,_0x41f68a||_0x14ff85(0x122))[_0x14ff85(0x12f)](/\{ClientConfigParam\}/g,_0x1526dd||'')[_0x14ff85(0x12f)](/\{VarPrefix\}/g,_0x35050e||_0x14ff85(0x11c))[_0x14ff85(0x12f)](/\{CreatedAt\}/g,_0x314b04);return _0xd934dd;}static async[a308_0x524b46(0x125)](_0x215e07,_0x1c4e87,_0x32f40a,_0x529fec,_0x2ef980=!![]){const _0x5dc9b7=a308_0x524b46,_0xa35bc2=Date[_0x5dc9b7(0x121)]();try{_0x2ef980&&logger['info'](_0x5dc9b7(0x117),'Starting\x20template\x20content\x20replacement',{'templatePath':_0x215e07,'targetPath':_0x1c4e87,'pageName':_0x32f40a,'templateName':_0x529fec});await a308_0x5a8490[_0x5dc9b7(0x11b)]['mkdir'](_0x1c4e87,{'recursive':!![]}),await this[_0x5dc9b7(0x154)](_0x215e07,_0x1c4e87,_0x32f40a,_0x529fec);if(_0x2ef980){const _0x3dbe4c=Date[_0x5dc9b7(0x121)]()-_0xa35bc2;logger[_0x5dc9b7(0x11f)]('template','Template\x20content\x20replacement\x20completed',_0x3dbe4c,{'pageName':_0x32f40a,'templateName':_0x529fec});}}catch(_0xf1b775){if(_0x2ef980){const _0x64730c=Date[_0x5dc9b7(0x121)]()-_0xa35bc2;logger[_0x5dc9b7(0x137)](_0x5dc9b7(0x117),_0x5dc9b7(0x156),{'templatePath':_0x215e07,'targetPath':_0x1c4e87,'pageName':_0x32f40a,'templateName':_0x529fec,'error':_0xf1b775 instanceof Error?_0xf1b775[_0x5dc9b7(0x143)]:String(_0xf1b775),'duration':_0x64730c});}throw _0xf1b775;}}static async[a308_0x524b46(0x154)](_0x2bdf40,_0x48dd52,_0x57bc52,_0x97c6a3){const _0xccf4=a308_0x524b46,_0x10488e=await a308_0x5a8490[_0xccf4(0x11b)][_0xccf4(0x12a)](_0x2bdf40,{'withFileTypes':!![]});for(const _0x79a214 of _0x10488e){const _0x2f25ed=a308_0xe92256['join'](_0x2bdf40,_0x79a214['name']);let _0x516ec5=a308_0xe92256['join'](_0x48dd52,_0x79a214[_0xccf4(0x120)]);_0x79a214[_0xccf4(0x120)][_0xccf4(0x130)]('.tpl')&&(_0x516ec5=a308_0xe92256['join'](_0x48dd52,_0x79a214[_0xccf4(0x120)][_0xccf4(0x12f)](/\.tpl$/,'')));if(_0x79a214[_0xccf4(0x12e)]())await a308_0x5a8490[_0xccf4(0x11b)][_0xccf4(0x149)](_0x516ec5,{'recursive':!![]}),await this[_0xccf4(0x154)](_0x2f25ed,_0x516ec5,_0x57bc52,_0x97c6a3);else _0x79a214[_0xccf4(0x118)]()&&await this[_0xccf4(0x139)](_0x2f25ed,_0x516ec5,_0x57bc52,_0x97c6a3);}}static async['processFile'](_0x509cb5,_0x44f458,_0x3d122d,_0x45620a){const _0x34dc8c=a308_0x524b46,_0x271073=a308_0xe92256[_0x34dc8c(0x11e)](_0x509cb5)[_0x34dc8c(0x15b)]();_0x509cb5[_0x34dc8c(0x130)](_0x34dc8c(0x144))&&(_0x44f458=_0x44f458[_0x34dc8c(0x12f)](/\.tpl$/,''));const _0x1c6889=[_0x34dc8c(0x12c),_0x34dc8c(0x134),_0x34dc8c(0x12d),_0x34dc8c(0x13b),_0x34dc8c(0x132),_0x34dc8c(0x14d),_0x34dc8c(0x14f),'.scss',_0x34dc8c(0x144)];if(_0x1c6889[_0x34dc8c(0x138)](_0x271073)||_0x509cb5[_0x34dc8c(0x130)](_0x34dc8c(0x144))){const _0x3c4a6d=await a308_0x5a8490[_0x34dc8c(0x11b)][_0x34dc8c(0x151)](_0x509cb5,_0x34dc8c(0x159)),_0x34db3f=this['replaceContent'](_0x3c4a6d,_0x3d122d,_0x45620a);await a308_0x5a8490[_0x34dc8c(0x11b)][_0x34dc8c(0x11a)](_0x44f458,_0x34db3f,_0x34dc8c(0x159));}else await a308_0x5a8490['promises']['copyFile'](_0x509cb5,_0x44f458);}}
@@ -1 +1 @@
1
- (function(_0x34a142,_0x30e5a4){const _0x44737f=a301_0x4ad3,_0x5ba575=_0x34a142();while(!![]){try{const _0x1fe8dc=-parseInt(_0x44737f(0x108))/0x1*(-parseInt(_0x44737f(0x102))/0x2)+parseInt(_0x44737f(0x106))/0x3+-parseInt(_0x44737f(0xf8))/0x4+parseInt(_0x44737f(0x104))/0x5*(parseInt(_0x44737f(0xff))/0x6)+parseInt(_0x44737f(0xf7))/0x7*(-parseInt(_0x44737f(0x103))/0x8)+parseInt(_0x44737f(0x107))/0x9*(-parseInt(_0x44737f(0x10e))/0xa)+parseInt(_0x44737f(0x10a))/0xb;if(_0x1fe8dc===_0x30e5a4)break;else _0x5ba575['push'](_0x5ba575['shift']());}catch(_0x387e1c){_0x5ba575['push'](_0x5ba575['shift']());}}}(a301_0x3769,0xc26cd));function a301_0x3769(){const _0x55b0b2=['55088VfjdqQ','2944872xenZWB','88285ZvywyH','yes','4226607cSHMNr','4515471EBgtbH','12rVtmfr','stableVersion','6286995kBXlQG','valid','lastNotifiedVersion','now','20nOxdUd','https://www.npmjs.com/package/','number','toLowerCase','\x20update','stringify','\x20available,\x20current\x20','true','checkedAt','/v/','object','rabetbase-cli','7kFGXjS','4739172RxXdIC','.cache','parse','gte',',\x20run:\x20','latest','lastNotifiedAt','354FFTrjL','trim','utf8'];a301_0x3769=function(){return _0x55b0b2;};return a301_0x3769();}import{mkdir,readFile,writeFile}from'node:fs/promises';import{homedir}from'node:os';import{dirname,join}from'node:path';import a301_0x16fe6b 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 _0x409c47=a301_0x4ad3,_0x287777=process.env.RABETBASE_NO_UPDATE_NOTICE?.[_0x409c47(0x100)]()[_0x409c47(0x111)]();return _0x287777==='1'||_0x287777===_0x409c47(0x115)||_0x287777===_0x409c47(0x105);}function cacheRoot(){const _0x5007a9=a301_0x4ad3;return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),_0x5007a9(0xf9));}export function getUpdateNoticeCachePath(){const _0x143b19=a301_0x4ad3;return join(cacheRoot(),_0x143b19(0xf6),'update-check.json');}async function readUpdateNoticeCache(){const _0x4e1403=a301_0x4ad3;try{const _0x5272b1=await readFile(getUpdateNoticeCachePath(),'utf8'),_0x2a5dfc=JSON[_0x4e1403(0xfa)](_0x5272b1);if(!_0x2a5dfc||typeof _0x2a5dfc!==_0x4e1403(0xf5))return{};return _0x2a5dfc;}catch{return{};}}async function writeUpdateNoticeCache(_0x19a05b){const _0x4c58d8=a301_0x4ad3;try{const _0x2d0c9c=getUpdateNoticeCachePath();await mkdir(dirname(_0x2d0c9c),{'recursive':!![]}),await writeFile(_0x2d0c9c,JSON[_0x4c58d8(0x113)](_0x19a05b,null,0x2)+'\x0a',_0x4c58d8(0x101));}catch{}}function a301_0x4ad3(_0x976b9f,_0x376d56){_0x976b9f=_0x976b9f-0xf4;const _0x37699f=a301_0x3769();let _0x4ad3ef=_0x37699f[_0x976b9f];return _0x4ad3ef;}function isFreshCheck(_0x1403a1,_0x2fbb2e){const _0x281428=a301_0x4ad3;return typeof _0x1403a1[_0x281428(0x116)]==='number'&&_0x2fbb2e-_0x1403a1['checkedAt']<UPDATE_CHECK_TTL_MS;}function isRecentlyNotified(_0x4b2dff,_0x55e293,_0x339853){const _0x2ef592=a301_0x4ad3;return _0x4b2dff[_0x2ef592(0x10c)]===_0x55e293&&typeof _0x4b2dff[_0x2ef592(0xfe)]===_0x2ef592(0x110)&&_0x339853-_0x4b2dff[_0x2ef592(0xfe)]<UPDATE_NOTICE_TTL_MS;}export function buildNpmVersionUrl(_0x4225da){const _0xe8758e=a301_0x4ad3;return _0xe8758e(0x10f)+NPM_PACKAGE_NAME+_0xe8758e(0xf4)+_0x4225da;}export async function resolveLatestUpdateNotice(){const _0x4e733f=a301_0x4ad3;if(isUpdateNoticeDisabled())return null;try{const _0xff8c4e=Date[_0x4e733f(0x10d)](),_0x41bc75=getCliVersion(),_0x19e520=await readUpdateNoticeCache();let _0x3ec436=isFreshCheck(_0x19e520,_0xff8c4e)?_0x19e520[_0x4e733f(0xfd)]?.['trim']():undefined;if(!_0x3ec436&&!isFreshCheck(_0x19e520,_0xff8c4e)){const _0x4bd55c=await getCliVersionPolicy();_0x3ec436=_0x4bd55c?.[_0x4e733f(0x109)]?.[_0x4e733f(0x100)]()||undefined,await writeUpdateNoticeCache({..._0x19e520,'checkedAt':_0xff8c4e,'latest':_0x3ec436,'failed':!_0x3ec436});}if(!_0x3ec436||!a301_0x16fe6b[_0x4e733f(0x10b)](_0x41bc75)||!a301_0x16fe6b['valid'](_0x3ec436))return null;if(a301_0x16fe6b[_0x4e733f(0xfb)](_0x41bc75,_0x3ec436))return null;if(isRecentlyNotified(_0x19e520,_0x3ec436,_0xff8c4e))return null;const _0x5ac8d3=CLI_BIN_NAME+_0x4e733f(0x112);return await writeUpdateNoticeCache({..._0x19e520,'checkedAt':isFreshCheck(_0x19e520,_0xff8c4e)?_0x19e520[_0x4e733f(0x116)]:_0xff8c4e,'latest':_0x3ec436,'failed':![],'lastNotifiedVersion':_0x3ec436,'lastNotifiedAt':_0xff8c4e}),{'command':_0x5ac8d3,'current':_0x41bc75,'latest':_0x3ec436,'url':buildNpmVersionUrl(_0x3ec436),'message':CLI_BIN_NAME+'\x20'+_0x3ec436+_0x4e733f(0x114)+_0x41bc75+_0x4e733f(0xfc)+_0x5ac8d3};}catch{return null;}}
1
+ (function(_0x30b9ee,_0xf0054d){const _0x32c363=a309_0x328f,_0x893c30=_0x30b9ee();while(!![]){try{const _0x403cae=-parseInt(_0x32c363(0x1be))/0x1*(parseInt(_0x32c363(0x1b5))/0x2)+-parseInt(_0x32c363(0x1b1))/0x3+parseInt(_0x32c363(0x1c2))/0x4+-parseInt(_0x32c363(0x1c1))/0x5+parseInt(_0x32c363(0x1c8))/0x6+-parseInt(_0x32c363(0x1ca))/0x7+parseInt(_0x32c363(0x1c9))/0x8;if(_0x403cae===_0xf0054d)break;else _0x893c30['push'](_0x893c30['shift']());}catch(_0x371991){_0x893c30['push'](_0x893c30['shift']());}}}(a309_0x3138,0x60f14));import{mkdir,readFile,writeFile}from'node:fs/promises';import{homedir}from'node:os';import{dirname,join}from'node:path';import a309_0xfe419d 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 _0x30730e=a309_0x328f,_0xc0c420=process.env.RABETBASE_NO_UPDATE_NOTICE?.[_0x30730e(0x1cb)]()[_0x30730e(0x1c5)]();return _0xc0c420==='1'||_0xc0c420===_0x30730e(0x1bb)||_0xc0c420==='yes';}function a309_0x3138(){const _0x1289c7=['valid','https://www.npmjs.com/package/','parse','number','lastNotifiedAt','true','\x20available,\x20current\x20','utf8','6085RNzIOG','gte','update-check.json','2330885ORStdl','571740lWvqaR','now','object','toLowerCase','lastNotifiedVersion','.cache','3684654sdYivf','14643216uyulOW','1461544SHutHH','trim','/v/','checkedAt','2300838ZEXYSS',',\x20run:\x20','rabetbase-cli','stableVersion','246zpnjvP'];a309_0x3138=function(){return _0x1289c7;};return a309_0x3138();}function cacheRoot(){const _0xfc33fc=a309_0x328f;return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),_0xfc33fc(0x1c7));}export function getUpdateNoticeCachePath(){const _0xf144a6=a309_0x328f;return join(cacheRoot(),_0xf144a6(0x1b3),_0xf144a6(0x1c0));}async function readUpdateNoticeCache(){const _0x3dd56d=a309_0x328f;try{const _0x2e2200=await readFile(getUpdateNoticeCachePath(),_0x3dd56d(0x1bd)),_0xc34bb5=JSON[_0x3dd56d(0x1b8)](_0x2e2200);if(!_0xc34bb5||typeof _0xc34bb5!==_0x3dd56d(0x1c4))return{};return _0xc34bb5;}catch{return{};}}function a309_0x328f(_0x1552d0,_0x52a87b){_0x1552d0=_0x1552d0-0x1b0;const _0x313881=a309_0x3138();let _0x328fcc=_0x313881[_0x1552d0];return _0x328fcc;}async function writeUpdateNoticeCache(_0x41c177){const _0x40eb1e=a309_0x328f;try{const _0x1b0545=getUpdateNoticeCachePath();await mkdir(dirname(_0x1b0545),{'recursive':!![]}),await writeFile(_0x1b0545,JSON['stringify'](_0x41c177,null,0x2)+'\x0a',_0x40eb1e(0x1bd));}catch{}}function isFreshCheck(_0x5ab496,_0x5369d1){const _0x381bf9=a309_0x328f;return typeof _0x5ab496[_0x381bf9(0x1b0)]==='number'&&_0x5369d1-_0x5ab496[_0x381bf9(0x1b0)]<UPDATE_CHECK_TTL_MS;}function isRecentlyNotified(_0x4a4c79,_0x5c6f7a,_0x4dfe4b){const _0xcb4979=a309_0x328f;return _0x4a4c79[_0xcb4979(0x1c6)]===_0x5c6f7a&&typeof _0x4a4c79[_0xcb4979(0x1ba)]===_0xcb4979(0x1b9)&&_0x4dfe4b-_0x4a4c79[_0xcb4979(0x1ba)]<UPDATE_NOTICE_TTL_MS;}export function buildNpmVersionUrl(_0x3afdb0){const _0x375473=a309_0x328f;return _0x375473(0x1b7)+NPM_PACKAGE_NAME+_0x375473(0x1cc)+_0x3afdb0;}export async function resolveLatestUpdateNotice(){const _0x18509e=a309_0x328f;if(isUpdateNoticeDisabled())return null;try{const _0x42081d=Date[_0x18509e(0x1c3)](),_0x3e2efd=getCliVersion(),_0x51d64e=await readUpdateNoticeCache();let _0x59ddf5=isFreshCheck(_0x51d64e,_0x42081d)?_0x51d64e['latest']?.[_0x18509e(0x1cb)]():undefined;if(!_0x59ddf5&&!isFreshCheck(_0x51d64e,_0x42081d)){const _0x3801bd=await getCliVersionPolicy();_0x59ddf5=_0x3801bd?.[_0x18509e(0x1b4)]?.[_0x18509e(0x1cb)]()||undefined,await writeUpdateNoticeCache({..._0x51d64e,'checkedAt':_0x42081d,'latest':_0x59ddf5,'failed':!_0x59ddf5});}if(!_0x59ddf5||!a309_0xfe419d[_0x18509e(0x1b6)](_0x3e2efd)||!a309_0xfe419d[_0x18509e(0x1b6)](_0x59ddf5))return null;if(a309_0xfe419d[_0x18509e(0x1bf)](_0x3e2efd,_0x59ddf5))return null;if(isRecentlyNotified(_0x51d64e,_0x59ddf5,_0x42081d))return null;const _0xafe86f=CLI_BIN_NAME+'\x20update';return await writeUpdateNoticeCache({..._0x51d64e,'checkedAt':isFreshCheck(_0x51d64e,_0x42081d)?_0x51d64e[_0x18509e(0x1b0)]:_0x42081d,'latest':_0x59ddf5,'failed':![],'lastNotifiedVersion':_0x59ddf5,'lastNotifiedAt':_0x42081d}),{'command':_0xafe86f,'current':_0x3e2efd,'latest':_0x59ddf5,'url':buildNpmVersionUrl(_0x59ddf5),'message':CLI_BIN_NAME+'\x20'+_0x59ddf5+_0x18509e(0x1bc)+_0x3e2efd+_0x18509e(0x1b2)+_0xafe86f};}catch{return null;}}
@@ -1 +1 @@
1
- function a302_0x4715(){var _0x147db0=['1737xtGeUx','60scRIRu','243012ayLCke','1737660REISJC','66DRvYbC','19211Iegkod','6800HdnbCy','682000iLRPdF','11124660xJPzTY','1608296NrwDXK'];a302_0x4715=function(){return _0x147db0;};return a302_0x4715();}(function(_0x2a266b,_0x314ff3){var _0x58fea6=a302_0x2c54,_0x3174f2=_0x2a266b();while(!![]){try{var _0x50cee4=parseInt(_0x58fea6(0x1db))/0x1*(parseInt(_0x58fea6(0x1e4))/0x2)+parseInt(_0x58fea6(0x1e3))/0x3+-parseInt(_0x58fea6(0x1df))/0x4+parseInt(_0x58fea6(0x1dd))/0x5+parseInt(_0x58fea6(0x1e1))/0x6*(parseInt(_0x58fea6(0x1e2))/0x7)+parseInt(_0x58fea6(0x1dc))/0x8*(parseInt(_0x58fea6(0x1e0))/0x9)+-parseInt(_0x58fea6(0x1de))/0xa;if(_0x50cee4===_0x314ff3)break;else _0x3174f2['push'](_0x3174f2['shift']());}catch(_0x1c5311){_0x3174f2['push'](_0x3174f2['shift']());}}}(a302_0x4715,0x5488d));import{VERSION}from'../generated/build-info.js';function a302_0x2c54(_0x487d3f,_0x3f2650){_0x487d3f=_0x487d3f-0x1db;var _0x4715d9=a302_0x4715();var _0x2c54d5=_0x4715d9[_0x487d3f];return _0x2c54d5;}export function getCliVersion(){return VERSION;}
1
+ function a310_0x5352(_0x533dd7,_0x1b8ec5){_0x533dd7=_0x533dd7-0x64;var _0x3d28b3=a310_0x3d28();var _0x535225=_0x3d28b3[_0x533dd7];return _0x535225;}function a310_0x3d28(){var _0x3b601c=['432184cGUDxB','111185dnhwzY','547598AlTPiD','1355920hlLviD','22092xKwlCz','11576cTorRn','400416NPRDHe','105zLToek'];a310_0x3d28=function(){return _0x3b601c;};return a310_0x3d28();}(function(_0x1af175,_0x4b5f92){var _0x34ce39=a310_0x5352,_0x33ed70=_0x1af175();while(!![]){try{var _0x37e6b9=-parseInt(_0x34ce39(0x69))/0x1+parseInt(_0x34ce39(0x66))/0x2+-parseInt(_0x34ce39(0x6a))/0x3+parseInt(_0x34ce39(0x64))/0x4+parseInt(_0x34ce39(0x65))/0x5+parseInt(_0x34ce39(0x68))/0x6*(parseInt(_0x34ce39(0x6b))/0x7)+-parseInt(_0x34ce39(0x67))/0x8;if(_0x37e6b9===_0x4b5f92)break;else _0x33ed70['push'](_0x33ed70['shift']());}catch(_0x5368d9){_0x33ed70['push'](_0x33ed70['shift']());}}}(a310_0x3d28,0x23586));import{VERSION}from'../generated/build-info.js';export function getCliVersion(){return VERSION;}
@@ -1 +1 @@
1
- (function(_0x4ce576,_0x559649){var _0x3e7069=a303_0x3f95,_0x100e6b=_0x4ce576();while(!![]){try{var _0x9d4d3f=parseInt(_0x3e7069(0xfc))/0x1*(parseInt(_0x3e7069(0x100))/0x2)+-parseInt(_0x3e7069(0xff))/0x3*(parseInt(_0x3e7069(0xf7))/0x4)+parseInt(_0x3e7069(0xf9))/0x5+-parseInt(_0x3e7069(0xf6))/0x6+-parseInt(_0x3e7069(0xfd))/0x7+-parseInt(_0x3e7069(0xfe))/0x8*(-parseInt(_0x3e7069(0xfb))/0x9)+-parseInt(_0x3e7069(0xfa))/0xa*(-parseInt(_0x3e7069(0xf8))/0xb);if(_0x9d4d3f===_0x559649)break;else _0x100e6b['push'](_0x100e6b['shift']());}catch(_0x2cce40){_0x100e6b['push'](_0x100e6b['shift']());}}}(a303_0x1335,0x3e8bb));import{setActiveCookie,clearActiveCookie}from'../core/api-client.js';function a303_0x3f95(_0x4cbfd9,_0x3ed294){_0x4cbfd9=_0x4cbfd9-0xf6;var _0x13357a=a303_0x1335();var _0x3f955f=_0x13357a[_0x4cbfd9];return _0x3f955f;}export async function withActiveCookie(_0x1eb428,_0x2453bc){setActiveCookie(_0x1eb428);try{return await _0x2453bc();}finally{clearActiveCookie();}}function a303_0x1335(){var _0x5be8ec=['88TqlZxl','589071BLeSnW','2VEGqUZ','2810250rohELS','4JpAqai','51425faPdkT','634150mKiiZe','700CeZmzU','334611jkZDaU','200172NaEjft','996114PFKlco'];a303_0x1335=function(){return _0x5be8ec;};return a303_0x1335();}
1
+ function a311_0x4c17(_0xaf2806,_0x100baf){_0xaf2806=_0xaf2806-0xd5;var _0x14c33f=a311_0x14c3();var _0x4c17df=_0x14c33f[_0xaf2806];return _0x4c17df;}(function(_0x114cdb,_0x2c5ad8){var _0x52be75=a311_0x4c17,_0x59eacb=_0x114cdb();while(!![]){try{var _0x193750=-parseInt(_0x52be75(0xd8))/0x1*(parseInt(_0x52be75(0xdd))/0x2)+-parseInt(_0x52be75(0xdb))/0x3+-parseInt(_0x52be75(0xda))/0x4+-parseInt(_0x52be75(0xd6))/0x5+parseInt(_0x52be75(0xd5))/0x6+-parseInt(_0x52be75(0xd9))/0x7*(parseInt(_0x52be75(0xdc))/0x8)+parseInt(_0x52be75(0xd7))/0x9;if(_0x193750===_0x2c5ad8)break;else _0x59eacb['push'](_0x59eacb['shift']());}catch(_0x2d4e22){_0x59eacb['push'](_0x59eacb['shift']());}}}(a311_0x14c3,0xd6b8b));import{setActiveCookie,clearActiveCookie}from'../core/api-client.js';function a311_0x14c3(){var _0x3d64af=['44621730IJHCYl','55773vUwCzZ','14TyIkPJ','2248412UEKyMi','4019691OSvpbx','4374128kHjtAF','40rLNqYm','1969014QUpyPv','1478240ncexOW'];a311_0x14c3=function(){return _0x3d64af;};return a311_0x14c3();}export async function withActiveCookie(_0x426b1a,_0x5f4e81){setActiveCookie(_0x426b1a);try{return await _0x5f4e81();}finally{clearActiveCookie();}}
@@ -1 +1 @@
1
- function a304_0x2c45(){var _0x415809=['1559460lopVYE','write','28547037smPKYQ','3jPPvUN','3659250JeJTzQ','1329518vvSoeZ','2789058DzDiYK','30njAKyu','10qwWcPu','1763076IhHamH','11983488CQQOtk'];a304_0x2c45=function(){return _0x415809;};return a304_0x2c45();}function a304_0x5cf1(_0x89a5cf,_0x3668f9){_0x89a5cf=_0x89a5cf-0x154;var _0x2c457f=a304_0x2c45();var _0x5cf185=_0x2c457f[_0x89a5cf];return _0x5cf185;}(function(_0x105c99,_0x4e769e){var _0x3a0f65=a304_0x5cf1,_0x54d72c=_0x105c99();while(!![]){try{var _0x2ef6ee=parseInt(_0x3a0f65(0x15e))/0x1+-parseInt(_0x3a0f65(0x154))/0x2*(-parseInt(_0x3a0f65(0x15c))/0x3)+-parseInt(_0x3a0f65(0x157))/0x4+-parseInt(_0x3a0f65(0x15d))/0x5+parseInt(_0x3a0f65(0x155))/0x6*(parseInt(_0x3a0f65(0x159))/0x7)+parseInt(_0x3a0f65(0x158))/0x8+-parseInt(_0x3a0f65(0x15b))/0x9*(parseInt(_0x3a0f65(0x156))/0xa);if(_0x2ef6ee===_0x4e769e)break;else _0x54d72c['push'](_0x54d72c['shift']());}catch(_0x33f8ab){_0x54d72c['push'](_0x54d72c['shift']());}}}(a304_0x2c45,0xf208b));export function writeCliSideChannelLine(_0x4012f4){var _0x529933=a304_0x5cf1;process['stderr'][_0x529933(0x15a)](_0x4012f4+'\x0a');}
1
+ (function(_0x5a4058,_0x1c2d20){var _0x3f9ab0=a312_0x4d6a,_0x5737a1=_0x5a4058();while(!![]){try{var _0x3cc25=-parseInt(_0x3f9ab0(0x1db))/0x1+parseInt(_0x3f9ab0(0x1df))/0x2+parseInt(_0x3f9ab0(0x1de))/0x3*(parseInt(_0x3f9ab0(0x1e6))/0x4)+parseInt(_0x3f9ab0(0x1e4))/0x5*(-parseInt(_0x3f9ab0(0x1e2))/0x6)+parseInt(_0x3f9ab0(0x1e3))/0x7*(parseInt(_0x3f9ab0(0x1dc))/0x8)+-parseInt(_0x3f9ab0(0x1dd))/0x9*(-parseInt(_0x3f9ab0(0x1e5))/0xa)+-parseInt(_0x3f9ab0(0x1e7))/0xb;if(_0x3cc25===_0x1c2d20)break;else _0x5737a1['push'](_0x5737a1['shift']());}catch(_0x27f7df){_0x5737a1['push'](_0x5737a1['shift']());}}}(a312_0x56c8,0xc1966));function a312_0x56c8(){var _0x136e32=['2430254LSXsOZ','stderr','write','18QOhocw','3919951nkFcpo','723940pwQVKy','121170DoIobZ','3017644hAMtXX','13322573ELPYLD','857072omFNzv','16lLSjlW','153pGiQgp','3nRHIuO'];a312_0x56c8=function(){return _0x136e32;};return a312_0x56c8();}function a312_0x4d6a(_0x43f18c,_0x9d81b7){_0x43f18c=_0x43f18c-0x1db;var _0x56c81f=a312_0x56c8();var _0x4d6adb=_0x56c81f[_0x43f18c];return _0x4d6adb;}export function writeCliSideChannelLine(_0x53138b){var _0x800230=a312_0x4d6a;process[_0x800230(0x1e0)][_0x800230(0x1e1)](_0x53138b+'\x0a');}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lovrabet/rabetbase-cli",
3
- "version": "2.5.1-beta.4",
3
+ "version": "2.5.1-beta.6",
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": [
@@ -46,6 +46,7 @@
46
46
  "sync:cdn": "node scripts/sync-cdn-assets.js",
47
47
  "verify:bundled-jq": "node scripts/verify-bundled-jq.mjs",
48
48
  "regression:release-smoke": "node scripts/regression-release-smoke.mjs",
49
+ "release:summary:prepare": "node scripts/release-summary-preparation.mjs",
49
50
  "deploy:verify": "node scripts/deploy-verify.mjs",
50
51
  "pack:dry-run-summary": "node scripts/package-dry-run-summary.mjs",
51
52
  "verify:release-package": "node scripts/verify-release-package.mjs",
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: rabetbase
3
- version: 2.5.1-beta.4
4
- description: "Lovrabet 开发工作流 CLI — 通过 rabetbase 命令管理数据集、数据库连接(dblink)、局部部署研发元数据同步、数据列表页(Data List Page)、自定义页面(Custom Page)、SQL 查询、Backend Function 脚本、通知配置、企业知识库、菜单事实读取与同步、开发角色与协作者、应用文件、面向票证类业务材料文字与结构化字段提取的 OCR、代码生成,以及平台问题上报。触发词:数据集、数据表、dataset relation-audit、dataset delete、dataset restore、dataset user-deleted-field-list、dataset field-restore、用户删除字段、恢复数据集字段、废弃数据集、恢复数据集、dataset rename、dataset field-update、dataset extend-update、dataset business-groups、dataset business-group-update、businessGroup、字段对象更新、doType、options、数据列表页、Data List Page、自定义页面、Custom Page、page create、page custom-list、page custom-detail、page custom-update、page custom-publish、page generate-start、page generate-status、page relation-audit、page sync、page pull、page push、page restore、恢复已删除页面、dblink、数据库连接、schema 分析、db list、db detail、db create、db update、db delete、db test、db tables、db diff、db diff-refresh-start、db diff-refresh-status、db analyze-batch-plan、db analyze-start、analyze-cancel、analyze-status、traceId、deployment sync、局部部署、研发元数据同步、target-env、direct、自定义 SQL、sql.execute、bff.execute、BF 消息通知、Backend Function 消息通知、notification config-list、EMAIL configCode、通知配置、notification.send、企业知识库、公司知识、公共知识、kb search、get_dataset_detail、validate_sql_content、save_or_update_custom_sql、@lovrabet/sdk、lovrabet 开发、rabetbase、filter、codegen、init、appcode、app list、app members-list、tenant members-list、应用人员列表、租户人员列表、workspace、workspace init、workspace use、workspace add、workspace remove、多应用、默认应用、menu list、menu visibility-update、菜单显示、菜单隐藏、visible、menu external-link-create、menu external-link-update、menu rename、菜单改名、外链菜单创建、外链 URL 更新、菜单异常审计、菜单手动删除清单、menu sync、menu asset-update、菜单资源更新、menu move、菜单移动、开发角色、开发协作者、role、role list、role user-add、role user-remove、user-resolve、加入开发者、ADMIN、DEV、OWNER、CUSTOM、project create、project upgrade、schema、jq、compress、file upload、file query-url、ocr recognize、文件上传、OCR 识别、票证文字提取、票证字段提取、发票识别、票据识别、证照识别、长期链接、issue report、平台问题、platform issue、问题上报、user-account dingding-sandbox-bind、钉钉沙箱账号绑定。"
3
+ version: 2.5.1-beta.6
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"]
@@ -12,15 +12,15 @@ metadata:
12
12
  # Rabetbase CLI
13
13
 
14
14
  > **前置条件:** 使用任何 API 命令前,需完成认证和配置(见下方)。
15
- > **执行前必做:** 执行任何命令前,必须先阅读对应命令的 reference 文档,再调用命令。
15
+ > **资料使用:** 先从意图索引定位能力,只读取当前任务直接相关的 reference。写操作、覆盖/恢复、复杂输出解析或命令契约不明确时,执行前读取对应 reference;简单只读操作可依据已确认的 CLI schema 直接完成。
16
16
  > **命名约定:** 统一使用 `rabetbase <service> <command> [flags]` 格式。
17
17
  > **输出格式:** AI Agent 需要结构化输出时,**优先 `--format compress`**(与 `json` 相同信封,单行紧凑、省 token);需要人类可读缩进时用 **`--format json`**。可在 **`json` / `compress`** 上叠加 **`--jq '<expr>'`**(对最终打印的整条 JSON 做 jq;二进制查找顺序为 **`JQ_PATH` → CLI 内置 sidecar jq → `PATH` 上的 jq**,通常无需单独安装系统 jq)。不确定当前 CLI 有哪些子命令或 flags 时,先跑 **`rabetbase schema`**(与 `--help` 同源的机器可读契约,无需登录)。
18
18
 
19
19
  ## 前置条件
20
20
 
21
- 1. **连接配置与认证分离**:首次使用先执行 `rabetbase config init`。交互模式选择 `Mainland China (cn)` 或 `Indonesia (id)`;非交互模式显式传 `--region cn|id`,未传时默认 `cn`。尚未发布的 `global` 不出现在新配置入口中。企业独立部署使用 `--domain-config <file>` 或对应 `--*-domain` flags;自定义 HTTPS 本地回调时同时提供 Local 与 Certificate Domain。当前所有已开放节点和独立部署统一使用中国大陆 CDN 配置,Lovrabet 服务 Domain 仍分别解析。`config init` 固定重建全局节点/Domain 配置,保留 Cookie、AccessKey、format、locale 和应用绑定,但不登录、不绑定项目;随后再执行 `rabetbase auth login`
21
+ 1. **连接配置与认证分离**:首次使用先执行 `rabetbase config init`。交互模式选择当前已开放国家/地区;非交互模式显式传 `--region`,未传时使用默认节点。企业独立部署优先导入 `lovrabet-routing/v1` 清单,也兼容旧扁平 Domain 文件和对应 `--*-domain` flags。`config init` 默认重建当前项目节点/Domain 配置,显式 `--global` 时写全局;保留 Cookie、AccessKey、format、locale 和应用绑定,但不登录、不绑定项目,随后再执行 `rabetbase auth login`
22
22
  2. **AppCode**:确保 `.rabetbase.json` 中设置了 `apps`(单应用自动选中;多应用再配 `defaultApp`),或兼容读取的顶层 `appcode`,或通过 `--appcode <code>` / `--app <name>` 传入。旧 `.lovrabet.json` 不会自动读取
23
- 3. **配置文件**:`rabetbase config init` 固定写全局 `~/.rabetbase.json`,不接受项目作用域;默认 `cn` 不落冗余 `region`。官方节点模式清理显式和遗留 Domain,独立部署模式清理旧 `region`/Domain 后写入所提供的覆盖值。完整字段说明见 [`.rabetbase.json` 配置参考](references/rabetbase-config.md)。当前目录应用绑定使用下方 `workspace init`,二者不要混用
23
+ 3. **配置文件**:`rabetbase config init` 默认写当前项目 `.rabetbase.json`,显式 `--global` 时写 `~/.rabetbase.json`;默认节点不落冗余 `region`。官方节点模式清理显式和遗留 Domain,独立部署模式清理旧 `region`/Domain 后写入路由配置。完整字段说明见 [`.rabetbase.json` 配置参考](references/rabetbase-config.md)。当前目录应用绑定使用下方 `workspace init`
24
24
  4. **工作目录应用绑定**:当前目录要固定使用某个应用时,使用 `rabetbase workspace init --appcode <code>` 或 `rabetbase workspace use --app <name>`(选型见「app vs workspace 职责边界」)
25
25
  5. **多应用场景**:一个项目有多个应用时,先 `rabetbase workspace add <name> --appcode …` 登记各应用,再用 `--app <name>` 临时切换,或 `workspace use --app <name>` 修改当前工作目录默认应用
26
26
  6. **平台发现**:当你不知道当前登录账号能访问哪些应用时,先 `rabetbase app list --remote`;它查询平台目录,不修改本地配置
@@ -60,7 +60,7 @@ metadata:
60
60
  - 全部批次结束后再次执行异步差异刷新并重新获取完整差异;仍未收敛时,按 [`database-connection-workflow.md`](guides/database-connection-workflow.md) 对剩余 `toAnalyzeTables` 逐表串行重试且每表只恢复一次。仅当用户明确要求跳过分析/刷新时直接读取现有差异。状态查询失败继续使用原 `planId`,不得重复启动任务
61
61
  - 输出很大且只需子集时,在 `compress`/`json` 上加 `--jq '.data…'` 缩小结果
62
62
  - 需要真实业务行数据时必须交接给 `lovrabet data filter/getOne`;`lovrabet` 不可用时报告阻断并提示安装 Skill 与 CLI,不要静默安装或修复,也不要用 `rabetbase sql exec` 当行数据替代,见 [`guides/data-api-guidelines.md`](guides/data-api-guidelines.md)
63
- - 需要 `src/api/api.ts` / `client.ts` 时:先 `rabetbase api pull --format compress` 取 `data.models`、`data.files`、`data.needsAgentMerge`,再按 [`sdk-client-generation.md`](guides/sdk-client-generation.md) 更新 TypeScript。`api pull` **不会覆盖已有** `api.ts`/`client.ts`
63
+ - 需要 `src/api/api.ts` / `client.ts` 时:先 `rabetbase api pull --format compress` 取 `data.models`、`data.files`、`data.needsAgentMerge`,再按 [`sdk-client-generation.md`](guides/sdk-client-generation.md) 更新 TypeScript。`api pull` 默认**不会覆盖已有** `api.ts`/`client.ts`;只有用户明确要求放弃本地定制并完整重建时才使用 `--force --yes`
64
64
  3. **SQL 工作流严格分步**
65
65
  - 推荐路径:查现有(`sql list/detail`) 或新建(`sql create`) → 拉/落本地(`sql pull` / `sql create`) → 编辑同步目录文件 → 可选校验(`sql validate`) → 检查状态(`sql status`) → 先预览(`sql push --dry-run` / `sql delete --dry-run`) → 再 `sql push` / `sql delete` → `sql detail` / `sql exec` 验证
66
66
  - 先使用 `sql list/detail` 查找可复用的 Custom SQL;没有满足需求的资源时,按照 [`sql-creation-workflow.md`](guides/sql-creation-workflow.md) 与 [`sql-mybatis.md`](guides/sql-mybatis.md) 创建、校验、发布并验证
@@ -156,10 +156,10 @@ metadata:
156
156
 
157
157
  ## 配置作用域原则(`--global`)
158
158
 
159
- - **普通写操作默认当前项目**(`workspace add`、`config set`、`project create` 等),除非用户**显式**传 `--global`;`config init` 是首次连接配置入口,固定写全局配置。
159
+ - **写操作默认当前项目**(包括 `config init`、`workspace add`、`config set`、`project create` 等),除非用户**显式**传 `--global`。
160
160
  - **不要**在用户未要求时给命令加 `--global`** — 默认行为已是「项目优先」;只有用户明确要改全局配置或不在项目内且意图写全局时才使用。
161
161
  - **`config set`**:在**没有**项目配置文件(当前目录未解析到 `.rabetbase.json`)且**未**传 `--global` 时,CLI **拒绝执行**并提示使用 `--global` 或先 `rabetbase workspace init --appcode <code>`,**不会**静默写入全局。
162
- - **`project create`** 生成的新项目 `.rabetbase.json` **只继承**少量全局偏好(如 `cookie` / `locale` / `format` / `riskLevel` 等),**不会**把全局 `apps` / `defaultApp` 带入新项目文件;同时生成浏览器安全的 `src/api/sdk-config.ts` 与 `rabetbase.routing.json`。中国大陆、ID、Global 的 Lovrabet 服务 Domain、本地地址和证书由统一 Routing Profile 解析;当前共享资源统一使用中国大陆 CDN 配置,独立部署写客户最终服务 Domain。两个生成文件都不下发认证配置,后续 `api pull` 会刷新。
162
+ - **`project create`** 生成的新项目 `.rabetbase.json` **只继承**少量全局偏好(如 `cookie` / `locale` / `format` / `riskLevel` 等),**不会**把全局 `apps` / `defaultApp` 带入新项目文件;同时生成浏览器安全的 `src/api/sdk-config.ts` 与 `rabetbase.domain-routing.json`。每个官方节点直接声明自己的第三方库 CDN 与 Lovrabet 自有资源 Domain;项目文件始终包含解析后的完整地址,企业独立部署从共用清单读取显式 CDN。两个生成文件都不下发认证配置;Domain 配置变化后用 `project domain-routing-sync` 刷新项目快照,`api pull` 只刷新 SDK/API 文件。
163
163
  - **`api pull` / `api list`**:默认仅针对**项目** `apps`;需要合并全局已登记应用时加 `--global`(见各命令 reference)。
164
164
  - **`app list`**:默认展示**合并**后的全量;`--global` 仅全局、`--project` 仅项目(见 [`rabetbase app list`](references/rabetbase-app-list.md))。
165
165
 
@@ -297,7 +297,8 @@ const result = await client.bff.execute<DashboardData>({
297
297
  | 意图 | 推荐命令 | 备注 |
298
298
  |------|---------|------|
299
299
  | 初始化连接配置 | [`rabetbase config init`](references/rabetbase-init.md) | 选择官方节点或导入独立部署 Domain |
300
- | 创建新项目 | [`rabetbase project create`](references/rabetbase-project-create.md) | 支持 `--name` + `--appcode` 非交互 |
300
+ | 创建新项目 | [`rabetbase project create`](references/rabetbase-project-create.md) | 支持新目录或当前空目录创建;完成口径与安全边界见 reference |
301
+ | 刷新项目公开 Domain 路由 | [`rabetbase project domain-routing-sync`](references/rabetbase-project-domain-routing-sync.md) | 根据当前有效配置原子生成项目级 `rabetbase.domain-routing.json`;与前端页面路由无关 |
301
302
  | 从 lovrabet-cli 迁移 | [`rabetbase project upgrade`](references/rabetbase-project-upgrade.md) | 6 步自动迁移,`--yes` 跳过确认 |
302
303
  | 老项目翻新蓝图 / Legacy Application Blueprint | [`guides/legacy-application-blueprint-workflow.md`](guides/legacy-application-blueprint-workflow.md) | 先输出 `.rabetbase/blueprint/<appCode>/application-blueprint.md`,把老代码逻辑与 Dataset / Relations 绑定后再生成迁移 Backlog |
303
304
  | 运行 package.json 脚本 | [`rabetbase run <script>`](references/rabetbase-run.md) | `write`;先审阅脚本命令体,嵌入式工具暂不开放 |
@@ -316,6 +317,7 @@ const result = await client.bff.execute<DashboardData>({
316
317
  | 列出配置 | [`rabetbase config list`](references/rabetbase-config.md) | 查看当前生效的配置 |
317
318
  | 管理运行态 app-config | [`rabetbase app-config list/get/set/delete`](references/rabetbase-app-config.md) | 运行态 app-config 管理面;默认不输出明文 value;`set` 为 `write`,`delete` 保持 `high-risk-write` |
318
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
+ | 管理当前研发应用的 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 |
319
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` |
320
322
  | 查看线上菜单事实 / 菜单异常审计 | [`rabetbase menu list`](references/rabetbase-menu-list.md) | 返回 DFS 事实、children/page、URL、最近更新人/时间和 snapshotHash;异常治理先读 [`menu-anomaly-manual-cleanup`](guides/menu-anomaly-manual-cleanup.md) |
321
323
  | 批量显示或隐藏菜单 | [`rabetbase menu visibility-update`](references/rabetbase-menu-visibility-update.md) | 用精确 ID/path 选择目标;先 dry-run,使用 `--expect-visible` / `--expected-count` 防漂移,正式执行必须 `--yes` |
@@ -367,7 +369,7 @@ const result = await client.bff.execute<DashboardData>({
367
369
  | 恢复已删除页面 | [`rabetbase page restore --id <pageId>`](references/rabetbase-page-restore.md) | 支持 `DATA_LIST|CUSTOM` 自动识别;跨类型同 ID 时显式传 `--page-type` |
368
370
  | 数据库连接(dblink)/ 测连 / 结构分析 | [`rabetbase db list`](references/rabetbase-db-list.md) 起 | **`id`**、**trace/plan id** 与“终态 + 复跑 diff”完成口径见 [database-connection-workflow.md](guides/database-connection-workflow.md);各子命令见 `references/rabetbase-db-*.md` |
369
371
  | 独立部署局部同步研发元数据 | [`rabetbase deployment sync`](references/rabetbase-deployment-sync.md) | 显式命令为 `write`;服务端仅允许应用 Admin 操作并原子检查 appCode 开关,未开启时正常 no-op;非生产 BFF/SQL 可配置 push 后置同步;生产、直连、Dataset 保持显式确认;失败或结果不确定时不自动重试 |
370
- | 生成 / 更新 API 客户端代码 | [`rabetbase api pull`](references/rabetbase-api-pull.md) → [`sdk-client-generation.md`](guides/sdk-client-generation.md) | `api pull` 拉 Dataset 事实并刷新 `sdk-config.ts` 与 `rabetbase.routing.json`;已有 `api.ts`/`client.ts` 按 guide 合并更新 |
372
+ | 生成 / 更新 API 客户端代码 | [`rabetbase api pull`](references/rabetbase-api-pull.md) → [`sdk-client-generation.md`](guides/sdk-client-generation.md) | `api pull` 拉 Dataset 事实并刷新 `sdk-config.ts`;已有 `api.ts`/`client.ts` 按 guide 合并更新 |
371
373
  | 查看生成的 API 模型 | [`rabetbase api list`](references/rabetbase-api-list.md) | 列出已生成的数据模型 |
372
374
  | 查看现有 SQL | [`rabetbase sql list --name "xxx"`](references/rabetbase-sql-list.md) | 分页,按名称过滤;默认查当前决议到的单个应用 |
373
375
  | 查看 SQL 详情 | [`rabetbase sql detail --sqlcode xxx`](references/rabetbase-sql-detail.md) | 含完整 SQL 内容和参数定义 |
@@ -392,7 +394,7 @@ const result = await client.bff.execute<DashboardData>({
392
394
  | 查询应用人员及角色归属 | [`rabetbase app members-list --appcode <code>`](references/rabetbase-app-members-list.md) | 全量只读;按 userId 去重,角色归属聚合到 `roles[]` |
393
395
  | 查询租户人员 | [`rabetbase tenant members-list --tenant-code <code>`](references/rabetbase-tenant-members-list.md) | 全量只读;租户必须属于当前账号 |
394
396
  | 查看 app 服务帮助 | `rabetbase app` | 只显示 `app` 子命令帮助,不等价于 `app list` |
395
- | 绑定当前目录到应用 | [`rabetbase workspace init --appcode <code>`](references/rabetbase-workspace.md) | 首次绑定;单应用自动选中且不写 `defaultApp`;与 `config init`(全局引导)不同 |
397
+ | 绑定当前目录到应用 | [`rabetbase workspace init --appcode <code>`](references/rabetbase-workspace.md) | 首次绑定;单应用自动选中且不写 `defaultApp`;与只处理国家/地区及 Domain 的 `config init` 不同 |
396
398
  | 切换当前工作目录默认应用 | [`rabetbase workspace use --app <name>`](references/rabetbase-workspace.md) | 持久修改当前目录 defaultApp |
397
399
  | 登记应用 | [`rabetbase workspace add <name> --appcode <code>`](references/rabetbase-workspace.md) | 单应用不写 default;增加第二个应用时保留原应用为默认;`--global` 写全局 |
398
400
  | 移除应用 | [`rabetbase workspace remove <name>`](references/rabetbase-workspace.md) | 只移除本地 profile,移除后自动切换 default |
@@ -406,7 +408,7 @@ const result = await client.bff.execute<DashboardData>({
406
408
  | 命令分组 | 说明 |
407
409
  |----------|------|
408
410
  | Quick Start | [`init`](references/rabetbase-init.md) |
409
- | Project | [`create`](references/rabetbase-project-create.md) / [`upgrade`](references/rabetbase-project-upgrade.md) |
411
+ | Project | [`create`](references/rabetbase-project-create.md) / [`domain-routing-sync`](references/rabetbase-project-domain-routing-sync.md) / [`upgrade`](references/rabetbase-project-upgrade.md) |
410
412
  | Workspace | [`workspace init` / `workspace use` / `workspace add` / `workspace remove`](references/rabetbase-workspace.md) |
411
413
  | Run Scripts | [`run`](references/rabetbase-run.md) |
412
414
  | Authentication | [`auth login`](references/rabetbase-auth-login.md) / [`auth logout`](references/rabetbase-auth-logout.md) |
@@ -419,6 +421,7 @@ const result = await client.bff.execute<DashboardData>({
419
421
  | Configuration | [`config set/get/list/delete`](references/rabetbase-config.md) |
420
422
  | Runtime App Config Management | [`app-config list/get/set/delete`](references/rabetbase-app-config.md) |
421
423
  | Company Knowledge Base | [`kb list/detail/search/create/update/delete`](references/rabetbase-kb.md) |
424
+ | Agent Context Rules | [`rule list/get/set`](references/rabetbase-rule.md) |
422
425
  | Menu | [`list`](references/rabetbase-menu-list.md) / [`external-link-create`](references/rabetbase-menu-external-link-create.md) / [`external-link-update`](references/rabetbase-menu-external-link-update.md) / [`rename`](references/rabetbase-menu-rename.md) / [`sync`](references/rabetbase-menu-sync.md) / [`asset-update`](references/rabetbase-menu-asset-update.md) / [`delete`](references/rabetbase-menu-delete.md) / [`group-create`](references/rabetbase-menu-group-create.md) / [`group-update`](references/rabetbase-menu-group-update.md) / [`move`](references/rabetbase-menu-move.md) / [`regroup-start`](references/rabetbase-menu-regroup-start.md) |
423
426
  | Async Tasks | [`task status`](references/rabetbase-task-status.md) |
424
427
  | Notification Configuration | [`notification config-list`](references/rabetbase-notification-config-list.md) / [`notification config-create`](references/rabetbase-notification-config-mutations.md) / [`notification config-update`](references/rabetbase-notification-config-mutations.md) / [`notification config-delete`](references/rabetbase-notification-config-mutations.md) |
@@ -2,7 +2,7 @@
2
2
 
3
3
  > 目标:根据 `rabetbase api pull` 返回的数据集事实,生成或更新浏览器子应用的 `src/api/api.ts` 与 `src/api/client.ts`,并保留项目已有的自定义写法。
4
4
  >
5
- > CLI 不再每次覆盖 TypeScript。`api pull` 只保证:刷新 `sdk-config.ts`、返回 `data.models`,并在文件缺失时写入 Cookie-first 脚手架。已有文件由本指南更新。
5
+ > CLI 默认不覆盖 TypeScript。`api pull` 只保证:刷新 `sdk-config.ts`、返回 `data.models`,并在文件缺失时写入 Cookie-first 脚手架。已有文件由本指南更新;只有用户明确要求放弃本地定制并完整重建时,才使用 `--force --yes`。
6
6
 
7
7
  ## 何时执行
8
8
 
@@ -19,21 +19,24 @@
19
19
 
20
20
  ```
21
21
  rabetbase api pull --format compress
22
- → 读 data.models / data.configName / data.isDefaultConfig / data.files / data.needsAgentMerge
22
+ → 单应用读 data;项目应用清单逐项读 data.apps[]
23
+ → 读取每项的 models / configName / isDefaultConfig / files / needsAgentMerge
23
24
  → 读已有 api.ts、client.ts、sdk-config.ts(含 {prefix}-api.ts / {prefix}-client.ts)
24
25
  → 按事实更新 models,保留本地 extras
25
26
  → 不要改已经正确的 createClient({ apiConfigName, ...LOVRABET_SDK_CONFIG })
26
27
  ```
27
28
 
28
29
  1. 执行 `rabetbase api pull --format compress`(需要人类可读缩进时用 `--format json`)。
29
- 2. 使用返回的 `data.models`,不要手写或猜测 `datasetCode`。也可用 `rabetbase api list --format compress` 核对目录,但写文件以 pull 的 `data.models` 为准。
30
+ - 不要自动添加 `--force`。
31
+ - 只有用户明确要求丢弃本地 `api.ts` / `client.ts` 定制并完整重建时,才执行 `rabetbase api pull --force --yes --format compress`;此时根据返回的 `files.*.action` 回查是否为 `overwritten`。
32
+ 2. 直接单应用结果使用 `data.models`;项目应用清单结果逐项使用 `data.apps[].models`。不要手写或猜测 `datasetCode`。也可用 `rabetbase api list --format compress` 核对目录,但写文件以 pull 返回的 models 为准。
30
33
  3. 先读现有文件再写:
31
34
  - 默认单应用:`src/api/api.ts`、`src/api/client.ts`、`src/api/sdk-config.ts`
32
35
  - 多应用非 default:`{name}-api.ts` / `{name}-client.ts`(`data.files.api.path` / `data.files.client.path`)
33
36
  4. `sdk-config.ts` 由 CLI 维护(`data.files.sdkConfig.action === "refreshed"`),不要往里面写 `cookie` / `accessKey` / `token`。
34
37
  5. 看 `data.needsAgentMerge` 和 `data.files.*.action`,**不要**用已删除的 `wroteScaffold`:
35
38
  - `needsAgentMerge === false` 且 `api`/`client` 均为 `created` 或 `overwritten`:脚手架已按当前 `models` 写好,只需检查项目 extras。
36
- - `needsAgentMerge === true`:至少有一个 TypeScript 文件被 **preserved**。即使 `client` 刚 `created`,过期的 `api.ts` 仍要按下方规则合并,**不要**当成脚手架已完成。
39
+ - `needsAgentMerge === true`:至少有一个 TypeScript 文件被 **preserved**。先比较本地配置与返回事实,只在有差异时合并;即使 `client` 刚 `created`,也不能据此跳过对已保留 `api.ts` 的检查。
37
40
  6. 默认应用:`data.isDefaultConfig === true`,`data.configName === "default"`,代码里用 `CONFIG_NAMES.DEFAULT`。
38
41
  7. 具名应用:`data.isDefaultConfig === false`,`data.configName` 是不含引号的名字(如 `order`),`registerModels(..., "order")` 与 `apiConfigName: "order"`。不要把 `configName` 再包一层引号。
39
42
 
@@ -51,7 +54,7 @@ rabetbase api pull --format compress
51
54
  export const LOVRABET_SDK_CONFIG = {} as const;
52
55
  ```
53
56
 
54
- CLI 可能写入 `region: "id"`(由 SDK 1.5.3+ 解析)或 `runtimeDomain: "https://…"`(Global 与独立部署)。不要手改成认证字段。项目根目录 `rabetbase.routing.json` 同时承载模板最终 Domain 与资源策略,也由 CLI 刷新。
57
+ 默认节点保持空对象;其他官方节点和企业独立部署统一写入最终 `runtimeDomain`。不要手改成认证字段。项目模板所需的完整公开 Domain 与资源策略由独立命令 `rabetbase project domain-routing-sync` 写入项目根目录的 `rabetbase.domain-routing.json`。
55
58
 
56
59
  ### api.ts
57
60
 
@@ -137,11 +140,10 @@ export const lovrabetClient = createClient({
137
140
  | `configName` | `"default"` 或具名应用名(不含 TS 引号) |
138
141
  | `isDefaultConfig` | 默认应用为 `true` |
139
142
  | `models[]` | `datasetCode` / `tableName` / `name` / `alias` |
140
- | `sdkRouting` | `{ region?: "id", runtimeDomain?: string }` |
141
- | `projectRouting` | `{ path, manifest }`,最终公开 Domain 与资源策略 |
143
+ | `sdkRouting` | `{ runtimeDomain?: string }` |
142
144
  | `files.api` / `files.client` / `files.sdkConfig` | `{ path, action }`;`action` 为 `created` / `overwritten` / `preserved` / `refreshed` |
143
145
  | `needsAgentMerge` | 任一 TypeScript 被 `preserved` 时为 `true`,必须合并 `models` |
144
146
  | `apiFilePath` / `clientFilePath` / `sdkConfigPath` | 与 `files.*.path` 相同,兼容路径字段 |
145
147
  | `modelCount` / `datasetCount` | 模型数量 |
146
148
 
147
- 多应用时 `data.apps[]` 为上述对象的数组,`data.projectRouting` 为项目共享路由清单。
149
+ 多应用时 `data.apps[]` 为上述对象的数组。
@@ -1,8 +1,8 @@
1
1
  # api pull
2
2
 
3
- 拉取当前 App 下所有数据集(Dataset)的元信息,刷新 `src/api/sdk-config.ts` 与项目根目录 `rabetbase.routing.json`,并在 `api.ts` / `client.ts` **缺失时**写入 Cookie-first 脚手架。
3
+ 拉取当前 App 下所有数据集(Dataset)的元信息,刷新 `src/api/sdk-config.ts`,并在 `api.ts` / `client.ts` **缺失时**写入 Cookie-first 脚手架。项目公开 Domain 路由由 [`project domain-routing-sync`](rabetbase-project-domain-routing-sync.md) 独立维护。
4
4
 
5
- 已有 TypeScript **不会被覆盖**。Agent 必须用返回的 `data.models` 按 [`sdk-client-generation.md`](../guides/sdk-client-generation.md) 更新 `api.ts` / `client.ts`。人类若要重新得到脚手架,删除对应文件后再跑本命令。
5
+ 已有 TypeScript 默认**不会被覆盖**。Agent 必须用返回的 `data.models` 按 [`sdk-client-generation.md`](../guides/sdk-client-generation.md) 更新 `api.ts` / `client.ts`。人类明确要放弃本地定制并重新生成完整脚手架时,可使用 `--force --yes`。
6
6
 
7
7
  ## 命令
8
8
 
@@ -13,6 +13,9 @@ rabetbase api pull --format compress
13
13
  # 指定输出目录
14
14
  rabetbase api pull --output ./src/generated/api/ --format compress
15
15
 
16
+ # 放弃本地定制,按最新 Dataset 事实整体重建 TypeScript
17
+ rabetbase api pull --force --yes --format compress
18
+
16
19
  # 多应用:默认只解析「项目级」apps;与全局合并配置一起拉取时加 --global
17
20
  rabetbase api pull --global --format compress
18
21
 
@@ -27,6 +30,7 @@ rabetbase api pull --appcode app-order-001 --format compress
27
30
  |------|------|
28
31
  | `--output <dir>` | 输出目录,默认 `./src/api/` |
29
32
  | `--global` | 多应用时显式从「全局+项目」双层解析 `apps`;默认仅项目级 `apps` |
33
+ | `--force` | 整体替换已有 `api.ts` / `client.ts`;必须同时传 `--yes`,本地定制会丢失 |
30
34
  | `--app <name>` | 多应用模式下,指定应用名称 |
31
35
  | `--appcode <code>` | 直接指定 appcode,跳过配置查找 |
32
36
  | `--format compress\|json` | 结构化信封。Agent 应读 `data.models`,不要刮 stderr |
@@ -48,14 +52,13 @@ rabetbase api pull --appcode app-order-001 --format compress
48
52
 
49
53
  | 文件 | 行为 |
50
54
  |------|------|
51
- | `sdk-config.ts` | **每次刷新**。只含必要的 `region` / `runtimeDomain`,不含凭证 |
52
- | `rabetbase.routing.json` | **每次刷新**。只含最终 Domain、资源策略与本地路由,不含凭证 |
53
- | `<prefix>-api.ts` | 文件缺失时写入脚手架(含当前 `models`);已存在则跳过 |
54
- | `<prefix>-client.ts` | 文件缺失时写入 Cookie-first `createClient`;已存在则跳过 |
55
+ | `sdk-config.ts` | **每次刷新**。只含必要的最终 `runtimeDomain`,不含凭证 |
56
+ | `<prefix>-api.ts` | 文件缺失时写入脚手架(含当前 `models`);已存在时默认跳过,`--force` 时整体替换 |
57
+ | `<prefix>-client.ts` | 文件缺失时写入 Cookie-first `createClient`;已存在时默认跳过,`--force` 时整体替换 |
55
58
 
56
59
  默认 `prefix` 为空(单应用),多应用非 default 应用使用应用名作为 prefix。
57
60
 
58
- `project create` 在拷贝空 demo 脚手架后会覆盖写入一次 TypeScript,以便带上真实 models。日常 `api pull` 遇到已有 `api.ts` / `client.ts` 时跳过,只刷新 `sdk-config.ts` 并返回 `data.models`。
61
+ `project create` 在拷贝空 demo 脚手架后会覆盖写入一次 TypeScript,以便带上真实 models。首次拉取失败时,恢复提示会要求执行 `rabetbase api pull --force --yes`,避免占位脚手架被继续保留。日常 `api pull` 遇到已有 `api.ts` / `client.ts` 时跳过,只刷新 `sdk-config.ts` 并返回 Dataset 事实。
59
62
 
60
63
  ## 输出(单应用 `data`)
61
64
 
@@ -65,14 +68,13 @@ rabetbase api pull --appcode app-order-001 --format compress
65
68
  | `configName` | `"default"` 或具名应用名(不含 TS 引号) |
66
69
  | `isDefaultConfig` | 默认应用为 `true` |
67
70
  | `models[]` | `datasetCode` / `tableName` / `name` / `alias` |
68
- | `sdkRouting` | `{ region?: "id", runtimeDomain?: string }` |
69
- | `projectRouting` | `{ path, manifest }`,manifest 为最终公开路由清单 |
71
+ | `sdkRouting` | `{ runtimeDomain?: string }` |
70
72
  | `files.api` / `files.client` / `files.sdkConfig` | `{ path, action }`:`created` / `overwritten` / `preserved` / `refreshed` |
71
- | `needsAgentMerge` | 任一 TypeScript 被 `preserved` 时为 `true` |
73
+ | `needsAgentMerge` | 任一 TypeScript 被 `preserved` 时为 `true`;这是本地检查提示,不表示文件一定存在差异 |
72
74
  | `apiFilePath` / `clientFilePath` / `sdkConfigPath` | 与 `files.*.path` 相同 |
73
75
  | `modelCount` / `datasetCount` | 模型数量 |
74
76
 
75
- 多应用时 `data` 为 `{ apps, succeeded, failed, projectRouting }`。
77
+ 项目使用 `apps` 清单解析时,`data` 为 `{ apps, succeeded, failed }`,每个 `data.apps[]` 元素都使用上表结构。因此 Dataset 事实从直接单应用结果的 `data.models` 读取,或从项目应用清单结果的 `data.apps[].models` 读取;以实际信封为准。
76
78
 
77
79
  ## 生成标识符
78
80
 
@@ -94,6 +96,9 @@ rabetbase api pull --app order --format compress
94
96
 
95
97
  # 独立输出目录
96
98
  rabetbase api pull --output ./src/generated/api/ --format compress
99
+
100
+ # 仅在明确放弃本地 TypeScript 定制时整体重建
101
+ rabetbase api pull --force --yes --format compress
97
102
  ```
98
103
 
99
104
  更新已有 TypeScript:见 [`sdk-client-generation.md`](../guides/sdk-client-generation.md)。
@@ -128,7 +128,7 @@ rabetbase workspace remove product --yes
128
128
  | `pageSize` | number | — | 默认分页大小,用于 `sql list` 等分页命令 |
129
129
  | `riskLevel` | string | `"write"` | 允许执行的最高风险等级。可选值:`read`、`write`、`high-risk-write` |
130
130
  | `apiDir` | string | `"./src/api"` | `api pull` 生成代码的输出目录 |
131
- | `region` | string | `"cn"`(省略) | 官方节点快捷配置:当前开放 `cn`、`id`;历史 `global` 配置仅保留读取兼容 |
131
+ | `region` | string | `"cn"`(省略) | 官方节点快捷配置:当前开放 `cn`、`id`;历史 `global` 配置仅保留读取兼容。显式未知值会阻止业务命令回落默认节点,先用 `rabetbase doctor` 定位后修复 |
132
132
  | `template_base_url` | string | 平台默认 CDN | 模板 CDN 基础 URL,一般无需修改 |
133
133
  | `defaultApp` | string | — | 多应用模式下的默认应用名称;单应用省略 |
134
134
  | `apps` | object | — | 多应用配置。key 为应用名,value 为 AppProfile(见下方) |
@@ -327,7 +327,7 @@ rabetbase config set --key region --value id --global
327
327
  rabetbase config init --domain-config ./lovrabet-domains.json
328
328
  ```
329
329
 
330
- 该文件接收六个服务 Domain,以及可选的 `localDomain`、`certificateDomain`;值必须是无 path/query/fragment 的 HTTPS origin。自定义 HTTPS 本地回调必须同时提供 `localDomain` 与 `certificateDomain`。完整行为与命令行 flags 见 [`rabetbase config init`](rabetbase-init.md)。
330
+ 推荐使用 `lovrabet-routing/v1`,完整声明 `userDomain`、`apiDomain`、`runtimeDomain`、`skillDomain`、`kbDomain`、`appDomain`、`cdn.libraries` 与 `cdn.lovrabet`,并可选声明成对出现的 `localDomain`、`certificateDomain`。Domain 默认写成共用 HTTPS 字符串,确有差异时可按消费者覆盖。旧扁平 Domain 文件仍兼容。完整行为与命令行 flags 见 [`rabetbase config init`](rabetbase-init.md)。
331
331
 
332
332
  也可以逐项覆盖:
333
333
 
@@ -341,4 +341,4 @@ rabetbase config set --key kbDomain --value https://your-kb.example.com --global
341
341
  rabetbase config set --key appDomain --value https://your-app.example.com --global
342
342
  ```
343
343
 
344
- 官方模式:`region` 内置 Routing Profile,默认 `cn`,配置文件可省略;当前新配置只开放 `cn`、`id`,`id` 需保存对应 region。历史文件中的 `global` 仍可读取,但不能通过 `config init` 或 `config set` 新写入。企业独立部署模式才保存显式 Domain。当前所有已开放节点和独立部署统一使用中国大陆 CDN 配置。项目级配置可覆盖全局配置;默认项目合并会继承全局节点配置。
344
+ 官方模式:`region` 内置 Routing Profile,默认 `cn`,配置文件可省略;当前新配置只开放 `cn`、`id`,`id` 需保存对应 region。历史文件中的 `global` 仍可读取,但不能通过 `config init` 或 `config set` 新写入。每个官方节点直接配置最终 `cdn.libraries` 与 `cdn.lovrabet`,因此可按节点使用独立 CDN;中国大陆当前使用 AliCDN,印尼当前使用 Cloudflare cdnjs。企业独立部署模式保存显式 Domain 与 CDN。项目级配置可覆盖全局配置;默认项目合并会继承全局节点配置。
@@ -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 列表/外部标识},不得按普通外键关联;正确解释={规则}。