@lovrabet/rabetbase-cli 2.4.3 → 2.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (381) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/login-success-html.js +1 -1
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/generate.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/api/shared.js +1 -1
  19. package/lib/commands/app/index.js +1 -1
  20. package/lib/commands/app/list.js +1 -1
  21. package/lib/commands/app/members-list.js +1 -1
  22. package/lib/commands/app/remote-directory.js +1 -1
  23. package/lib/commands/app/shared.js +1 -1
  24. package/lib/commands/app-config/delete.js +1 -1
  25. package/lib/commands/app-config/get.js +1 -1
  26. package/lib/commands/app-config/index.js +1 -1
  27. package/lib/commands/app-config/list.js +1 -1
  28. package/lib/commands/app-config/set.js +1 -1
  29. package/lib/commands/app-config/shared.js +1 -1
  30. package/lib/commands/auth/index.js +1 -1
  31. package/lib/commands/bff/create.js +1 -1
  32. package/lib/commands/bff/delete.js +1 -1
  33. package/lib/commands/bff/detail.js +1 -1
  34. package/lib/commands/bff/index.js +1 -1
  35. package/lib/commands/bff/list.js +1 -1
  36. package/lib/commands/bff/pull.js +1 -1
  37. package/lib/commands/bff/push.js +1 -1
  38. package/lib/commands/bff/status.js +1 -1
  39. package/lib/commands/cli-skill/index.js +1 -1
  40. package/lib/commands/cli-update.js +1 -1
  41. package/lib/commands/codegen/index.js +1 -1
  42. package/lib/commands/codegen/sdk.js +1 -1
  43. package/lib/commands/codegen/sql.js +1 -1
  44. package/lib/commands/common/app-registry.js +1 -1
  45. package/lib/commands/common/app-selector.js +1 -1
  46. package/lib/commands/common/async-task.js +1 -1
  47. package/lib/commands/common/dry-run.js +1 -1
  48. package/lib/commands/common/flags.js +1 -1
  49. package/lib/commands/common/local-file.js +1 -1
  50. package/lib/commands/common/validate.js +1 -1
  51. package/lib/commands/config/get.js +1 -1
  52. package/lib/commands/config/index.js +1 -1
  53. package/lib/commands/config/list.js +1 -1
  54. package/lib/commands/config/set.js +1 -1
  55. package/lib/commands/config/shared.js +1 -1
  56. package/lib/commands/data/filter.js +1 -1
  57. package/lib/commands/data/getOne.js +1 -1
  58. package/lib/commands/data/index.js +1 -1
  59. package/lib/commands/data/shared.js +1 -1
  60. package/lib/commands/dataset/business-group-update.js +1 -1
  61. package/lib/commands/dataset/capability.js +1 -1
  62. package/lib/commands/dataset/delete.js +1 -1
  63. package/lib/commands/dataset/detail.js +1 -1
  64. package/lib/commands/dataset/extend-update.js +1 -1
  65. package/lib/commands/dataset/field-update.js +1 -1
  66. package/lib/commands/dataset/generate.js +1 -1
  67. package/lib/commands/dataset/index.js +1 -1
  68. package/lib/commands/dataset/list.js +1 -1
  69. package/lib/commands/dataset/operations.js +1 -1
  70. package/lib/commands/dataset/relation-audit.js +1 -1
  71. package/lib/commands/dataset/relation-create.js +1 -1
  72. package/lib/commands/dataset/relation-delete.js +1 -1
  73. package/lib/commands/dataset/relation-shared.js +1 -1
  74. package/lib/commands/dataset/relation-update.js +1 -1
  75. package/lib/commands/dataset/relations.js +1 -1
  76. package/lib/commands/dataset/rename.js +1 -1
  77. package/lib/commands/dataset/restore.js +1 -1
  78. package/lib/commands/db/analysis-batching.js +1 -1
  79. package/lib/commands/db/analyze-batch-plan.js +1 -1
  80. package/lib/commands/db/analyze-cancel.js +1 -1
  81. package/lib/commands/db/analyze-start.js +1 -1
  82. package/lib/commands/db/analyze-status.js +1 -1
  83. package/lib/commands/db/create.js +1 -1
  84. package/lib/commands/db/delete.js +1 -1
  85. package/lib/commands/db/detail.js +1 -1
  86. package/lib/commands/db/diff-refresh-start.d.ts +2 -0
  87. package/lib/commands/db/diff-refresh-start.js +1 -0
  88. package/lib/commands/db/diff-refresh-status.d.ts +2 -0
  89. package/lib/commands/db/diff-refresh-status.js +1 -0
  90. package/lib/commands/db/diff.js +1 -1
  91. package/lib/commands/db/index.js +1 -1
  92. package/lib/commands/db/list.js +1 -1
  93. package/lib/commands/db/shared.js +1 -1
  94. package/lib/commands/db/tables.js +1 -1
  95. package/lib/commands/db/test.js +1 -1
  96. package/lib/commands/db/update.js +1 -1
  97. package/lib/commands/doctor.js +1 -1
  98. package/lib/commands/file/index.js +1 -1
  99. package/lib/commands/init/index.js +1 -1
  100. package/lib/commands/issue/index.js +1 -1
  101. package/lib/commands/issue/nudge.js +1 -1
  102. package/lib/commands/issue/report.js +1 -1
  103. package/lib/commands/issue/shared.js +1 -1
  104. package/lib/commands/kb/create.js +1 -1
  105. package/lib/commands/kb/delete.js +1 -1
  106. package/lib/commands/kb/detail.js +1 -1
  107. package/lib/commands/kb/index.js +1 -1
  108. package/lib/commands/kb/list.js +1 -1
  109. package/lib/commands/kb/shared.js +1 -1
  110. package/lib/commands/kb/update.js +1 -1
  111. package/lib/commands/logs/index.js +1 -1
  112. package/lib/commands/menu/asset-update.js +1 -1
  113. package/lib/commands/menu/delete.js +1 -1
  114. package/lib/commands/menu/external-link-create.js +1 -1
  115. package/lib/commands/menu/external-link-update.js +1 -1
  116. package/lib/commands/menu/group-create.js +1 -1
  117. package/lib/commands/menu/group-update.js +1 -1
  118. package/lib/commands/menu/index.js +1 -1
  119. package/lib/commands/menu/list.js +1 -1
  120. package/lib/commands/menu/move.js +1 -1
  121. package/lib/commands/menu/regroup-start.js +1 -1
  122. package/lib/commands/menu/rename.js +1 -1
  123. package/lib/commands/menu/shared/compare-table.js +1 -1
  124. package/lib/commands/menu/shared/delete-plan.js +1 -1
  125. package/lib/commands/menu/shared/facts.js +1 -1
  126. package/lib/commands/menu/shared/index.js +1 -1
  127. package/lib/commands/menu/shared/inquirer.js +1 -1
  128. package/lib/commands/menu/shared/local-pages.js +1 -1
  129. package/lib/commands/menu/shared/logic.js +1 -1
  130. package/lib/commands/menu/shared/mutations.js +1 -1
  131. package/lib/commands/menu/shared/service.js +1 -1
  132. package/lib/commands/menu/shared/sync-core.js +1 -1
  133. package/lib/commands/menu/shared/update-core.js +1 -1
  134. package/lib/commands/menu/shared/valid-url.js +1 -1
  135. package/lib/commands/menu/sync.js +1 -1
  136. package/lib/commands/notification/config-create.d.ts +2 -0
  137. package/lib/commands/notification/config-create.js +1 -0
  138. package/lib/commands/notification/config-delete.d.ts +2 -0
  139. package/lib/commands/notification/config-delete.js +1 -0
  140. package/lib/commands/notification/config-list.js +1 -1
  141. package/lib/commands/notification/config-update.d.ts +2 -0
  142. package/lib/commands/notification/config-update.js +1 -0
  143. package/lib/commands/notification/index.js +1 -1
  144. package/lib/commands/notification/shared.d.ts +97 -0
  145. package/lib/commands/notification/shared.js +1 -0
  146. package/lib/commands/ocr/index.js +1 -1
  147. package/lib/commands/page/generate-start.js +1 -1
  148. package/lib/commands/page/generate-status.js +1 -1
  149. package/lib/commands/page/index.js +1 -1
  150. package/lib/commands/page/pull.js +1 -1
  151. package/lib/commands/page/push.js +1 -1
  152. package/lib/commands/page/react/create.js +1 -1
  153. package/lib/commands/page/react/detail.js +1 -1
  154. package/lib/commands/page/react/list.js +1 -1
  155. package/lib/commands/page/react/publish.js +1 -1
  156. package/lib/commands/page/react/shared.js +1 -1
  157. package/lib/commands/page/react/syntax.js +1 -1
  158. package/lib/commands/page/react/template.js +1 -1
  159. package/lib/commands/page/react/update.js +1 -1
  160. package/lib/commands/page/relation-audit.js +1 -1
  161. package/lib/commands/page/restore.js +1 -1
  162. package/lib/commands/page/shared.js +1 -1
  163. package/lib/commands/page/standard-page-status.js +1 -1
  164. package/lib/commands/page/sync.js +1 -1
  165. package/lib/commands/permit/index.js +1 -1
  166. package/lib/commands/permit/page-get.js +1 -1
  167. package/lib/commands/permit/page-set.js +1 -1
  168. package/lib/commands/permit/role-apis-set.js +1 -1
  169. package/lib/commands/permit/role-menus-set.js +1 -1
  170. package/lib/commands/permit/role-menus.js +1 -1
  171. package/lib/commands/permit/shared.js +1 -1
  172. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  173. package/lib/commands/project/create/format-elapsed.js +1 -1
  174. package/lib/commands/project/create/main.d.ts +1 -0
  175. package/lib/commands/project/create/main.js +1 -1
  176. package/lib/commands/project/create/materialize-project-template.d.ts +11 -0
  177. package/lib/commands/project/create/materialize-project-template.js +1 -0
  178. package/lib/commands/project/create/project-name.d.ts +2 -0
  179. package/lib/commands/project/create/project-name.js +1 -0
  180. package/lib/commands/project/create/project-template-archive.d.ts +6 -0
  181. package/lib/commands/project/create/project-template-archive.js +1 -0
  182. package/lib/commands/project/create/project-template-path.d.ts +1 -3
  183. package/lib/commands/project/create/project-template-path.js +1 -1
  184. package/lib/commands/project/create/use-copy-project-template.d.ts +2 -1
  185. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  186. package/lib/commands/project/create/use-format-code.js +1 -1
  187. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  188. package/lib/commands/project/index.js +1 -1
  189. package/lib/commands/project/upgrade.js +1 -1
  190. package/lib/commands/registry.js +1 -1
  191. package/lib/commands/role/create.js +1 -1
  192. package/lib/commands/role/delete.js +1 -1
  193. package/lib/commands/role/detail.js +1 -1
  194. package/lib/commands/role/index.js +1 -1
  195. package/lib/commands/role/list.js +1 -1
  196. package/lib/commands/role/shared.js +1 -1
  197. package/lib/commands/role/update.js +1 -1
  198. package/lib/commands/role/user-add.js +1 -1
  199. package/lib/commands/role/user-remove.js +1 -1
  200. package/lib/commands/role/user-resolve.js +1 -1
  201. package/lib/commands/run/index.js +1 -1
  202. package/lib/commands/schema.js +1 -1
  203. package/lib/commands/sql/create.js +1 -1
  204. package/lib/commands/sql/delete.js +1 -1
  205. package/lib/commands/sql/detail.js +1 -1
  206. package/lib/commands/sql/exec.js +1 -1
  207. package/lib/commands/sql/index.js +1 -1
  208. package/lib/commands/sql/list.js +1 -1
  209. package/lib/commands/sql/pull.js +1 -1
  210. package/lib/commands/sql/push.js +1 -1
  211. package/lib/commands/sql/shared.js +1 -1
  212. package/lib/commands/sql/status.js +1 -1
  213. package/lib/commands/sql/validate.js +1 -1
  214. package/lib/commands/task/index.js +1 -1
  215. package/lib/commands/task/status.js +1 -1
  216. package/lib/commands/tenant/index.js +1 -1
  217. package/lib/commands/tenant/members-list.js +1 -1
  218. package/lib/commands/tenant/shared.js +1 -1
  219. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  220. package/lib/commands/user-account/index.js +1 -1
  221. package/lib/commands/workspace/add.js +1 -1
  222. package/lib/commands/workspace/index.js +1 -1
  223. package/lib/commands/workspace/remove.js +1 -1
  224. package/lib/config/schema.js +1 -1
  225. package/lib/constant/cdn.d.ts +2 -0
  226. package/lib/constant/cdn.js +1 -1
  227. package/lib/constant/cli.js +1 -1
  228. package/lib/constant/defaults.js +1 -1
  229. package/lib/constant/domain.js +1 -1
  230. package/lib/constant/env.js +1 -1
  231. package/lib/constant/output.js +1 -1
  232. package/lib/constant/paths.js +1 -1
  233. package/lib/constant/risk.js +1 -1
  234. package/lib/context/app-resolver.js +1 -1
  235. package/lib/context/auth-resolver.js +1 -1
  236. package/lib/context/config-loader.js +1 -1
  237. package/lib/context.d.ts +1 -1
  238. package/lib/context.js +1 -1
  239. package/lib/core/alias-resolver.js +1 -1
  240. package/lib/core/api-client.d.ts +29 -2
  241. package/lib/core/api-client.js +1 -1
  242. package/lib/core/bff/config.js +1 -1
  243. package/lib/core/bff/file-system.js +1 -1
  244. package/lib/core/bff/hash.js +1 -1
  245. package/lib/core/bff/lock.js +1 -1
  246. package/lib/core/bff/utils.js +1 -1
  247. package/lib/core/db-resolver.js +1 -1
  248. package/lib/core/page/file-system.js +1 -1
  249. package/lib/core/page/hash.js +1 -1
  250. package/lib/core/page/lock.js +1 -1
  251. package/lib/core/sql-index-auditor.js +1 -1
  252. package/lib/core/sql-sync/config.js +1 -1
  253. package/lib/core/sql-sync/file-system.js +1 -1
  254. package/lib/core/sql-sync/hash.js +1 -1
  255. package/lib/core/sql-sync/lock.js +1 -1
  256. package/lib/core/sql-sync/utils.js +1 -1
  257. package/lib/core/sql-validator.js +1 -1
  258. package/lib/errors.js +1 -1
  259. package/lib/framework/build-all-flags.js +1 -1
  260. package/lib/framework/error-output.js +1 -1
  261. package/lib/framework/explicit-yes.js +1 -1
  262. package/lib/framework/flags.js +1 -1
  263. package/lib/framework/help.js +1 -1
  264. package/lib/framework/index.js +1 -1
  265. package/lib/framework/output.js +1 -1
  266. package/lib/framework/response.js +1 -1
  267. package/lib/framework/runner-alias.js +1 -1
  268. package/lib/framework/runner.js +1 -1
  269. package/lib/framework/schema-export.js +1 -1
  270. package/lib/framework/types.js +1 -1
  271. package/lib/generated/build-info.d.ts +4 -4
  272. package/lib/generated/build-info.js +1 -1
  273. package/lib/help.js +1 -1
  274. package/lib/postinstall.js +1 -1
  275. package/lib/runtime/confirmation.js +1 -1
  276. package/lib/runtime/event.js +1 -1
  277. package/lib/runtime/index.js +1 -1
  278. package/lib/runtime/queue.js +1 -1
  279. package/lib/runtime/resolve.js +1 -1
  280. package/lib/skills/builtin-skill.js +1 -1
  281. package/lib/skills/main.js +1 -1
  282. package/lib/skills/npx-skills-add.js +1 -1
  283. package/lib/skills/skill-presence.js +1 -1
  284. package/lib/telemetry/cli-command-trace.js +1 -1
  285. package/lib/telemetry/cli-help-trace.js +1 -1
  286. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  287. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  288. package/lib/telemetry/send-cli-trace-log.js +1 -1
  289. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  290. package/lib/utils/ai_config.js +1 -1
  291. package/lib/utils/apply-jq-filter.js +1 -1
  292. package/lib/utils/cdn-config.js +1 -1
  293. package/lib/utils/check-sdk-version.js +1 -1
  294. package/lib/utils/cli-version-check.js +1 -1
  295. package/lib/utils/cli-version-policy.d.ts +13 -0
  296. package/lib/utils/cli-version-policy.js +1 -1
  297. package/lib/utils/config.js +1 -1
  298. package/lib/utils/entity-with-id.js +1 -1
  299. package/lib/utils/file-utils.js +1 -1
  300. package/lib/utils/guides-cdn.js +1 -1
  301. package/lib/utils/http-client.js +1 -1
  302. package/lib/utils/is-non-interactive.js +1 -1
  303. package/lib/utils/logger.js +1 -1
  304. package/lib/utils/params.js +1 -1
  305. package/lib/utils/platform.js +1 -1
  306. package/lib/utils/rules-cdn.js +1 -1
  307. package/lib/utils/sleep.js +1 -1
  308. package/lib/utils/template-replacer.js +1 -1
  309. package/lib/utils/update-notice.js +1 -1
  310. package/lib/utils/version.js +1 -1
  311. package/lib/utils/with-active-cookie.js +1 -1
  312. package/lib/utils/write-cli-side-channel.js +1 -1
  313. package/package.json +9 -4
  314. package/skills/rabetbase/SKILL.md +33 -22
  315. package/skills/rabetbase/guides/backend-function.md +5 -3
  316. package/skills/rabetbase/guides/bff-creation-workflow.md +2 -2
  317. package/skills/rabetbase/guides/conflict-detection.md +2 -2
  318. package/skills/rabetbase/guides/database-connection-workflow.md +39 -5
  319. package/skills/rabetbase/guides/react-custom-page-workflow.md +16 -4
  320. package/skills/rabetbase/guides/sql-creation-workflow.md +4 -2
  321. package/skills/rabetbase/guides/sql-mybatis.md +2 -2
  322. package/skills/rabetbase/knowledge/page-schema/YtPage.md +3 -37
  323. package/skills/rabetbase/knowledge/react-page/generation-standards.md +14 -3
  324. package/skills/rabetbase/references/rabetbase-app-config.md +2 -2
  325. package/skills/rabetbase/references/rabetbase-bff-push.md +4 -5
  326. package/skills/rabetbase/references/rabetbase-bff-save.md +3 -3
  327. package/skills/rabetbase/references/rabetbase-config.md +2 -2
  328. package/skills/rabetbase/references/rabetbase-db-analyze.md +2 -2
  329. package/skills/rabetbase/references/rabetbase-db-detail.md +3 -0
  330. package/skills/rabetbase/references/rabetbase-db-diff-refresh.md +53 -0
  331. package/skills/rabetbase/references/rabetbase-db-diff.md +40 -21
  332. package/skills/rabetbase/references/rabetbase-db-list.md +1 -1
  333. package/skills/rabetbase/references/rabetbase-kb.md +5 -3
  334. package/skills/rabetbase/references/rabetbase-menu-asset-update.md +9 -10
  335. package/skills/rabetbase/references/rabetbase-menu-external-link-update.md +1 -3
  336. package/skills/rabetbase/references/rabetbase-menu-regroup-start.md +2 -3
  337. package/skills/rabetbase/references/rabetbase-notification-config-list.md +2 -2
  338. package/skills/rabetbase/references/rabetbase-notification-config-mutations.md +56 -0
  339. package/skills/rabetbase/references/rabetbase-page-react-detail.md +1 -1
  340. package/skills/rabetbase/references/rabetbase-page-react-list.md +1 -1
  341. package/skills/rabetbase/references/rabetbase-page-react-publish.md +2 -2
  342. package/skills/rabetbase/references/rabetbase-project-create.md +3 -0
  343. package/skills/rabetbase/references/rabetbase-run.md +1 -1
  344. package/skills/rabetbase/references/rabetbase-sql-create.md +1 -1
  345. package/skills/rabetbase/references/rabetbase-sql-push.md +3 -4
  346. package/skills/rabetbase/references/rabetbase-user-account.md +0 -1
  347. package/skills/rabetbase.manifest.json +5 -5
  348. package/templates/README.md +14 -2
  349. package/lib/commands/project/create/non-interactive.d.ts +0 -9
  350. package/lib/commands/project/create/non-interactive.js +0 -1
  351. package/lib/utils/copy-directory.d.ts +0 -1
  352. package/lib/utils/copy-directory.js +0 -1
  353. package/skills/rabetbase/knowledge/page-schema/LrSmartEcharts.md +0 -291
  354. package/skills/rabetbase/knowledge/page-schema/LrSmartStatistic.md +0 -223
  355. package/templates/projects/sub-app-react-demo/.prettierrc +0 -1
  356. package/templates/projects/sub-app-react-demo/CHANGELOG.md +0 -67
  357. package/templates/projects/sub-app-react-demo/README.md +0 -246
  358. package/templates/projects/sub-app-react-demo/docs/quick-start.md +0 -245
  359. package/templates/projects/sub-app-react-demo/index.html +0 -27
  360. package/templates/projects/sub-app-react-demo/package.json +0 -34
  361. package/templates/projects/sub-app-react-demo/public/logo.svg +0 -1
  362. package/templates/projects/sub-app-react-demo/public/vite.svg +0 -1
  363. package/templates/projects/sub-app-react-demo/src/api/api.ts +0 -26
  364. package/templates/projects/sub-app-react-demo/src/api/client.ts +0 -32
  365. package/templates/projects/sub-app-react-demo/src/components/demo-page-container/DemoPageContainer.module.css +0 -28
  366. package/templates/projects/sub-app-react-demo/src/components/demo-page-container/DemoPageContainer.tsx +0 -55
  367. package/templates/projects/sub-app-react-demo/src/layouts/MainLayout.tsx +0 -308
  368. package/templates/projects/sub-app-react-demo/src/main.tsx +0 -52
  369. package/templates/projects/sub-app-react-demo/src/pages/dashboard/index.tsx +0 -570
  370. package/templates/projects/sub-app-react-demo/src/pages/data-screen/index.tsx +0 -531
  371. package/templates/projects/sub-app-react-demo/src/pages/index.module.css +0 -500
  372. package/templates/projects/sub-app-react-demo/src/pages/index.tsx +0 -641
  373. package/templates/projects/sub-app-react-demo/src/pages/sdk-demo/index.tsx +0 -536
  374. package/templates/projects/sub-app-react-demo/src/pages/workbench/index.module.css +0 -295
  375. package/templates/projects/sub-app-react-demo/src/pages/workbench/index.tsx +0 -242
  376. package/templates/projects/sub-app-react-demo/src/router/index.tsx +0 -30
  377. package/templates/projects/sub-app-react-demo/src/style.css +0 -108
  378. package/templates/projects/sub-app-react-demo/src/utils/api.ts +0 -12
  379. package/templates/projects/sub-app-react-demo/src/vite-env.d.ts +0 -2
  380. package/templates/projects/sub-app-react-demo/tsconfig.json +0 -26
  381. package/templates/projects/sub-app-react-demo/vite.config.ts +0 -111
