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

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 (346) 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 +37 -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/page/file-system.js +1 -1
  263. package/lib/core/page/hash.js +1 -1
  264. package/lib/core/page/lock.js +1 -1
  265. package/lib/core/sql-index-auditor.js +1 -1
  266. package/lib/core/sql-sync/config.js +1 -1
  267. package/lib/core/sql-sync/file-system.js +1 -1
  268. package/lib/core/sql-sync/hash.js +1 -1
  269. package/lib/core/sql-sync/lock.js +1 -1
  270. package/lib/core/sql-sync/utils.js +1 -1
  271. package/lib/core/sql-validator.js +1 -1
  272. package/lib/errors.js +1 -1
  273. package/lib/framework/build-all-flags.js +1 -1
  274. package/lib/framework/error-output.js +1 -1
  275. package/lib/framework/explicit-yes.js +1 -1
  276. package/lib/framework/flags.js +1 -1
  277. package/lib/framework/help.js +1 -1
  278. package/lib/framework/index.js +1 -1
  279. package/lib/framework/output.js +1 -1
  280. package/lib/framework/response.js +1 -1
  281. package/lib/framework/runner-alias.js +1 -1
  282. package/lib/framework/runner.js +1 -1
  283. package/lib/framework/schema-export.js +1 -1
  284. package/lib/framework/types.d.ts +0 -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 +16 -13
  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 +4 -4
  336. package/skills/rabetbase/references/rabetbase-doctor.md +2 -1
  337. package/skills/rabetbase/references/rabetbase-init.md +32 -8
  338. package/skills/rabetbase/references/rabetbase-kb.md +7 -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 +49 -0
  342. package/skills/rabetbase.manifest.json +5 -3
  343. package/lib/config/project-routing.d.ts +0 -30
  344. package/lib/config/project-routing.js +0 -1
  345. package/lib/core/kb-search-client.d.ts +0 -30
  346. package/lib/core/kb-search-client.js +0 -1