@@ -0,0 +1,56 @@
1
+ # rabetbase notification config-create / config-update / config-delete
2
+
3
+ 管理当前应用的应用级通知配置。它们使用应用级 `configCode`;数据集级通知通道的 `channelCode` 不能作为这些命令的输入,也不能替代 `configCode`。
4
+
5
+ ## 命令与风险
6
+
7
+ ```bash
8
+ rabetbase notification config-create --file notification.json --dry-run --format compress
9
+ rabetbase notification config-create --file notification.json --format compress
10
+
11
+ rabetbase notification config-update --id 88 --from-env NOTIFICATION_CONFIG_JSON --dry-run --format compress
12
+ rabetbase notification config-update --id 88 --from-env NOTIFICATION_CONFIG_JSON --yes --format compress
13
+
14
+ rabetbase notification config-delete --id 88 --dry-run --format compress
15
+ rabetbase notification config-delete --id 88 --yes --format compress
16
+ ```
17
+
18
+ * `config-create` 是 `write`:支持 `--dry-run`,预览后可执行。
19
+ * `config-update --id <id>` 和 `config-delete --id <id>` 是 `high-risk-write`:强烈建议先运行 `--dry-run`,正式执行必须显式添加 `--yes`。
20
+ * 删除应用级配置可能使引用它的数据集级通道不可用;CLI 不会验证引用关系。先确认影响范围再删除。
21
+
22
+ ## 安全 JSON 输入
23
+
24
+ create 和 update 必须在下列来源中恰好一个:`--file <path>`、`--stdin` 或 `--from-env <NAME>`。不得同时使用多个来源,也不要把敏感 JSON 放进命令行参数。
25
+
26
+ 输入 JSON 是 CLI 文档,不是服务端原始 DTO。允许的顶层字段只有:
27
+
28
+ ```json
29
+ {
30
+ "configName": "Technical alerts",
31
+ "channelType": "FEISHU",
32
+ "endpointUrl": "<sensitive endpoint>",
33
+ "channelConfig": { "credential": "<sensitive value>" },
34
+ "description": "Technical alert bot",
35
+ "connectTimeout": 5000,
36
+ "readTimeout": 10000
37
+ }
38
+ ```
39
+
40
+ `channelConfig` 必须是 JSON 对象,CLI 会将其序列化为服务端所需格式。`config-create` 必须提供非空 `configName` 和 `channelType`;`config-update` 至少提供一个允许字段。支持类型:`EMAIL`、`FEISHU`、`DINGTALK`、`WECOM`、`WEBHOOK`。
41
+
42
+ 禁止提交 `id`、`appCode`、`configCode`、`channelCode` 或任何未知顶层字段。服务端负责渠道专有的 endpoint 与凭据规则。显式 `null` 可清空可选字符串;`connectTimeout` 或 `readTimeout` 为 `null` 会恢复服务端默认超时:`connectTimeout` 为 `5000`、`readTimeout` 为 `10000`。
43
+
44
+ ## 输出与结果确认
45
+
46
+ 预览和执行均返回 `operation`、`selector`、`before`、`after`、`dryRun`、`backend`、`warnings`、`verification`。输出不包含真实 `endpointUrl`、webhook token、SMTP 凭据、`channelConfig`、环境变量值、stdin 内容或文件内容;已设置的敏感字段显示为 `<redacted>`。
47
+
48
+ update 会读取精确 ID 并合并补丁,省略的字段及服务端已脱敏的敏感字段都会保留。create 和 update 按精确 ID 回读确认;delete 按删除前的 `channelType` 列表确认 ID 不存在。
49
+
50
+ 请求结果未知、网络中断或回读无法证明结果时,不得自动重提。只执行只读查询:
51
+
52
+ ```bash
53
+ rabetbase notification config-list --appcode app-xxxxx --type FEISHU --format compress
54
+ ```
55
+
56
+ 根据返回的 `configName`、`description`、`configCode` 与操作前记录人工确认后再决定下一步。
@@ -21,6 +21,6 @@ rabetbase page react-detail --id <pageId> --format compress
21
21
 