@@ -1 +1 @@
1
- export function sleep(_0x10fb47){return new Promise(_0x133792=>setTimeout(_0x133792,_0x10fb47));}
1
+ export function sleep(_0x5a83fd){return new Promise(_0x4cfaca=>setTimeout(_0x4cfaca,_0x5a83fd));}
@@ -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 a307_0x5d06aa=a307_0x5760;function a307_0x5760(_0x4d6ae2,_0x44ede8){_0x4d6ae2=_0x4d6ae2-0xab;const _0x369064=a307_0x3690();let _0x57607a=_0x369064[_0x4d6ae2];return _0x57607a;}(function(_0x290ad4,_0x30577a){const _0x413e0c=a307_0x5760,_0x51526f=_0x290ad4();while(!![]){try{const _0x349590=parseInt(_0x413e0c(0xd7))/0x1*(parseInt(_0x413e0c(0xbf))/0x2)+parseInt(_0x413e0c(0xcc))/0x3*(-parseInt(_0x413e0c(0xb7))/0x4)+-parseInt(_0x413e0c(0xb0))/0x5*(parseInt(_0x413e0c(0xd8))/0x6)+-parseInt(_0x413e0c(0xc1))/0x7*(-parseInt(_0x413e0c(0xbe))/0x8)+-parseInt(_0x413e0c(0xea))/0x9+-parseInt(_0x413e0c(0xe2))/0xa+parseInt(_0x413e0c(0xb8))/0xb;if(_0x349590===_0x30577a)break;else _0x51526f['push'](_0x51526f['shift']());}catch(_0x52b335){_0x51526f['push'](_0x51526f['shift']());}}}(a307_0x3690,0x2a0c0));import a307_0x2ae4c4 from'node:fs';function a307_0x3690(){const _0x2e8dda=['111aYSOgl','6EOEsvK','mkdir','now','Starting\x20template\x20content\x20replacement','name','formatLocalTimestamp','tableName','toLowerCase','getDate','utf8','716090CPDIea','toISOString','getMonth','map','processTemplate','split','toUpperCase','getSeconds','912123bbpKXT','error','isDirectory','includes','getFullYear','YourModel','pop','replace','pad','template','916915zWlLZd','replaceContent','.jsx','alias:\x20\x22','processFile','default','toDisplayTitle','76GeqOtB','6552315SlLhrs','success','writeFile','padStart','.js','alias','8HRyqcY','2402QyBuce','api','106393WriRQH','readFile','\x0a\x20\x20\x20\x20{\x20','datasetCode','Template\x20content\x20replacement\x20completed','datasetCode:\x20\x22','charAt','join','processDirectory','copyFile','.tpl','34044Zdakqk','.ts','.tsx','extname','.json','promises','info','slice','endsWith','Template\x20content\x20replacement\x20failed','.scss'];a307_0x3690=function(){return _0x2e8dda;};return a307_0x3690();}import a307_0x599f30 from'node:path';import{logger}from'../utils/logger.js';import{getCliVersion}from'../utils/version.js';const CLI_VERSION=getCliVersion();export class TemplateReplacer{static['pad'](_0x2baff3){const _0x518b83=a307_0x5760;return String(_0x2baff3)[_0x518b83(0xbb)](0x2,'0');}static[a307_0x5d06aa(0xdd)](_0x3d9aeb){const _0x2bfd1e=a307_0x5d06aa,_0xbebd7f=_0x3d9aeb[_0x2bfd1e(0xee)](),_0x3b0473=this['pad'](_0x3d9aeb[_0x2bfd1e(0xe4)]()+0x1),_0x2b73cf=this[_0x2bfd1e(0xae)](_0x3d9aeb[_0x2bfd1e(0xe0)]()),_0x5e781a=this['pad'](_0x3d9aeb['getHours']()),_0x4b5397=this[_0x2bfd1e(0xae)](_0x3d9aeb['getMinutes']()),_0x22139f=this[_0x2bfd1e(0xae)](_0x3d9aeb[_0x2bfd1e(0xe9)]());return{'createdAt':_0xbebd7f+'-'+_0x3b0473+'-'+_0x2b73cf+'\x20'+_0x5e781a+':'+_0x4b5397+':'+_0x22139f,'createdDate':_0xbebd7f+'-'+_0x3b0473+'-'+_0x2b73cf,'createdTime':_0x5e781a+':'+_0x4b5397+':'+_0x22139f};}static['toComponentName'](_0x498a9a){const _0x36eedb=a307_0x5d06aa,_0x381051=_0x498a9a['split']('/')[_0x36eedb(0xac)]()||_0x498a9a;return _0x381051['split']('-')['map'](_0x835232=>_0x835232[_0x36eedb(0xc7)](0x0)[_0x36eedb(0xe8)]()+_0x835232[_0x36eedb(0xd3)](0x1)['toLowerCase']())['join']('');}static[a307_0x5d06aa(0xb6)](_0xa35d17){const _0x1c2194=a307_0x5d06aa,_0x501b0e=_0xa35d17[_0x1c2194(0xe7)]('/')[_0x1c2194(0xac)]()||_0xa35d17;return _0x501b0e[_0x1c2194(0xe7)]('-')[_0x1c2194(0xe5)](_0x4fe2e1=>_0x4fe2e1[_0x1c2194(0xc7)](0x0)[_0x1c2194(0xe8)]()+_0x4fe2e1[_0x1c2194(0xd3)](0x1)[_0x1c2194(0xdf)]())[_0x1c2194(0xc8)]('\x20');}static[a307_0x5d06aa(0xb1)](_0x4775cd,_0x51b289,_0x15d56b){const _0x1a3390=a307_0x5d06aa,_0x344532=this['toComponentName'](_0x51b289),_0x29b881=this[_0x1a3390(0xb6)](_0x51b289),{createdAt:_0x3b0a05,createdDate:_0x6ebf8a,createdTime:_0x5d05f6}=this[_0x1a3390(0xdd)](new Date());let _0x3b6947=_0x4775cd[_0x1a3390(0xad)](/\{CliVersion\}/g,CLI_VERSION)[_0x1a3390(0xad)](/\{ComponentName\}/g,_0x344532)[_0x1a3390(0xad)](/\{DisplayTitle\}/g,_0x29b881)[_0x1a3390(0xad)](/\{PageName\}/g,_0x51b289)[_0x1a3390(0xad)](/\{TemplateName\}/g,_0x15d56b)[_0x1a3390(0xad)](/\{CreatedAt\}/g,_0x3b0a05)[_0x1a3390(0xad)](/\{CreatedDate\}/g,_0x6ebf8a)[_0x1a3390(0xad)](/\{CreatedTime\}/g,_0x5d05f6);return _0x3b6947;}static['replaceApiContent'](_0x3d8367,_0xed4c3e,_0x4b18d0,_0x2b5ab2,_0x5b2b32,_0x30dedf,_0x1dda5b,_0x35607a){const _0x1d9bf5=a307_0x5d06aa,_0x5b8ebd=new Date(),_0x1da689=_0x5b8ebd[_0x1d9bf5(0xe3)](),_0x57e7a0=_0x4b18d0[_0x1d9bf5(0xe5)](_0x553e6c=>{const _0x33df5d=_0x1d9bf5,_0x51f90c=[_0x33df5d(0xc6)+_0x553e6c[_0x33df5d(0xc4)]+'\x22','tableName:\x20\x22'+_0x553e6c[_0x33df5d(0xde)]+'\x22','name:\x20\x22'+_0x553e6c[_0x33df5d(0xdc)]+'\x22'];return _0x553e6c[_0x33df5d(0xbd)]&&_0x51f90c['push'](_0x33df5d(0xb3)+_0x553e6c[_0x33df5d(0xbd)]+'\x22'),_0x33df5d(0xc3)+_0x51f90c[_0x33df5d(0xc8)](',\x20')+'\x20},';})[_0x1d9bf5(0xc8)](''),_0x1e0cda=_0x2b5ab2||_0x4b18d0[0x0]?.[_0x1d9bf5(0xbd)]||_0x1d9bf5(0xab);let _0xb4d2d7=_0x3d8367[_0x1d9bf5(0xad)](/\{AppCode\}/g,_0xed4c3e)[_0x1d9bf5(0xad)](/\{ModelConfigs\}/g,_0x57e7a0)[_0x1d9bf5(0xad)](/\{ExampleModelName\}/g,_0x1e0cda)[_0x1d9bf5(0xad)](/\{ApiFileName\}/g,_0x5b2b32||_0x1d9bf5(0xc0))['replace'](/\{ConfigName\}/g,_0x30dedf||_0x1d9bf5(0xb5))[_0x1d9bf5(0xad)](/\{ClientConfigParam\}/g,_0x1dda5b||'')['replace'](/\{VarPrefix\}/g,_0x35607a||'LOVRABET')[_0x1d9bf5(0xad)](/\{CreatedAt\}/g,_0x1da689);return _0xb4d2d7;}static async[a307_0x5d06aa(0xe6)](_0x475a25,_0x69d970,_0x4271d3,_0xb4b26b,_0x3e171d=!![]){const _0x1f23ca=a307_0x5d06aa,_0x264f81=Date[_0x1f23ca(0xda)]();try{_0x3e171d&&logger[_0x1f23ca(0xd2)](_0x1f23ca(0xaf),_0x1f23ca(0xdb),{'templatePath':_0x475a25,'targetPath':_0x69d970,'pageName':_0x4271d3,'templateName':_0xb4b26b});await a307_0x2ae4c4['promises'][_0x1f23ca(0xd9)](_0x69d970,{'recursive':!![]}),await this[_0x1f23ca(0xc9)](_0x475a25,_0x69d970,_0x4271d3,_0xb4b26b);if(_0x3e171d){const _0x203d1b=Date['now']()-_0x264f81;logger[_0x1f23ca(0xb9)]('template',_0x1f23ca(0xc5),_0x203d1b,{'pageName':_0x4271d3,'templateName':_0xb4b26b});}}catch(_0x17af14){if(_0x3e171d){const _0x15a197=Date[_0x1f23ca(0xda)]()-_0x264f81;logger[_0x1f23ca(0xeb)](_0x1f23ca(0xaf),_0x1f23ca(0xd5),{'templatePath':_0x475a25,'targetPath':_0x69d970,'pageName':_0x4271d3,'templateName':_0xb4b26b,'error':_0x17af14 instanceof Error?_0x17af14['message']:String(_0x17af14),'duration':_0x15a197});}throw _0x17af14;}}static async['processDirectory'](_0x12fb86,_0x4cb2db,_0x12ea29,_0x43239e){const _0x473e54=a307_0x5d06aa,_0x4050c9=await a307_0x2ae4c4['promises']['readdir'](_0x12fb86,{'withFileTypes':!![]});for(const _0x436c6d of _0x4050c9){const _0x1eb991=a307_0x599f30[_0x473e54(0xc8)](_0x12fb86,_0x436c6d[_0x473e54(0xdc)]);let _0x1ad06f=a307_0x599f30[_0x473e54(0xc8)](_0x4cb2db,_0x436c6d['name']);_0x436c6d[_0x473e54(0xdc)][_0x473e54(0xd4)](_0x473e54(0xcb))&&(_0x1ad06f=a307_0x599f30['join'](_0x4cb2db,_0x436c6d[_0x473e54(0xdc)][_0x473e54(0xad)](/\.tpl$/,'')));if(_0x436c6d[_0x473e54(0xec)]())await a307_0x2ae4c4['promises'][_0x473e54(0xd9)](_0x1ad06f,{'recursive':!![]}),await this[_0x473e54(0xc9)](_0x1eb991,_0x1ad06f,_0x12ea29,_0x43239e);else _0x436c6d['isFile']()&&await this[_0x473e54(0xb4)](_0x1eb991,_0x1ad06f,_0x12ea29,_0x43239e);}}static async['processFile'](_0x1bd924,_0x1be1ee,_0x57c044,_0x385873){const _0x4b3f51=a307_0x5d06aa,_0x10edaa=a307_0x599f30[_0x4b3f51(0xcf)](_0x1bd924)[_0x4b3f51(0xdf)]();_0x1bd924[_0x4b3f51(0xd4)](_0x4b3f51(0xcb))&&(_0x1be1ee=_0x1be1ee[_0x4b3f51(0xad)](/\.tpl$/,''));const _0x534a54=[_0x4b3f51(0xce),_0x4b3f51(0xcd),_0x4b3f51(0xb2),_0x4b3f51(0xbc),_0x4b3f51(0xd0),'.md','.css',_0x4b3f51(0xd6),_0x4b3f51(0xcb)];if(_0x534a54[_0x4b3f51(0xed)](_0x10edaa)||_0x1bd924[_0x4b3f51(0xd4)](_0x4b3f51(0xcb))){const _0x37e0ce=await a307_0x2ae4c4[_0x4b3f51(0xd1)][_0x4b3f51(0xc2)](_0x1bd924,_0x4b3f51(0xe1)),_0x20ed08=this[_0x4b3f51(0xb1)](_0x37e0ce,_0x57c044,_0x385873);await a307_0x2ae4c4['promises'][_0x4b3f51(0xba)](_0x1be1ee,_0x20ed08,_0x4b3f51(0xe1));}else await a307_0x2ae4c4[_0x4b3f51(0xd1)][_0x4b3f51(0xca)](_0x1bd924,_0x1be1ee);}}
@@ -1 +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(_0x42c7de,_0x2e2bdc){const _0x4d05bc=a308_0xef00,_0x3c366c=_0x42c7de();while(!![]){try{const _0x39d948=-parseInt(_0x4d05bc(0x1c0))/0x1*(-parseInt(_0x4d05bc(0x1b8))/0x2)+-parseInt(_0x4d05bc(0x1b6))/0x3+parseInt(_0x4d05bc(0x1b9))/0x4*(parseInt(_0x4d05bc(0x1d3))/0x5)+-parseInt(_0x4d05bc(0x1bf))/0x6*(parseInt(_0x4d05bc(0x1d0))/0x7)+parseInt(_0x4d05bc(0x1b4))/0x8*(-parseInt(_0x4d05bc(0x1c7))/0x9)+-parseInt(_0x4d05bc(0x1ce))/0xa+parseInt(_0x4d05bc(0x1d1))/0xb*(parseInt(_0x4d05bc(0x1d4))/0xc);if(_0x39d948===_0x2e2bdc)break;else _0x3c366c['push'](_0x3c366c['shift']());}catch(_0x754b86){_0x3c366c['push'](_0x3c366c['shift']());}}}(a308_0x3d68,0x59325));import{mkdir,readFile,writeFile}from'node:fs/promises';import{homedir}from'node:os';import{dirname,join}from'node:path';import a308_0x586753 from'semver';import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';import{getCliVersionPolicy}from'../utils/cli-version-policy.js';import{getCliVersion}from'../utils/version.js';const UPDATE_CHECK_TTL_MS=0xc*0x3c*0x3c*0x3e8,UPDATE_NOTICE_TTL_MS=0x18*0x3c*0x3c*0x3e8;function isUpdateNoticeDisabled(){const _0x46aedf=a308_0xef00,_0x324727=process.env.RABETBASE_NO_UPDATE_NOTICE?.['trim']()[_0x46aedf(0x1bd)]();return _0x324727==='1'||_0x324727===_0x46aedf(0x1ba)||_0x324727===_0x46aedf(0x1c6);}function cacheRoot(){const _0x2a1b2d=a308_0xef00;return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),_0x2a1b2d(0x1c3));}export function getUpdateNoticeCachePath(){const _0x194897=a308_0xef00;return join(cacheRoot(),_0x194897(0x1c5),_0x194897(0x1bc));}async function readUpdateNoticeCache(){const _0x10a440=a308_0xef00;try{const _0x2a2920=await readFile(getUpdateNoticeCachePath(),_0x10a440(0x1cd)),_0x23afe8=JSON[_0x10a440(0x1c4)](_0x2a2920);if(!_0x23afe8||typeof _0x23afe8!==_0x10a440(0x1b7))return{};return _0x23afe8;}catch{return{};}}async function writeUpdateNoticeCache(_0x4a8a3c){const _0x2a35f2=a308_0xef00;try{const _0x11fffd=getUpdateNoticeCachePath();await mkdir(dirname(_0x11fffd),{'recursive':!![]}),await writeFile(_0x11fffd,JSON['stringify'](_0x4a8a3c,null,0x2)+'\x0a',_0x2a35f2(0x1cd));}catch{}}function isFreshCheck(_0x275b42,_0x3ef3ab){const _0x5b4e68=a308_0xef00;return typeof _0x275b42[_0x5b4e68(0x1cc)]===_0x5b4e68(0x1ca)&&_0x3ef3ab-_0x275b42[_0x5b4e68(0x1cc)]<UPDATE_CHECK_TTL_MS;}function a308_0xef00(_0x21f807,_0x3fa9ac){_0x21f807=_0x21f807-0x1b4;const _0x3d6888=a308_0x3d68();let _0xef0089=_0x3d6888[_0x21f807];return _0xef0089;}function isRecentlyNotified(_0x9b949c,_0x5df6a6,_0x52d141){const _0x278266=a308_0xef00;return _0x9b949c[_0x278266(0x1c2)]===_0x5df6a6&&typeof _0x9b949c[_0x278266(0x1c8)]===_0x278266(0x1ca)&&_0x52d141-_0x9b949c[_0x278266(0x1c8)]<UPDATE_NOTICE_TTL_MS;}export function buildNpmVersionUrl(_0x281a46){const _0x5f354a=a308_0xef00;return _0x5f354a(0x1bb)+NPM_PACKAGE_NAME+_0x5f354a(0x1c1)+_0x281a46;}export async function resolveLatestUpdateNotice(){const _0x25af2c=a308_0xef00;if(isUpdateNoticeDisabled())return null;try{const _0x55fe5f=Date[_0x25af2c(0x1c9)](),_0x2dc339=getCliVersion(),_0xf20e13=await readUpdateNoticeCache();let _0x19af13=isFreshCheck(_0xf20e13,_0x55fe5f)?_0xf20e13['latest']?.['trim']():undefined;if(!_0x19af13&&!isFreshCheck(_0xf20e13,_0x55fe5f)){const _0x41e059=await getCliVersionPolicy();_0x19af13=_0x41e059?.[_0x25af2c(0x1cb)]?.['trim']()||undefined,await writeUpdateNoticeCache({..._0xf20e13,'checkedAt':_0x55fe5f,'latest':_0x19af13,'failed':!_0x19af13});}if(!_0x19af13||!a308_0x586753[_0x25af2c(0x1cf)](_0x2dc339)||!a308_0x586753[_0x25af2c(0x1cf)](_0x19af13))return null;if(a308_0x586753['gte'](_0x2dc339,_0x19af13))return null;if(isRecentlyNotified(_0xf20e13,_0x19af13,_0x55fe5f))return null;const _0x3a9cc7=CLI_BIN_NAME+_0x25af2c(0x1be);return await writeUpdateNoticeCache({..._0xf20e13,'checkedAt':isFreshCheck(_0xf20e13,_0x55fe5f)?_0xf20e13[_0x25af2c(0x1cc)]:_0x55fe5f,'latest':_0x19af13,'failed':![],'lastNotifiedVersion':_0x19af13,'lastNotifiedAt':_0x55fe5f}),{'command':_0x3a9cc7,'current':_0x2dc339,'latest':_0x19af13,'url':buildNpmVersionUrl(_0x19af13),'message':CLI_BIN_NAME+'\x20'+_0x19af13+_0x25af2c(0x1b5)+_0x2dc339+_0x25af2c(0x1d2)+_0x3a9cc7};}catch{return null;}}function a308_0x3d68(){const _0x1659be=['number','stableVersion','checkedAt','utf8','4372720TjwJAU','valid','1057JcoTEI','55NdsyVz',',\x20run:\x20','586455ptCdUV','1917588MYyVXs','262552qAOjDP','\x20available,\x20current\x20','716925zObODk','object','2714yQEvPU','8cyMlJP','true','https://www.npmjs.com/package/','update-check.json','toLowerCase','\x20update','20970bWAfDF','419mkDBRK','/v/','lastNotifiedVersion','.cache','parse','rabetbase-cli','yes','9QJwmCN','lastNotifiedAt','now'];a308_0x3d68=function(){return _0x1659be;};return a308_0x3d68();}
@@ -1 +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(_0x38ffeb,_0x4d8f15){var _0x151020=a309_0x10ed,_0x251a8d=_0x38ffeb();while(!![]){try{var _0x45fcfd=parseInt(_0x151020(0x122))/0x1+parseInt(_0x151020(0x120))/0x2+-parseInt(_0x151020(0x11f))/0x3+-parseInt(_0x151020(0x11e))/0x4+-parseInt(_0x151020(0x124))/0x5*(-parseInt(_0x151020(0x123))/0x6)+parseInt(_0x151020(0x11c))/0x7*(-parseInt(_0x151020(0x11d))/0x8)+parseInt(_0x151020(0x121))/0x9;if(_0x45fcfd===_0x4d8f15)break;else _0x251a8d['push'](_0x251a8d['shift']());}catch(_0x2971a2){_0x251a8d['push'](_0x251a8d['shift']());}}}(a309_0x53bc,0x7dd27));function a309_0x53bc(){var _0x5df1eb=['4197006ppNpAP','460655jfqlSD','3975294qQvnqL','5IrcXLj','14WfQyLs','1188784ivjbtS','3282940IXmyee','591303ErpJnq','481722QhekgP'];a309_0x53bc=function(){return _0x5df1eb;};return a309_0x53bc();}import{VERSION}from'../generated/build-info.js';function a309_0x10ed(_0x703dc7,_0x2e140b){_0x703dc7=_0x703dc7-0x11c;var _0x53bc2e=a309_0x53bc();var _0x10ed9a=_0x53bc2e[_0x703dc7];return _0x10ed9a;}export function getCliVersion(){return VERSION;}
@@ -1 +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(_0x223fe0,_0x2f9dce){var _0x779c1f=a310_0x4c9a,_0x368283=_0x223fe0();while(!![]){try{var _0x3613f6=parseInt(_0x779c1f(0xac))/0x1*(parseInt(_0x779c1f(0xb2))/0x2)+parseInt(_0x779c1f(0xaa))/0x3*(-parseInt(_0x779c1f(0xab))/0x4)+parseInt(_0x779c1f(0xad))/0x5*(-parseInt(_0x779c1f(0xae))/0x6)+parseInt(_0x779c1f(0xb3))/0x7+-parseInt(_0x779c1f(0xb0))/0x8+-parseInt(_0x779c1f(0xaf))/0x9+parseInt(_0x779c1f(0xb1))/0xa;if(_0x3613f6===_0x2f9dce)break;else _0x368283['push'](_0x368283['shift']());}catch(_0x3c62a5){_0x368283['push'](_0x368283['shift']());}}}(a310_0x1f10,0x9fca5));function a310_0x4c9a(_0x49cc77,_0x21f8a9){_0x49cc77=_0x49cc77-0xaa;var _0x1f1004=a310_0x1f10();var _0x4c9aa0=_0x1f1004[_0x49cc77];return _0x4c9aa0;}import{setActiveCookie,clearActiveCookie}from'../core/api-client.js';export async function withActiveCookie(_0x1106de,_0x239986){setActiveCookie(_0x1106de);try{return await _0x239986();}finally{clearActiveCookie();}}function a310_0x1f10(){var _0x9fb203=['1038SAWSfC','1319733ytyMnA','6933824QerPCv','29785110csCxcB','675504DowBoW','3088925aUajOJ','1821957RLgnBz','8diIBBf','1JuCEgc','25290XntPoa'];a310_0x1f10=function(){return _0x9fb203;};return a310_0x1f10();}
@@ -1 +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 a311_0x2be0(_0x20b0a6,_0x1d2352){_0x20b0a6=_0x20b0a6-0xde;var _0x4a3c6a=a311_0x4a3c();var _0x2be01=_0x4a3c6a[_0x20b0a6];return _0x2be01;}(function(_0xc8a146,_0x4a5b88){var _0x26256b=a311_0x2be0,_0x4e280e=_0xc8a146();while(!![]){try{var _0x4d7cf8=parseInt(_0x26256b(0xde))/0x1*(-parseInt(_0x26256b(0xe6))/0x2)+-parseInt(_0x26256b(0xe1))/0x3+parseInt(_0x26256b(0xe8))/0x4+parseInt(_0x26256b(0xe7))/0x5+parseInt(_0x26256b(0xe0))/0x6*(parseInt(_0x26256b(0xe3))/0x7)+parseInt(_0x26256b(0xe5))/0x8+-parseInt(_0x26256b(0xe4))/0x9;if(_0x4d7cf8===_0x4a5b88)break;else _0x4e280e['push'](_0x4e280e['shift']());}catch(_0xe2bf5b){_0x4e280e['push'](_0x4e280e['shift']());}}}(a311_0x4a3c,0xc9662));function a311_0x4a3c(){var _0x36759c=['1595160NaxrZZ','215777OsMfHg','write','12rNApsb','2932122NloDCy','stderr','5237799DKSWQv','3290535bRGmbW','3255344gwbKml','8tGYQtd','3644025QcHcPL'];a311_0x4a3c=function(){return _0x36759c;};return a311_0x4a3c();}export function writeCliSideChannelLine(_0x575c81){var _0x48a0ee=a311_0x2be0;process[_0x48a0ee(0xe2)][_0x48a0ee(0xdf)](_0x575c81+'\x0a');}
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.5",
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.5
4
+ description: "Use for Lovrabet development work through the rabetbase CLI: create or bind projects (including creating an AppCode project in the current folder), pull Dataset/API facts and maintain SDK clients, or manage datasets, database connections, pages, SQL, Backend Functions, menus, notifications, knowledge bases, Agent Context Rules, roles, files, OCR, deployment metadata, platform issues, and 钉钉沙箱账号绑定. Trigger when the user mentions rabetbase, Lovrabet development, AppCode, Dataset, project creation, api pull/codegen, dblink, page, SQL, BFF, menu, notification, knowledge base, Agent Context Rules, RULES.md, DATABASE.md, rule list/get/set, role, file/OCR, or related development workflows."
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`;先审阅脚本命令体,嵌入式工具暂不开放 |
@@ -315,7 +316,8 @@ const result = await client.bff.execute<DashboardData>({
315
316
  | 修改配置文件 | [`rabetbase config set <key> <value>`](references/rabetbase-config.md) | 默认写项目;无项目配置且未 `--global` 会拒绝;`--global` 写 `~/.rabetbase.json` |
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
- | 管理和检索当前研发应用的企业知识库 | [`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` |
319
+ | 管理和检索当前研发应用的企业知识库 | [`rabetbase kb list/detail/search/create/update/delete`](references/rabetbase-kb.md) | 管理仅 company scope;search 仅 COMPANY/PUBLIC;`create/update` 为 `write`,`delete` 保持 `high-risk-write` |
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(见下方) |
@@ -136,7 +136,7 @@ rabetbase workspace remove product --yes
136
136
  | `userDomain` | string | 平台默认 | 自定义用户域名 |
137
137
  | `runtimeDomain` | string | 平台默认 | 自定义运行时域名 |
138
138
  | `skillDomain` | string | 节点默认 | SkillHub HTTPS origin 覆盖 |
139
- | `kbDomain` | string | 跟随 `apiDomain` / 节点 API 默认值 | 企业知识库管理与 `kb search` 的 SmartCode Java HTTPS origin;KB Service 下游地址由 Java 配置 |
139
+ | `kbDomain` | string | 跟随 `apiDomain` / 节点 API 默认值 | 企业知识库 HTTPS origin 覆盖;显式配置时优先,`runtimeDomain` 不参与回退 |
140
140
  | `appDomain` | string | 节点默认 | 工作台、页面编辑器和发布页面域名 |
141
141
  | `localDomain` | string | 独立部署默认 `http://localhost` | 自定义 HTTPS 本地回调 origin;与 `certificateDomain` 同时配置 |