22
22
  - `pageUrl`:查看最新保存内容的页面地址,包含尚未发布的修改
23
23
  - `runtimePageUrl`:查看已发布内容的页面地址,仅在有已发布内容时返回;格式为 `https://<appCode>.app.lovrabet.com/<pageCode>`(线上)或 `https://<appCode>.daily.lovrabet.com/<pageCode>`(日常)
24
- - `editPageUrl`:打开页面编辑器的地址,可继续修改页面;格式为 `https://<env>.lovrabet.com/web-app/app/<appCode>/ide/<pageId>`(线上为 `app.lovrabet.com`,日常为 `daily.lovrabet.com`)
24
+ - `editPageUrl`:打开页面编辑器的地址,可继续修改页面;线上为 `https://app.lovrabet.com/app/<appCode>/ide/<pageId>`,日常为 `https://daily.lovrabet.com/web-app/app/<appCode>/ide/<pageId>`
25
25
 
26
26
  `data.codeContent` 是当前完整页面文件,可在本地完成新增、修改或删除后,作为 `page react-update --page-content <json>` 的完整页面内容提交。
@@ -20,4 +20,4 @@ rabetbase page react-list --appcode <appCode> --format json
20
20
 
21
21
  - `label`:页面名称
22
22
  - `pageUrl`:查看最新保存内容的页面地址,包含尚未发布的修改;日常为 `https://daily.lovrabet.com/web-app/app/<appCode>/pages/<path>`,线上为 `https://app.lovrabet.com/app/<appCode>/pages/<path>`
23
- - `editPageUrl`:打开页面编辑器的地址,可继续修改页面;线上域名为 `app.lovrabet.com`,日常域名为 `daily.lovrabet.com`
23
+ - `editPageUrl`:打开页面编辑器的地址,可继续修改页面;线上为 `https://app.lovrabet.com/app/<appCode>/ide/<pageId>`,日常为 `https://daily.lovrabet.com/web-app/app/<appCode>/ide/<pageId>`
@@ -4,7 +4,7 @@
4
4
 
5
5
  ```bash
6
6
  rabetbase page react-publish --id <pageId> --dry-run --format compress
7
- rabetbase page react-publish --id <pageId> --remark "发布说明" --yes
7
+ rabetbase page react-publish --id <pageId> --remark "发布说明"
8
8
  ```
9
9
 
10
10
  ## 参数
@@ -19,5 +19,5 @@ rabetbase page react-publish --id <pageId> --remark "发布说明" --yes
19
19
  1. 先使用 `page react-detail` 检查 `status` 和页面版本
20
20
  2. `status` 为 `FORMAL` 时表示当前内容已经发布,跳过发布,继续查看已发布页面或后续流程
21
21
  3. `status` 不是 `FORMAL` 时,使用 `--dry-run` 确认目标页面和发布备注
22
- 4. 用户明确确认后,使用相同参数加 `--yes` 执行发布
22
+ 4. 审阅预览后,使用相同参数移除 `--dry-run` 执行发布
23
23
  5. 命令发布后回读确认 `data.after.status` 为 `FORMAL`;`data.runtimePageUrl` 查看最近一次已发布内容,`data.pageUrl` 查看最新保存内容(包含尚未发布的修改),`data.editPageUrl` 用于打开页面编辑器。
@@ -38,6 +38,9 @@ rabetbase project create my-project --appcode <code> --env production
38
38
 
39
39
  - `--name` 和位置参数二选一,`--name` 优先
40
40
  - 非交互模式下缺少项目名会报错
41
+ - 项目名只接受字母、数字、`-`、`_`,不能传绝对路径、`../`、子目录路径或 Windows 保留名称
42
+ - 交互与非交互模式使用同一创建流程,都会安装依赖、格式化代码并写入项目配置
43
+ - 项目模板从 CDN 下载并校验 SHA-256;CDN 不可用、模板不兼容或校验失败时命令停止,修复后重试
41
44
  - 新项目中的 `.rabetbase.json` **只继承**全局中的少量偏好(如 `cookie`、`accessKey`、`locale`、`format`、`riskLevel`),**不会**把全局的 `apps` / `defaultApp` 复制进新项目
42
45
 
43
46
  ## 参考
@@ -2,7 +2,7 @@
2
2
 
3
3
  执行 `package.json` 中定义的脚本。
4
4
 