142
142
  | `certificateDomain` | string | 节点默认;独立部署无 | 本地 HTTPS 证书服务 origin;与 `localDomain` 同时配置 |
@@ -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。项目级配置可覆盖全局配置;默认项目合并会继承全局节点配置。
@@ -22,9 +22,10 @@ rabetbase doctor check
22
22
  | Built-in Skill | 目标路径、包版本、Skill 版本、内容状态;不一致时给出 `rabetbase cli-skill install` 修复命令 |
23
23
  | Config Files | 全局和项目级配置文件路径 |
24
24
  | Config JSON | 分别检测全局/项目配置文件是否为**合法 JSON**;非法时标红并给出解析错误(常见于尾随逗号、注释等,会导致该侧配置在合并时被忽略) |
25
+ | Country/Region Configuration | 检查项目与全局 `region`;显式未知值会标明来源,并给出对应作用域的 `config delete region` 修复命令 |
25
26
  | Merged Config | 合并后的所有配置项(appCode / env / cookie / apiDir 等) |
26
27
  | Apps | 多应用模式下的应用列表及各自配置 |
27
- | API Endpoints | 最终生效的 region 与域名(user / api / runtime / skill / kb / app);KB 管理与 search 共用 SmartCode Java origin |
28
+ | API Endpoints | 最终生效的 region 与六个域名(user / api / runtime / skill / kb / app) |
28
29
  | Auth | 登录状态及 cookie 有效性 |