5
- > **风险等级:high-risk-write** — 任意 package script 都可能修改本地文件、调用远端服务或执行发布动作。独立 CLI 需要人工提升顶层 `riskLevel`,正式执行还需交互确认或显式传 `--yes`;嵌入式 Rabetbase 工具暂不开放 `run`。
5
+ > **风险等级:write** — 任意 package script 都可能修改本地文件、调用远端服务或执行发布动作。执行前必须先审阅 `package.json` 中对应脚本;嵌入式 Rabetbase 工具暂不开放 `run`。
6
6
 
7
7
  ## 命令
8
8
 
@@ -33,7 +33,7 @@ rabetbase sql create --name getUserMapper --db-id 10001 --mode mybatisXml --form
33
33
  ## 提示
34
34
 
35
35
  - 团队长期维护 SQL 时,用 `sql create` 建立本地同步资产
36
- - 生成后通常继续执行:编辑本地文件 → `sql validate --file ...` → `sql status` → `sql push --sqlcode ... --dry-run` → `sql push --sqlcode ... --yes`
36
+ - 生成后通常继续执行:编辑本地文件 → `sql validate --file ...` → `sql status` → `sql push --sqlcode ... --dry-run` → `sql push --sqlcode ...`
37
37
 
38
38
  ## 参考
39
39
 
@@ -2,15 +2,15 @@
2
2
 
3
3
  将本地同步目录中的 SQL 文件上传到远端,并刷新 `.rabetbase/sql.lock.json`。
4
4
 
5
- > **风险等级:high-risk-write** — 建议先 `--dry-run` 预览;正式执行需 `--yes` 或交互确认。
5
+ > **风险等级:write** — 建议先 `--dry-run` 预览。
6
6
 
7
7
  ## 命令
8
8
 
9
9
  ```bash
10
10
  rabetbase sql push --format json
11
11
  rabetbase sql push --sqlcode 2305f915-dd48cd4c --dry-run --format json
12
- rabetbase sql push --sqlcode 2305f915-dd48cd4c --yes --format json
13
- rabetbase sql push --sqlcode 2305f915-dd48cd4c --force --yes --format json
12
+ rabetbase sql push --sqlcode 2305f915-dd48cd4c --format json
13
+ rabetbase sql push --sqlcode 2305f915-dd48cd4c --force --format json
14
14
  ```
15
15
 
16
16
  ## 参数
@@ -20,7 +20,6 @@ rabetbase sql push --sqlcode 2305f915-dd48cd4c --force --yes --format json
20
20
  | `--sqlcode <code>` | string | 否 | — | 仅推指定 SQL;不传则扫描当前应用同步目录下的全部 SQL |
21
21
  | `--force` | boolean | 否 | — | 即使本地 hash 与 lock 一致也强制推送 |
22
22
  | `--dry-run` | boolean | 否 | — | 仅预览会推哪些 SQL |
23
- | `--yes` | boolean | 否 | — | 跳过高风险确认 |
24
23
  | `--format <fmt>` | string | 否 | `compress` | 输出格式 |
25
24
 
26
25
  ## 行为说明
@@ -18,7 +18,6 @@ rabetbase user-account dingding-sandbox-bind \
18
18
  ```bash
19
19
  rabetbase user-account dingding-sandbox-bind \
20
20
  --ding-talk-user-id <id> \
21
- --yes \
22
21
  --format compress
23
22
  ```
24
23
 
@@ -2,8 +2,8 @@
2
2
  "schemaVersion": 1,
3
3
  "name": "rabetbase",
4
4
  "packageName": "@lovrabet/rabetbase-cli",
5
- "packageVersion": "2.4.3",
6
- "skillVersion": "2.4.3",
5
+ "packageVersion": "2.4.4",
6
+ "skillVersion": "2.4.4",
7
7
  "files": [
8
8
  "SKILL.md",
9
9
  "guides/backend-function.md",
@@ -24,10 +24,8 @@
24
24
  "guides/typescript-sdk.md",
25
25
  "knowledge/page-schema/LrSmartCreate.md",
26
26
  "knowledge/page-schema/LrSmartDetail.md",
27
- "knowledge/page-schema/LrSmartEcharts.md",
28
27
  "knowledge/page-schema/LrSmartFilter.md",
29
28
  "knowledge/page-schema/LrSmartJsx.md",
30
- "knowledge/page-schema/LrSmartStatistic.md",
31
29
  "knowledge/page-schema/LrSmartTable.md",
32
30
  "knowledge/page-schema/YtPage.md",
33
31
  "knowledge/page-schema/dataset-relations.md",
@@ -72,6 +70,7 @@
72
70
  "references/rabetbase-db-create.md",
73
71
  "references/rabetbase-db-delete.md",
74
72
  "references/rabetbase-db-detail.md",
73
+ "references/rabetbase-db-diff-refresh.md",
75
74
  "references/rabetbase-db-diff.md",
76
75
  "references/rabetbase-db-list.md",
77
76
  "references/rabetbase-db-tables.md",
@@ -94,6 +93,7 @@
94
93
  "references/rabetbase-menu-rename.md",
95
94
  "references/rabetbase-menu-sync.md",
96
95
  "references/rabetbase-notification-config-list.md",
96
+ "references/rabetbase-notification-config-mutations.md",
97
97
  "references/rabetbase-ocr.md",
98
98
  "references/rabetbase-page-generate-start.md",
99
99
  "references/rabetbase-page-generate-status.md",
@@ -133,5 +133,5 @@
133
133
  "references/rabetbase-user-account.md",
134
134
  "references/rabetbase-workspace.md"
135
135
  ],
136
- "digest": "9e57a32f5a9e30bb30673391d04d0c4edee23256e99dea09385a44c6ebb6edd6"
136
+ "digest": "0fa179d9f806b51f8345de375831234c44fb7c70f50bb7cadebe0cf70fd6d89d"
137
137
  }
@@ -20,7 +20,7 @@ templates/
20
20
 
21
21
  ### 远程模板同步
22
22
 
23
- `projects/sub-app-react-demo/` 目录是从模板真源仓同步来的快照:
23
+ `projects/sub-app-react-demo/` 目录是从模板真源仓同步来的 CDN 构建源:
24
24
  **仓库地址**: https://github.com/lovrabet/sub-app-react-demo
25
25
 
26
26
  #### 开发者:同步模板
@@ -31,9 +31,20 @@ templates/
31
31
  npm run sync-template
32
32
  ```
33
33
 
34
+ 模板同步完成后,更新模板自身的 `package.json#version`,再生成待发布的 CDN 资产:
35
+
36
+ ```bash
37
+ npm run sync:cdn
38
+ ```
39
+
40
+ 该命令会在 `dist/rabetbase-cli/templates/projects/` 下生成
41
+ `sub-app-react-demo.zip`,并把版本、文件名、大小和 SHA-256 写入现有
42
+ `dist/rabetbase-cli/config/index.json`。ZIP 使用固定地址,每次发布直接覆盖。
43
+
34
44
  ### 模板结构
35
45
 
36
46
  项目模板应维护以下结构:
47
+
37
48
  - 标准的 React + Vite 设置
38
49
  - Ant Design 集成
39
50
  - icestark 微前端配置
@@ -51,7 +62,8 @@ npm run sync-template
51
62
  ## 注意事项
52
63
 
53
64
  - `templates/projects/sub-app-react-demo/` 是项目模板快照,不是独立 Git 仓
54
- - `rabetbase project create` 会复制项目模板,并更新 `package.json` 与 `.rabetbase.json`
65
+ - `rabetbase project create` CDN 下载 ZIP,然后更新 `package.json` 与 `.rabetbase.json`;此仓库模板不进入 npm 发布包
66
+ - 模板文件名必须兼容 Windows、macOS 和 Linux;禁止符号链接、大小写冲突路径和 Windows 保留名称
55
67
  - 有 AppCode 时,CLI 会重新生成 `src/api/api.ts` 和 `src/api/client.ts`
56
68
  - 项目模板中不要保留真实 AppCode、真实数据集模型、`.git`、`node_modules`、`dist` 或个人配置
57
69
  - CLI 使用 `TemplateReplacer` 工具处理 `.tpl` 类模板