29
30
 
30
31
  ## 典型场景
@@ -1,6 +1,6 @@
1
1
  # rabetbase config init
2
2
 
3
- 首次使用、切换官方节点或切换企业独立部署地址时,重建全局 Lovrabet 连接配置。该命令只处理 region/Domain,不负责认证或项目应用绑定。
3
+ 首次使用、切换官方节点或切换企业独立部署地址时,重建 Lovrabet 连接配置。默认写入当前项目;显式传 `--global` 时写入全局配置。该命令只处理 region/Domain,不负责认证或项目应用绑定。
4
4
 
5
5
  ```bash
6
6
  # 交互选择 cn / id
@@ -29,11 +29,11 @@ rabetbase config init \
29
29
  - 交互执行时选择 `Mainland China (cn)` 或 `Indonesia (id)`,默认选中 `cn`
30
30
  - 非交互执行时应显式传 `--region cn|id`;未传 region/Domain 时回退 `cn`
31
31
  - 当前只开放 `cn`、`id`;尚未发布的 `global` 不可选择
32
+ - 已保存的 `region` 无法识别时,依赖连接配置的命令会在请求前停止;先用 `rabetbase doctor` 定位作用域,再执行对应作用域的 `config init` 或 `config delete region` 修复
32
33
 
33
34
  ## 写入行为
34
35
 
35
- - 固定写入全局 `~/.rabetbase.json`
36
- - 不使用也不需要 `--global`,不能写入项目配置
36
+ - 默认写入当前项目 `.rabetbase.json`;`--global` 写入 `~/.rabetbase.json`
37
37
  - 默认中国节点 `cn` 不写冗余 `region` 字段
38
38
  - 官方节点模式会清除所有显式 Domain,以及遗留的 `agentDomain` / `platformDomain` / `skillHubDomain`
39
39
  - 独立部署模式会清除旧 `region`、显式 Domain 和遗留 Domain,再写入本次提供的 Domain
@@ -42,7 +42,31 @@ rabetbase config init \
42
42
 
43
43
  ## 独立部署 Domain
44
44
 
45
- `--domain-config` 接受只包含以下字段的 JSON 对象:
45
+ `--domain-config` 推荐使用两个 CLI 共用的版本化企业路由清单:
46
+
47
+ ```json
48
+ {
49
+ "protocol": "lovrabet-routing/v1",
50
+ "kind": "enterprise",
51
+ "cdn": {
52
+ "libraries": "https://cdnjs.cloudflare.com/ajax/libs",
53
+ "lovrabet": "https://g.lovrabet.com"
54
+ },
55
+ "domains": {
56
+ "userDomain": "https://user.customer.example.com",
57
+ "apiDomain": "https://api.customer.example.com",
58
+ "runtimeDomain": "https://runtime.customer.example.com",
59
+ "skillDomain": "https://skills.customer.example.com",
60
+ "kbDomain": {
61
+ "rabetbase-cli": "https://kb-admin.customer.example.com",
62
+ "lovrabet-cli": "https://kb.customer.example.com"
63
+ },
64
+ "appDomain": "https://app.customer.example.com"
65
+ }
66
+ }
67
+ ```
68
+
69
+ 新版清单要求完整服务拓扑和 `cdn.libraries` / `cdn.lovrabet`,不会把缺失服务回退到官方节点;不能再叠加单独的 `--*-domain` flag。`cdn.libraries` 是第三方库的完整基地址,可包含 `/code/lib` 或 `/ajax/libs`;`cdn.lovrabet` 是 Lovrabet 自有资源 origin。Domain 可写成所有消费者共用的 HTTPS 字符串;确有差异时写成带 `default` 或消费者键的对象。对象优先使用当前消费者键,其次使用 `default`,两者都没有时命令报错。旧扁平 JSON 继续兼容:
46
70
 
47
71
  ```json