@@ -1,9 +0,0 @@
1
- /**
2
- * 非交互模式的项目创建逻辑
3
- *
4
- * 用于 CI/CD 环境或没有 TTY 的场景
5
- */
6
- /**
7
- * 非交互模式创建项目
8
- */
9
- export declare function createProjectNonInteractive(projectName: string, env?: string, appCode?: string, cookie?: string): Promise<void>;
@@ -1 +0,0 @@
1
- (function(_0x588482,_0x5d07cc){const _0x4970b3=a163_0x372d,_0x3fa07d=_0x588482();while(!![]){try{const _0x480b38=parseInt(_0x4970b3(0x114))/0x1+-parseInt(_0x4970b3(0x10f))/0x2*(parseInt(_0x4970b3(0x110))/0x3)+parseInt(_0x4970b3(0x102))/0x4+-parseInt(_0x4970b3(0x112))/0x5+-parseInt(_0x4970b3(0x120))/0x6*(-parseInt(_0x4970b3(0xfe))/0x7)+-parseInt(_0x4970b3(0x122))/0x8+-parseInt(_0x4970b3(0x105))/0x9*(-parseInt(_0x4970b3(0x128))/0xa);if(_0x480b38===_0x5d07cc)break;else _0x3fa07d['push'](_0x3fa07d['shift']());}catch(_0x57913d){_0x3fa07d['push'](_0x3fa07d['shift']());}}}(a163_0x269d,0x4775f));import a163_0x66cbc7 from'path';import a163_0x2c993f from'fs/promises';import{existsSync}from'fs';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{exec,execSync}from'child_process';import{copyDirectory}from'../../../utils/copy-directory.js';import{promisify}from'util';function a163_0x372d(_0x7c6a28,_0x431ab3){_0x7c6a28=_0x7c6a28-0xfb;const _0x269dcc=a163_0x269d();let _0x372d5c=_0x269dcc[_0x7c6a28];return _0x372d5c;}import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{readConfig}from'../../../utils/config.js';import{getCliVersion}from'../../../utils/version.js';import{CliErrors}from'../../../errors.js';import{fetchModelList}from'../../../core/api-client.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';function a163_0x269d(){const _0x70097e=['length','301578VFiSPD','Cannot\x20create\x20project\x20in\x20current\x20directory.','3920704nUvntQ','writeFile','Project\x20directory\x20\x22','\x22\x20already\x20exists.','utf-8','modelCount','3466170nORPcM','ignore','\x20\x20rabetbase\x20run\x20start\x0a','validation','\x20api\x20pull`\x20manually\x20later.','bun\x20run\x20format','join','A\x20project\x20created\x20with\x20Lovrabet\x20CLI','belowMinimum','Check\x20directory\x20permissions.','\x20\x20Installing\x20dependencies...','35YsBOwN','description','npm','Project\x20name\x20cannot\x20be\x20empty.','1108180kfptyb','...','\x20\x20√\x20Code\x20formatted','9nOeRJO','resolve','\x20\x20√\x20Configuration\x20file\x20created','chdir','dirname','trim','\x0a\x20\x20cd\x20','production','*\x20Creating\x20project\x20','constants','12142FBOMje','3VjAddd','\x20\x20√\x20Pulled\x20','1189010WVdIrR','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.','151687aQlESM','env','\x20\x20√\x20Project\x20template\x20created','string','cwd','bun\x20--version','Project\x20name\x20contains\x20invalid\x20characters.','name','log','Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','\x20model(s)'];a163_0x269d=function(){return _0x70097e;};return a163_0x269d();}const execAsync=promisify(exec);export async function createProjectNonInteractive(_0x575354,_0x201454,_0x3c9511,_0x54659b){const _0x4c4fef=a163_0x372d,_0xcda2b4=await checkCliVersion();(_0xcda2b4['needsUpgrade']||_0xcda2b4[_0x4c4fef(0xfb)])&&(printCliUpgradeWarning(_0xcda2b4),assertCliVersionSupported(_0xcda2b4));if(!_0x575354||_0x575354[_0x4c4fef(0x10a)]()==='')throw CliErrors[_0x4c4fef(0x12b)](_0x4c4fef(0x101));const _0x488ac0=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x488ac0['test'](_0x575354))throw CliErrors[_0x4c4fef(0x12b)](_0x4c4fef(0x11a),_0x4c4fef(0x11d));if(_0x575354['length']>0x64)throw CliErrors[_0x4c4fef(0x12b)](_0x4c4fef(0x113));const _0x22b9ff=a163_0x66cbc7[_0x4c4fef(0x106)](process[_0x4c4fef(0x118)](),_0x575354);if(existsSync(_0x22b9ff))throw CliErrors[_0x4c4fef(0x12b)](_0x4c4fef(0x124)+_0x575354+_0x4c4fef(0x125),'Use\x20a\x20different\x20project\x20name.');try{const _0x11d25a=a163_0x66cbc7[_0x4c4fef(0x109)](_0x22b9ff);await a163_0x2c993f['access'](_0x11d25a,a163_0x2c993f[_0x4c4fef(0x10e)]['W_OK']);}catch{throw CliErrors[_0x4c4fef(0x12b)](_0x4c4fef(0x121),_0x4c4fef(0xfc));}try{console[_0x4c4fef(0x11c)](_0x4c4fef(0x10d)+_0x575354+_0x4c4fef(0x103));const _0x5bbcc8=getSubAppReactDemoTemplateDir();await copyDirectory(_0x5bbcc8,_0x22b9ff),console[_0x4c4fef(0x11c)](_0x4c4fef(0x116)),await updatePackageJsonName(_0x575354),console[_0x4c4fef(0x11c)]('\x20\x20√\x20package.json\x20updated'),console[_0x4c4fef(0x11c)](_0x4c4fef(0xfd)),console[_0x4c4fef(0x11c)]('\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)'),await formatCode(_0x22b9ff),console[_0x4c4fef(0x11c)](_0x4c4fef(0x104)),await configureProject(_0x575354,_0x3c9511,_0x201454),console[_0x4c4fef(0x11c)](_0x4c4fef(0x107)),_0x3c9511&&await pullApiConfig(_0x22b9ff,_0x3c9511,_0x201454,_0x54659b),console[_0x4c4fef(0x11c)]('\x0a√\x20Project\x20'+_0x575354+'\x20created\x20successfully!'),console[_0x4c4fef(0x11c)](_0x4c4fef(0x10b)+_0x575354),console[_0x4c4fef(0x11c)](_0x4c4fef(0x12a));}catch(_0x76291c){try{existsSync(_0x22b9ff)&&await a163_0x2c993f['rm'](_0x22b9ff,{'recursive':!![],'force':!![]});}catch{}throw _0x76291c;}}async function updatePackageJsonName(_0x5d9981){const _0x573386=a163_0x372d,_0x1d4627=a163_0x66cbc7[_0x573386(0x106)](process[_0x573386(0x118)](),_0x5d9981),_0x5b075f=a163_0x66cbc7[_0x573386(0x12e)](_0x1d4627,'package.json'),_0x27fc4e=await a163_0x2c993f['readFile'](_0x5b075f,_0x573386(0x126)),_0x20624d=JSON['parse'](_0x27fc4e);_0x20624d[_0x573386(0x11b)]=_0x5d9981,_0x20624d[_0x573386(0xff)]=_0x573386(0x12f),await a163_0x2c993f[_0x573386(0x123)](_0x5b075f,JSON['stringify'](_0x20624d,null,0x2)+'\x0a');}function detectPackageManager(){const _0x4d2f1a=a163_0x372d;try{return execSync(_0x4d2f1a(0x119),{'stdio':_0x4d2f1a(0x129)}),'bun';}catch{return _0x4d2f1a(0x100);}}async function formatCode(_0x1ef99e){const _0xdf5901=a163_0x372d;try{await execAsync(_0xdf5901(0x12d),{'cwd':_0x1ef99e});}catch{}}async function configureProject(_0x44d301,_0x3fee08,_0x3b39c1){const _0x4960d7=a163_0x372d,_0x1fb1c3=a163_0x66cbc7['resolve'](process[_0x4960d7(0x118)](),_0x44d301),_0x7b1daf=a163_0x66cbc7[_0x4960d7(0x12e)](_0x1fb1c3,NEW_CONFIG_NAME),_0x503603=readConfig(),_0xa51a8b=typeof _0x503603[_0x4960d7(0x115)]===_0x4960d7(0x117)?_0x503603[_0x4960d7(0x115)]:undefined,_0x18eee1={};for(const _0x582dcb of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x503603[_0x582dcb]!=null)_0x18eee1[_0x582dcb]=_0x503603[_0x582dcb];}const _0x24372b=buildCanonicalProjectConfig(_0x18eee1,{'appCodes':_0x3fee08?[_0x3fee08]:[],'env':_0x3b39c1||_0xa51a8b||_0x4960d7(0x10c),'metadata':{'createdAt':new Date()['toLocaleString'](),'version':getCliVersion()}});writeConfigFile(_0x7b1daf,_0x24372b);}async function pullApiConfig(_0x4cb708,_0x4dff74,_0x3754e4,_0x267dcc){const _0x371d85=a163_0x372d,_0x4dbca7=process['cwd']();try{process[_0x371d85(0x108)](_0x4cb708);const _0x180528=_0x3754e4||'production';initEnv(_0x180528),console[_0x371d85(0x11c)]('\x20\x20Pulling\x20API\x20configuration...');const {configArray:_0x3e1c0b}=await fetchModelList(_0x4dff74,_0x267dcc||''),_0x53ca10=await generateApiFile(_0x3e1c0b,'',_0x4dff74,!![],_0x180528,DEFAULT_API_DIR);console[_0x371d85(0x11c)](_0x371d85(0x111)+_0x3e1c0b[_0x371d85(0x11f)]+'\x20dataset(s),\x20generated\x20'+_0x53ca10[_0x371d85(0x127)]+_0x371d85(0x11e));}catch(_0x198663){console[_0x371d85(0x11c)]('\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`'+CLI_BIN_NAME+_0x371d85(0x12c));}finally{process[_0x371d85(0x108)](_0x4dbca7);}}
@@ -1 +0,0 @@
1
- export declare function copyDirectory(src: string, dest: string): Promise<void>;
@@ -1 +0,0 @@
1
- (function(_0x39b4f5,_0x17520d){const _0x57a78f=a278_0x3ee2,_0x1bd15e=_0x39b4f5();while(!![]){try{const _0xef5286=-parseInt(_0x57a78f(0xa9))/0x1+parseInt(_0x57a78f(0xac))/0x2*(-parseInt(_0x57a78f(0xa8))/0x3)+-parseInt(_0x57a78f(0xab))/0x4*(-parseInt(_0x57a78f(0xae))/0x5)+-parseInt(_0x57a78f(0xa1))/0x6+-parseInt(_0x57a78f(0xa3))/0x7+-parseInt(_0x57a78f(0xb1))/0x8*(parseInt(_0x57a78f(0xa5))/0x9)+parseInt(_0x57a78f(0xaf))/0xa;if(_0xef5286===_0x17520d)break;else _0x1bd15e['push'](_0x1bd15e['shift']());}catch(_0x26f767){_0x1bd15e['push'](_0x1bd15e['shift']());}}}(a278_0x4510,0x7458f));function a278_0x3ee2(_0x5b2e7f,_0x36c115){_0x5b2e7f=_0x5b2e7f-0xa1;const _0x451080=a278_0x4510();let _0x3ee2cf=_0x451080[_0x5b2e7f];return _0x3ee2cf;}function a278_0x4510(){const _0x2c5115=['isDirectory','复制目录时出错:','1491aPHNga','855461ahnwus','mkdirSync','4QElJWi','222LqGFQJ','readdirSync','2310460YRMexs','22619560bctIjN','join','16xRYKiL','3828054KiQxao','name','2349102exmRsp','error','1634697vnMrLX'];a278_0x4510=function(){return _0x2c5115;};return a278_0x4510();}import a278_0x4bfe95 from'node:path';import a278_0x2eaa5a from'node:fs';export async function copyDirectory(_0x1cebe5,_0xc9b0b1){const _0x329f4b=a278_0x3ee2;try{const _0x1b9645=a278_0x2eaa5a[_0x329f4b(0xad)](_0x1cebe5,{'withFileTypes':!![]});a278_0x2eaa5a[_0x329f4b(0xaa)](_0xc9b0b1,{'recursive':!![]});for(const _0x37ee03 of _0x1b9645){const _0x4b23fe=a278_0x4bfe95['join'](_0x1cebe5,_0x37ee03[_0x329f4b(0xa2)]),_0x4e64ae=a278_0x4bfe95[_0x329f4b(0xb0)](_0xc9b0b1,_0x37ee03[_0x329f4b(0xa2)]);_0x37ee03[_0x329f4b(0xa6)]()?await copyDirectory(_0x4b23fe,_0x4e64ae):a278_0x2eaa5a['copyFileSync'](_0x4b23fe,_0x4e64ae);}}catch(_0x56ef22){console[_0x329f4b(0xa4)](_0x329f4b(0xa7),_0x56ef22);}}
@@ -1,291 +0,0 @@
1
- ---
2
- name: LrSmartEcharts
3
- description: LrSmartEcharts 图表组件完整配置
4
- tags: [echarts, chart, page-schema]
5
- ---
6
-
7
- # LrSmartEcharts
8
-
9
- 图表组件,用于数据可视化。
10
-
11
- ---
12
-
13
- ## 禁止事项
14
-
15
- | 禁止 | 说明 |
16
- |------|------|
17
- | 中文别名 | SQL 字段名和 AS 别名必须使用英文 |
18
- | 编造字段 | 只能使用数据集字段列表里的 `code` |
19
- | 无 LIMIT | SQL 必须包含 `LIMIT 1000` |
20
- | 无 GROUP BY | 有聚合函数时必须 GROUP BY 所有非聚合字段 |
21
-
22
- ---
23
-
24
- ## 数据源配置
25
-
26
- 图表数据需要在 `page.dataSource.list` 中定义,组件通过 JSExpression 绑定:
27
-
28
- ```json
29
- // Page 层:dataSource.list 配置(source/method/isCors/timeout 等平台自动补全,无需手写)
30
- {
31
- "id": "chart_data_<nodeId>",
32
- "type": "fetch",
33
- "isInit": true,
34
- "options": {
35
- "uri": "/api/custom/execPreparedSql",
36
- "params": {
37
- "dbId": "<dbId>",
38
- "sqlContent": "SELECT source, COUNT(*) as customer_count FROM <tableName> WHERE 1=1 GROUP BY source LIMIT 1000",
39
- "params": {}
40
- }
41
- }
42
- }
43
-
44
- // Component 层:绑定 state
45
- {
46
- "dataSource": {"type": "JSExpression", "value": "this.state.chart_data_<nodeId>"}
47
- }
48
- ```
49
-
50
- > `<dbId>` 从 dataset_detail_tool 获取,`<tableName>` 为数据集对应的物理表名,`<nodeId>` 为组件节点 ID。
51
-
52
- ---
53
-
54
- ## Props 属性
55
-
56
- ### Agent 生成边界
57
-
58
- `LrSmartEcharts` 运行时消费 `cardItem`,组件内部会固定 `cardItem.display_type = "echarts"` 后透传给 `LrSmartChart`。
59
-
60
- Agent 生成 / 更新规则:
61
-
62
- - 可维护已有的稳定 `cardItem` 结构。
63
- - 只有在已有 dataset、字段 code、SQL 证据充分时,才生成或修改 `query_config`、`echarts_config`。
64
- - 不编造字段、表名、SQL 聚合语义。
65
-
66
- ```json
67
- {
68
- "dataSource": {"type": "JSExpression", "value": "this.state.chart_data_<nodeId>"},
69
- "cardItem": {
70
- "title": "图表标题",
71
- "query_config": {"sqlContent": "...", "datasetId": "<datasetId>"},
72
- "echarts_config": {
73
- "chartType": "bar",
74
- "dataMapping": {...},
75
- "option": {...},
76
- "theme": "default"
77
- }
78
- }
79
- }
80
- ```
81
-
82
- ---
83
-
84
- ## 图表类型
85
-
86
- | chartType | 用途 | dataMapping 要求 |
87
- |-----------|------|------------------|
88
- | bar | 对比、排行 | dimension + metrics |
89
- | line | 趋势分析 | dimension + metrics |
90
- | pie | 占比、构成 | dimension + metrics(单个) |
91
- | bar-horizontal | 横向对比 | dimension + metrics |
92
- | gauge | 单值 KPI | metrics(单个,无 dimension) |
93
- | funnel | 转化漏斗 | dimension + metrics |
94
- | radar | 多维评估 | dimension + metrics(多个) |
95
- | scatter | 相关性分析 | metrics(1-2 个) |
96
-
97
- ---
98
-
99
- ## dataMapping 配置
100
-
101
- ```json
102
- {
103
- "dimension": {"field": "source", "alias": "客户来源"},
104
- "metrics": [
105
- {"field": "customer_count", "alias": "客户数量", "type": "bar", "axis": "left", "stack": "total", "smooth": true, "area": true, "formatter": "(v) => v", "styleFunction": "(v) => {}"}
106
- ]
107
- }
108
- ```
109
-
110
- | 属性 | 说明 |
111
- |------|------|
112
- | dimension.field | 维度字段(X 轴/分组) |
113
- | dimension.alias | 显示名称 |
114
- | metrics[].field | 指标字段(Y 轴/数值) |
115
- | metrics[].alias | 显示名称 |
116
- | metrics[].type | 混合图表:`bar` / `line` |
117
- | metrics[].axis | 双 Y 轴:`left` / `right` |
118
- | metrics[].stack | 堆叠分组名 |
119
- | metrics[].smooth | 平滑曲线(line) |
120
- | metrics[].area | 面积图(line) |
121
- | metrics[].formatter | 格式化函数:`(value) => string` |
122
- | metrics[].styleFunction | 条件样式:`(value) => {color: 'red'}` |
123
-
124
- ---
125
-
126
- ## SQL 规范
127
-
128
- ```sql
129
- SELECT {维度}, {聚合函数 AS 度量}
130
- FROM {tableName}
131
- WHERE 1=1
132
- [AND ...]
133
- [GROUP BY {维度}]
134
- ORDER BY {排序} {ASC|DESC}
135
- LIMIT 1000
136
- ```
137
-
138
- **硬性要求**:
139
- 1. 字段名使用数据集字段的 `code`
140
- 2. AS 别名必须英文
141
- 3. `WHERE 1=1` 必须保留
142
- 4. `LIMIT 1000` 必须存在
143
- 5. 有聚合函数时必须 GROUP BY
144
-
145
- ```sql
146
- -- 示例
147
- SELECT source, COUNT(*) as customer_count
148
- FROM customer
149
- WHERE 1=1
150
- GROUP BY source
151
- ORDER BY customer_count DESC
152
- LIMIT 1000
153
- ```
154
-
155
- ---
156
-
157
- ## 主题
158
-
159
- | theme | 匹配关键词 |
160
- |-------|-----------|
161
- | default | 默认、专业、蓝色 |
162
- | colorful | 丰富、鲜艳、多彩 |
163
- | ocean | 清新、柔和、蓝绿 |
164
- | royal | 高端、紫色、金色 |
165
- | sunset | 暖色、橙色 |
166
- | forest | 绿色、自然 |
167
- | midnight | 深色、大屏 |
168
- | alert | 红色、告警 |
169
- | everyday | 朴素、简约 |
170
- | trendy | 潮流、炫酷 |
171
- | dreamy | 柔和、粉色 |
172
-
173
- ---
174
-
175
- ## 常见配置
176
-
177
- ### 柱状图
178
-
179
- ```json
180
- {
181
- "chartType": "bar",
182
- "dataMapping": {
183
- "dimension": {"field": "source", "alias": "客户来源"},
184
- "metrics": [{"field": "customer_count", "alias": "数量"}]
185
- },
186
- "option": {"xAxis": {"type": "category"}, "yAxis": {"type": "value"}}
187
- }
188
- ```
189
-
190
- ### 饼图(环形)
191
-
192
- ```json
193
- {
194
- "chartType": "pie",
195
- "dataMapping": {"dimension": {"field": "level_name", "alias": "等级"}, "metrics": [{"field": "count", "alias": "数量"}]},
196
- "option": {"series": [{"radius": ["45%", "70%"]}]}
197
- }
198
- ```
199
-
200
- ### 混合图表(柱+线)
201
-
202
- ```json
203
- {
204
- "chartType": "bar",
205
- "dataMapping": {
206
- "dimension": {"field": "month", "alias": "月份"},
207
- "metrics": [
208
- {"field": "sales", "alias": "销售额", "type": "bar"},
209
- {"field": "rate", "alias": "增长率", "type": "line", "axis": "right"}
210
- ]
211
- }
212
- }
213
- ```
214
-
215
- ### 仪表盘
216
-
217
- ```json
218
- {
219
- "chartType": "gauge",
220
- "dataMapping": {"metrics": [{"field": "completion_rate", "alias": "完成率"}]},
221
- "option": {"series": [{"progress": {"show": true}, "axisLine": {"lineStyle": {"width": 18}}}]}
222
- }
223
- ```
224
-
225
- ### 堆叠图表
226
-
227
- ```json
228
- {
229
- "chartType": "bar",
230
- "dataMapping": {
231
- "dimension": {"field": "month", "alias": "月份"},
232
- "metrics": [
233
- {"field": "product_a", "alias": "产品A", "stack": "total"},
234
- {"field": "product_b", "alias": "产品B", "stack": "total"}
235
- ]
236
- }
237
- }
238
- ```
239
-
240
- ### 格式化
241
-
242
- ```json
243
- {"metrics": [{"field": "amount", "alias": "金额", "formatter": "(v) => `¥${v.toLocaleString()}`}]}
244
- {"metrics": [{"field": "rate", "alias": "比率", "formatter": "(v) => `${v}%`"}]}
245
- ```
246
-
247
- ### 条件样式
248
-
249
- ```json
250
- {"metrics": [{"field": "profit", "alias": "利润", "styleFunction": "(v) => v < 0 ? {color:'red'} : {}"}]}
251
- ```
252
-
253
- ---
254
-
255
- ## 常见问题
256
-
257
- | 问题 | 原因 | 解决方案 |
258
- |------|------|----------|
259
- | 图表不显示 | SQL 错误 | 检查 SQL 语法和字段名 |
260
- | 数据不对 | GROUP BY 缺失 | 添加 GROUP BY |
261
- | 字段名错误 | 使用了中文别名 | 使用英文 AS 别名 |
262
- | 查询超时 | 无 LIMIT | 添加 LIMIT 1000 |
263
-
264
- ---
265
-
266
- ## 完整示例
267
-
268
- ```json
269
- {
270
- "componentName": "LrSmartEcharts",
271
- "props": {
272
- "dataSource": {"type": "JSExpression", "value": "this.state.chart_data_<nodeId>"},
273
- "cardItem": {
274
- "title": "客户来源分布",
275
- "query_config": {
276
- "sqlContent": "SELECT source, COUNT(*) as customer_count FROM <tableName> WHERE 1=1 GROUP BY source ORDER BY customer_count DESC LIMIT 1000",
277
- "datasetId": "<datasetId>"
278
- },
279
- "echarts_config": {
280
- "chartType": "bar",
281
- "dataMapping": {
282
- "dimension": {"field": "source", "alias": "客户来源"},
283
- "metrics": [{"field": "customer_count", "alias": "客户数量"}]
284
- },
285
- "option": {"title": {"text": "客户来源分布"}, "xAxis": {"type": "category"}, "yAxis": {"type": "value"}},
286
- "theme": "default"
287
- }
288
- }
289
- }
290
- }
291
- ```