48
72
  {
@@ -58,12 +82,12 @@ rabetbase config init \
58
82
  ```
59
83
 
60
84
  - 每个值必须是 HTTPS origin,不能包含账号、密码、path、query 或 fragment
61
- - 文件至少提供一个受支持 Domain;完整独立部署应提供实际由客户部署的全部服务 Domain
62
- - 当前所有官方节点和独立部署统一使用中国大陆 CDN 配置;User/App/Runtime 等 Lovrabet 服务 Domain 仍按节点或客户配置分别解析
85
+ - 旧扁平文件至少提供一个受支持 Domain,并维持既有回退语义
86
+ - 每个官方节点直接配置自己的 `cdn.libraries` 与 `cdn.lovrabet`;中国大陆当前使用 AliCDN,印尼当前使用 Cloudflare cdnjs,企业独立部署使用清单中的显式值
63
87
  - 未提供 `localDomain` / `certificateDomain` 时,本地回调使用 `http://localhost`;自定义 HTTPS 本地回调时两者必须同时提供
64
- - 同名 `--*-domain` flag 覆盖文件中的值
88
+ - 同名 `--*-domain` flag 仅覆盖旧扁平文件中的值
65
89
  - `--region` 与任意独立部署 Domain 互斥,不能混用
66
- - 未提供的 Domain 会按默认 `cn` 映射回退,因此完整独立部署不要遗漏实际由客户部署的服务入口
90
+ - 只有旧扁平配置的未提供 Domain 会按默认节点回退
67
91
 
68
92
  ## 结果语义
69
93