@lovrabet/rabetbase-cli 2.4.3 → 2.4.4-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (381) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/login-success-html.js +1 -1
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/generate.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/api/shared.js +1 -1
  19. package/lib/commands/app/index.js +1 -1
  20. package/lib/commands/app/list.js +1 -1
  21. package/lib/commands/app/members-list.js +1 -1
  22. package/lib/commands/app/remote-directory.js +1 -1
  23. package/lib/commands/app/shared.js +1 -1
  24. package/lib/commands/app-config/delete.js +1 -1
  25. package/lib/commands/app-config/get.js +1 -1
  26. package/lib/commands/app-config/index.js +1 -1
  27. package/lib/commands/app-config/list.js +1 -1
  28. package/lib/commands/app-config/set.js +1 -1
  29. package/lib/commands/app-config/shared.js +1 -1
  30. package/lib/commands/auth/index.js +1 -1
  31. package/lib/commands/bff/create.js +1 -1
  32. package/lib/commands/bff/delete.js +1 -1
  33. package/lib/commands/bff/detail.js +1 -1
  34. package/lib/commands/bff/index.js +1 -1
  35. package/lib/commands/bff/list.js +1 -1
  36. package/lib/commands/bff/pull.js +1 -1
  37. package/lib/commands/bff/push.js +1 -1
  38. package/lib/commands/bff/status.js +1 -1
  39. package/lib/commands/cli-skill/index.js +1 -1
  40. package/lib/commands/cli-update.js +1 -1
  41. package/lib/commands/codegen/index.js +1 -1
  42. package/lib/commands/codegen/sdk.js +1 -1
  43. package/lib/commands/codegen/sql.js +1 -1
  44. package/lib/commands/common/app-registry.js +1 -1
  45. package/lib/commands/common/app-selector.js +1 -1
  46. package/lib/commands/common/async-task.js +1 -1
  47. package/lib/commands/common/dry-run.js +1 -1
  48. package/lib/commands/common/flags.js +1 -1
  49. package/lib/commands/common/local-file.js +1 -1
  50. package/lib/commands/common/validate.js +1 -1
  51. package/lib/commands/config/get.js +1 -1
  52. package/lib/commands/config/index.js +1 -1
  53. package/lib/commands/config/list.js +1 -1
  54. package/lib/commands/config/set.js +1 -1
  55. package/lib/commands/config/shared.js +1 -1
  56. package/lib/commands/data/filter.js +1 -1
  57. package/lib/commands/data/getOne.js +1 -1
  58. package/lib/commands/data/index.js +1 -1
  59. package/lib/commands/data/shared.js +1 -1
  60. package/lib/commands/dataset/business-group-update.js +1 -1
  61. package/lib/commands/dataset/capability.js +1 -1
  62. package/lib/commands/dataset/delete.js +1 -1
  63. package/lib/commands/dataset/detail.js +1 -1
  64. package/lib/commands/dataset/extend-update.js +1 -1
  65. package/lib/commands/dataset/field-update.js +1 -1
  66. package/lib/commands/dataset/generate.js +1 -1
  67. package/lib/commands/dataset/index.js +1 -1
  68. package/lib/commands/dataset/list.js +1 -1
  69. package/lib/commands/dataset/operations.js +1 -1
  70. package/lib/commands/dataset/relation-audit.js +1 -1
  71. package/lib/commands/dataset/relation-create.js +1 -1
  72. package/lib/commands/dataset/relation-delete.js +1 -1
  73. package/lib/commands/dataset/relation-shared.js +1 -1
  74. package/lib/commands/dataset/relation-update.js +1 -1
  75. package/lib/commands/dataset/relations.js +1 -1
  76. package/lib/commands/dataset/rename.js +1 -1
  77. package/lib/commands/dataset/restore.js +1 -1
  78. package/lib/commands/db/analysis-batching.js +1 -1
  79. package/lib/commands/db/analyze-batch-plan.js +1 -1
  80. package/lib/commands/db/analyze-cancel.js +1 -1
  81. package/lib/commands/db/analyze-start.js +1 -1
  82. package/lib/commands/db/analyze-status.js +1 -1
  83. package/lib/commands/db/create.js +1 -1
  84. package/lib/commands/db/delete.js +1 -1
  85. package/lib/commands/db/detail.js +1 -1
  86. package/lib/commands/db/diff-refresh-start.d.ts +2 -0
  87. package/lib/commands/db/diff-refresh-start.js +1 -0
  88. package/lib/commands/db/diff-refresh-status.d.ts +2 -0
  89. package/lib/commands/db/diff-refresh-status.js +1 -0
  90. package/lib/commands/db/diff.js +1 -1
  91. package/lib/commands/db/index.js +1 -1
  92. package/lib/commands/db/list.js +1 -1
  93. package/lib/commands/db/shared.js +1 -1
  94. package/lib/commands/db/tables.js +1 -1
  95. package/lib/commands/db/test.js +1 -1
  96. package/lib/commands/db/update.js +1 -1
  97. package/lib/commands/doctor.js +1 -1
  98. package/lib/commands/file/index.js +1 -1
  99. package/lib/commands/init/index.js +1 -1
  100. package/lib/commands/issue/index.js +1 -1
  101. package/lib/commands/issue/nudge.js +1 -1
  102. package/lib/commands/issue/report.js +1 -1
  103. package/lib/commands/issue/shared.js +1 -1
  104. package/lib/commands/kb/create.js +1 -1
  105. package/lib/commands/kb/delete.js +1 -1
  106. package/lib/commands/kb/detail.js +1 -1
  107. package/lib/commands/kb/index.js +1 -1
  108. package/lib/commands/kb/list.js +1 -1
  109. package/lib/commands/kb/shared.js +1 -1
  110. package/lib/commands/kb/update.js +1 -1
  111. package/lib/commands/logs/index.js +1 -1
  112. package/lib/commands/menu/asset-update.js +1 -1
  113. package/lib/commands/menu/delete.js +1 -1
  114. package/lib/commands/menu/external-link-create.js +1 -1
  115. package/lib/commands/menu/external-link-update.js +1 -1
  116. package/lib/commands/menu/group-create.js +1 -1
  117. package/lib/commands/menu/group-update.js +1 -1
  118. package/lib/commands/menu/index.js +1 -1
  119. package/lib/commands/menu/list.js +1 -1
  120. package/lib/commands/menu/move.js +1 -1
  121. package/lib/commands/menu/regroup-start.js +1 -1
  122. package/lib/commands/menu/rename.js +1 -1
  123. package/lib/commands/menu/shared/compare-table.js +1 -1
  124. package/lib/commands/menu/shared/delete-plan.js +1 -1
  125. package/lib/commands/menu/shared/facts.js +1 -1
  126. package/lib/commands/menu/shared/index.js +1 -1
  127. package/lib/commands/menu/shared/inquirer.js +1 -1
  128. package/lib/commands/menu/shared/local-pages.js +1 -1
  129. package/lib/commands/menu/shared/logic.js +1 -1
  130. package/lib/commands/menu/shared/mutations.js +1 -1
  131. package/lib/commands/menu/shared/service.js +1 -1
  132. package/lib/commands/menu/shared/sync-core.js +1 -1
  133. package/lib/commands/menu/shared/update-core.js +1 -1
  134. package/lib/commands/menu/shared/valid-url.js +1 -1
  135. package/lib/commands/menu/sync.js +1 -1
  136. package/lib/commands/notification/config-create.d.ts +2 -0
  137. package/lib/commands/notification/config-create.js +1 -0
  138. package/lib/commands/notification/config-delete.d.ts +2 -0
  139. package/lib/commands/notification/config-delete.js +1 -0
  140. package/lib/commands/notification/config-list.js +1 -1
  141. package/lib/commands/notification/config-update.d.ts +2 -0
  142. package/lib/commands/notification/config-update.js +1 -0
  143. package/lib/commands/notification/index.js +1 -1
  144. package/lib/commands/notification/shared.d.ts +97 -0
  145. package/lib/commands/notification/shared.js +1 -0
  146. package/lib/commands/ocr/index.js +1 -1
  147. package/lib/commands/page/generate-start.js +1 -1
  148. package/lib/commands/page/generate-status.js +1 -1
  149. package/lib/commands/page/index.js +1 -1
  150. package/lib/commands/page/pull.js +1 -1
  151. package/lib/commands/page/push.js +1 -1
  152. package/lib/commands/page/react/create.js +1 -1
  153. package/lib/commands/page/react/detail.js +1 -1
  154. package/lib/commands/page/react/list.js +1 -1
  155. package/lib/commands/page/react/publish.js +1 -1
  156. package/lib/commands/page/react/shared.js +1 -1
  157. package/lib/commands/page/react/syntax.js +1 -1
  158. package/lib/commands/page/react/template.js +1 -1
  159. package/lib/commands/page/react/update.js +1 -1
  160. package/lib/commands/page/relation-audit.js +1 -1
  161. package/lib/commands/page/restore.js +1 -1
  162. package/lib/commands/page/shared.js +1 -1
  163. package/lib/commands/page/standard-page-status.js +1 -1
  164. package/lib/commands/page/sync.js +1 -1
  165. package/lib/commands/permit/index.js +1 -1
  166. package/lib/commands/permit/page-get.js +1 -1
  167. package/lib/commands/permit/page-set.js +1 -1
  168. package/lib/commands/permit/role-apis-set.js +1 -1
  169. package/lib/commands/permit/role-menus-set.js +1 -1
  170. package/lib/commands/permit/role-menus.js +1 -1
  171. package/lib/commands/permit/shared.js +1 -1
  172. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  173. package/lib/commands/project/create/format-elapsed.js +1 -1
  174. package/lib/commands/project/create/main.d.ts +1 -0
  175. package/lib/commands/project/create/main.js +1 -1
  176. package/lib/commands/project/create/materialize-project-template.d.ts +11 -0
  177. package/lib/commands/project/create/materialize-project-template.js +1 -0
  178. package/lib/commands/project/create/project-name.d.ts +2 -0
  179. package/lib/commands/project/create/project-name.js +1 -0
  180. package/lib/commands/project/create/project-template-archive.d.ts +6 -0
  181. package/lib/commands/project/create/project-template-archive.js +1 -0
  182. package/lib/commands/project/create/project-template-path.d.ts +1 -3
  183. package/lib/commands/project/create/project-template-path.js +1 -1
  184. package/lib/commands/project/create/use-copy-project-template.d.ts +2 -1
  185. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  186. package/lib/commands/project/create/use-format-code.js +1 -1
  187. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  188. package/lib/commands/project/index.js +1 -1
  189. package/lib/commands/project/upgrade.js +1 -1
  190. package/lib/commands/registry.js +1 -1
  191. package/lib/commands/role/create.js +1 -1
  192. package/lib/commands/role/delete.js +1 -1
  193. package/lib/commands/role/detail.js +1 -1
  194. package/lib/commands/role/index.js +1 -1
  195. package/lib/commands/role/list.js +1 -1
  196. package/lib/commands/role/shared.js +1 -1
  197. package/lib/commands/role/update.js +1 -1
  198. package/lib/commands/role/user-add.js +1 -1
  199. package/lib/commands/role/user-remove.js +1 -1
  200. package/lib/commands/role/user-resolve.js +1 -1
  201. package/lib/commands/run/index.js +1 -1
  202. package/lib/commands/schema.js +1 -1
  203. package/lib/commands/sql/create.js +1 -1
  204. package/lib/commands/sql/delete.js +1 -1
  205. package/lib/commands/sql/detail.js +1 -1
  206. package/lib/commands/sql/exec.js +1 -1
  207. package/lib/commands/sql/index.js +1 -1
  208. package/lib/commands/sql/list.js +1 -1
  209. package/lib/commands/sql/pull.js +1 -1
  210. package/lib/commands/sql/push.js +1 -1
  211. package/lib/commands/sql/shared.js +1 -1
  212. package/lib/commands/sql/status.js +1 -1
  213. package/lib/commands/sql/validate.js +1 -1
  214. package/lib/commands/task/index.js +1 -1
  215. package/lib/commands/task/status.js +1 -1
  216. package/lib/commands/tenant/index.js +1 -1
  217. package/lib/commands/tenant/members-list.js +1 -1
  218. package/lib/commands/tenant/shared.js +1 -1
  219. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  220. package/lib/commands/user-account/index.js +1 -1
  221. package/lib/commands/workspace/add.js +1 -1
  222. package/lib/commands/workspace/index.js +1 -1
  223. package/lib/commands/workspace/remove.js +1 -1
  224. package/lib/config/schema.js +1 -1
  225. package/lib/constant/cdn.d.ts +2 -0
  226. package/lib/constant/cdn.js +1 -1
  227. package/lib/constant/cli.js +1 -1
  228. package/lib/constant/defaults.js +1 -1
  229. package/lib/constant/domain.js +1 -1
  230. package/lib/constant/env.js +1 -1
  231. package/lib/constant/output.js +1 -1
  232. package/lib/constant/paths.js +1 -1
  233. package/lib/constant/risk.js +1 -1
  234. package/lib/context/app-resolver.js +1 -1
  235. package/lib/context/auth-resolver.js +1 -1
  236. package/lib/context/config-loader.js +1 -1
  237. package/lib/context.d.ts +1 -1
  238. package/lib/context.js +1 -1
  239. package/lib/core/alias-resolver.js +1 -1
  240. package/lib/core/api-client.d.ts +29 -2
  241. package/lib/core/api-client.js +1 -1
  242. package/lib/core/bff/config.js +1 -1
  243. package/lib/core/bff/file-system.js +1 -1
  244. package/lib/core/bff/hash.js +1 -1
  245. package/lib/core/bff/lock.js +1 -1
  246. package/lib/core/bff/utils.js +1 -1
  247. package/lib/core/db-resolver.js +1 -1
  248. package/lib/core/page/file-system.js +1 -1
  249. package/lib/core/page/hash.js +1 -1
  250. package/lib/core/page/lock.js +1 -1
  251. package/lib/core/sql-index-auditor.js +1 -1
  252. package/lib/core/sql-sync/config.js +1 -1
  253. package/lib/core/sql-sync/file-system.js +1 -1
  254. package/lib/core/sql-sync/hash.js +1 -1
  255. package/lib/core/sql-sync/lock.js +1 -1
  256. package/lib/core/sql-sync/utils.js +1 -1
  257. package/lib/core/sql-validator.js +1 -1
  258. package/lib/errors.js +1 -1
  259. package/lib/framework/build-all-flags.js +1 -1
  260. package/lib/framework/error-output.js +1 -1
  261. package/lib/framework/explicit-yes.js +1 -1
  262. package/lib/framework/flags.js +1 -1
  263. package/lib/framework/help.js +1 -1
  264. package/lib/framework/index.js +1 -1
  265. package/lib/framework/output.js +1 -1
  266. package/lib/framework/response.js +1 -1
  267. package/lib/framework/runner-alias.js +1 -1
  268. package/lib/framework/runner.js +1 -1
  269. package/lib/framework/schema-export.js +1 -1
  270. package/lib/framework/types.js +1 -1
  271. package/lib/generated/build-info.d.ts +4 -4
  272. package/lib/generated/build-info.js +1 -1
  273. package/lib/help.js +1 -1
  274. package/lib/postinstall.js +1 -1
  275. package/lib/runtime/confirmation.js +1 -1
  276. package/lib/runtime/event.js +1 -1
  277. package/lib/runtime/index.js +1 -1
  278. package/lib/runtime/queue.js +1 -1
  279. package/lib/runtime/resolve.js +1 -1
  280. package/lib/skills/builtin-skill.js +1 -1
  281. package/lib/skills/main.js +1 -1
  282. package/lib/skills/npx-skills-add.js +1 -1
  283. package/lib/skills/skill-presence.js +1 -1
  284. package/lib/telemetry/cli-command-trace.js +1 -1
  285. package/lib/telemetry/cli-help-trace.js +1 -1
  286. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  287. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  288. package/lib/telemetry/send-cli-trace-log.js +1 -1
  289. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  290. package/lib/utils/ai_config.js +1 -1
  291. package/lib/utils/apply-jq-filter.js +1 -1
  292. package/lib/utils/cdn-config.js +1 -1
  293. package/lib/utils/check-sdk-version.js +1 -1
  294. package/lib/utils/cli-version-check.js +1 -1
  295. package/lib/utils/cli-version-policy.d.ts +13 -0
  296. package/lib/utils/cli-version-policy.js +1 -1
  297. package/lib/utils/config.js +1 -1
  298. package/lib/utils/entity-with-id.js +1 -1
  299. package/lib/utils/file-utils.js +1 -1
  300. package/lib/utils/guides-cdn.js +1 -1
  301. package/lib/utils/http-client.js +1 -1
  302. package/lib/utils/is-non-interactive.js +1 -1
  303. package/lib/utils/logger.js +1 -1
  304. package/lib/utils/params.js +1 -1
  305. package/lib/utils/platform.js +1 -1
  306. package/lib/utils/rules-cdn.js +1 -1
  307. package/lib/utils/sleep.js +1 -1
  308. package/lib/utils/template-replacer.js +1 -1
  309. package/lib/utils/update-notice.js +1 -1
  310. package/lib/utils/version.js +1 -1
  311. package/lib/utils/with-active-cookie.js +1 -1
  312. package/lib/utils/write-cli-side-channel.js +1 -1
  313. package/package.json +9 -4
  314. package/skills/rabetbase/SKILL.md +33 -22
  315. package/skills/rabetbase/guides/backend-function.md +5 -3
  316. package/skills/rabetbase/guides/bff-creation-workflow.md +2 -2
  317. package/skills/rabetbase/guides/conflict-detection.md +2 -2
  318. package/skills/rabetbase/guides/database-connection-workflow.md +39 -5
  319. package/skills/rabetbase/guides/react-custom-page-workflow.md +16 -4
  320. package/skills/rabetbase/guides/sql-creation-workflow.md +4 -2
  321. package/skills/rabetbase/guides/sql-mybatis.md +2 -2
  322. package/skills/rabetbase/knowledge/page-schema/YtPage.md +3 -37
  323. package/skills/rabetbase/knowledge/react-page/generation-standards.md +14 -3
  324. package/skills/rabetbase/references/rabetbase-app-config.md +2 -2
  325. package/skills/rabetbase/references/rabetbase-bff-push.md +4 -5
  326. package/skills/rabetbase/references/rabetbase-bff-save.md +3 -3
  327. package/skills/rabetbase/references/rabetbase-config.md +2 -2
  328. package/skills/rabetbase/references/rabetbase-db-analyze.md +2 -2
  329. package/skills/rabetbase/references/rabetbase-db-detail.md +3 -0
  330. package/skills/rabetbase/references/rabetbase-db-diff-refresh.md +53 -0
  331. package/skills/rabetbase/references/rabetbase-db-diff.md +40 -21
  332. package/skills/rabetbase/references/rabetbase-db-list.md +1 -1
  333. package/skills/rabetbase/references/rabetbase-kb.md +5 -3
  334. package/skills/rabetbase/references/rabetbase-menu-asset-update.md +9 -10
  335. package/skills/rabetbase/references/rabetbase-menu-external-link-update.md +1 -3
  336. package/skills/rabetbase/references/rabetbase-menu-regroup-start.md +2 -3
  337. package/skills/rabetbase/references/rabetbase-notification-config-list.md +2 -2
  338. package/skills/rabetbase/references/rabetbase-notification-config-mutations.md +56 -0
  339. package/skills/rabetbase/references/rabetbase-page-react-detail.md +1 -1
  340. package/skills/rabetbase/references/rabetbase-page-react-list.md +1 -1
  341. package/skills/rabetbase/references/rabetbase-page-react-publish.md +2 -2
  342. package/skills/rabetbase/references/rabetbase-project-create.md +3 -0
  343. package/skills/rabetbase/references/rabetbase-run.md +1 -1
  344. package/skills/rabetbase/references/rabetbase-sql-create.md +1 -1
  345. package/skills/rabetbase/references/rabetbase-sql-push.md +3 -4
  346. package/skills/rabetbase/references/rabetbase-user-account.md +0 -1
  347. package/skills/rabetbase.manifest.json +5 -5
  348. package/templates/README.md +14 -2
  349. package/lib/commands/project/create/non-interactive.d.ts +0 -9
  350. package/lib/commands/project/create/non-interactive.js +0 -1
  351. package/lib/utils/copy-directory.d.ts +0 -1
  352. package/lib/utils/copy-directory.js +0 -1
  353. package/skills/rabetbase/knowledge/page-schema/LrSmartEcharts.md +0 -291
  354. package/skills/rabetbase/knowledge/page-schema/LrSmartStatistic.md +0 -223
  355. package/templates/projects/sub-app-react-demo/.prettierrc +0 -1
  356. package/templates/projects/sub-app-react-demo/CHANGELOG.md +0 -67
  357. package/templates/projects/sub-app-react-demo/README.md +0 -246
  358. package/templates/projects/sub-app-react-demo/docs/quick-start.md +0 -245
  359. package/templates/projects/sub-app-react-demo/index.html +0 -27
  360. package/templates/projects/sub-app-react-demo/package.json +0 -34
  361. package/templates/projects/sub-app-react-demo/public/logo.svg +0 -1
  362. package/templates/projects/sub-app-react-demo/public/vite.svg +0 -1
  363. package/templates/projects/sub-app-react-demo/src/api/api.ts +0 -26
  364. package/templates/projects/sub-app-react-demo/src/api/client.ts +0 -32
  365. package/templates/projects/sub-app-react-demo/src/components/demo-page-container/DemoPageContainer.module.css +0 -28
  366. package/templates/projects/sub-app-react-demo/src/components/demo-page-container/DemoPageContainer.tsx +0 -55
  367. package/templates/projects/sub-app-react-demo/src/layouts/MainLayout.tsx +0 -308
  368. package/templates/projects/sub-app-react-demo/src/main.tsx +0 -52
  369. package/templates/projects/sub-app-react-demo/src/pages/dashboard/index.tsx +0 -570
  370. package/templates/projects/sub-app-react-demo/src/pages/data-screen/index.tsx +0 -531
  371. package/templates/projects/sub-app-react-demo/src/pages/index.module.css +0 -500
  372. package/templates/projects/sub-app-react-demo/src/pages/index.tsx +0 -641
  373. package/templates/projects/sub-app-react-demo/src/pages/sdk-demo/index.tsx +0 -536
  374. package/templates/projects/sub-app-react-demo/src/pages/workbench/index.module.css +0 -295
  375. package/templates/projects/sub-app-react-demo/src/pages/workbench/index.tsx +0 -242
  376. package/templates/projects/sub-app-react-demo/src/router/index.tsx +0 -30
  377. package/templates/projects/sub-app-react-demo/src/style.css +0 -108
  378. package/templates/projects/sub-app-react-demo/src/utils/api.ts +0 -12
  379. package/templates/projects/sub-app-react-demo/src/vite-env.d.ts +0 -2
  380. package/templates/projects/sub-app-react-demo/tsconfig.json +0 -26
  381. package/templates/projects/sub-app-react-demo/vite.config.ts +0 -111
@@ -1,295 +0,0 @@
1
- @import url("https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;600;700&display=swap");
2
-
3
- /* workbench 的页面级外层 gutter 由 DemoPageContainer 负责。
4
- 这里不要再加根节点 padding,否则会和共享容器叠出双层间距。 */
5
- .page {
6
- font-family: "Noto Sans SC", system-ui, sans-serif;
7
- background: #f5f5f7;
8
- color: #1d1d1f;
9
- border-radius: 16px;
10
- }
11
-
12
- /* 欢迎区域 - 简洁直接 */
13
- .welcome {
14
- background: #fff;
15
- border-radius: 12px;
16
- padding: 24px;
17
- margin-bottom: 20px;
18
- border: 1px solid #e5e5e7;
19
- }
20
-
21
- .welcome h2 {
22
- font-size: 24px;
23
- font-weight: 600;
24
- margin: 0 0 6px 0;
25
- color: #1d1d1f;
26
- }
27
-
28
- .welcome p {
29
- font-size: 14px;
30
- color: #86868b;
31
- margin: 0;
32
- }
33
-
34
- /* Bento Grid 布局 */
35
- .bentoGrid {
36
- display: grid;
37
- grid-template-columns: repeat(4, 1fr);
38
- gap: 16px;
39
- margin-bottom: 20px;
40
- }
41
-
42
- /* 统计卡片 */
43
- .statCard {
44
- background: #fff;
45
- border-radius: 12px;
46
- padding: 20px;
47
- border: 1px solid #e5e5e7;
48
- transition:
49
- transform 0.2s ease,
50
- box-shadow 0.2s ease;
51
- cursor: default;
52
- }
53
-
54
- .statCard:hover {
55
- transform: scale(1.02);
56
- box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
57
- }
58
-
59
- .statLabel {
60
- font-size: 13px;
61
- color: #86868b;
62
- margin-bottom: 8px;
63
- }
64
-
65
- .statValue {
66
- font-size: 28px;
67
- font-weight: 600;
68
- color: #1d1d1f;
69
- margin-bottom: 4px;
70
- }
71
-
72
- .statTrend {
73
- font-size: 12px;
74
- color: #34c759;
75
- display: inline-flex;
76
- align-items: center;
77
- gap: 2px;
78
- }
79
-
80
- /* 两列布局 */
81
- .row {
82
- display: grid;
83
- grid-template-columns: repeat(2, 1fr);
84
- gap: 16px;
85
- }
86
-
87
- /* 通用卡片 */
88
- .card {
89
- background: #fff;
90
- border-radius: 12px;
91
- border: 1px solid #e5e5e7;
92
- overflow: hidden;
93
- }
94
-
95
- .cardHead {
96
- padding: 16px 20px;
97
- border-bottom: 1px solid #f5f5f7;
98
- font-size: 15px;
99
- font-weight: 600;
100
- color: #1d1d1f;
101
- }
102
-
103
- .cardBody {
104
- padding: 16px 20px;
105
- }
106
-
107
- /* 快捷操作网格 */
108
- .actions {
109
- display: grid;
110
- grid-template-columns: repeat(2, 1fr);
111
- gap: 12px;
112
- }
113
-
114
- .actionItem {
115
- background: #f5f5f7;
116
- border-radius: 10px;
117
- padding: 20px;
118
- text-align: center;
119
- cursor: pointer;
120
- transition: all 0.2s ease;
121
- border: 1px solid transparent;
122
- }
123
-
124
- .actionItem:hover {
125
- background: #fff;
126
- border-color: #007aff;
127
- transform: scale(1.02);
128
- box-shadow: 0 2px 12px rgba(0, 122, 255, 0.1);
129
- }
130
-
131
- .actionIcon {
132
- font-size: 28px;
133
- color: #007aff;
134
- margin-bottom: 10px;
135
- }
136
-
137
- .actionTitle {
138
- font-size: 14px;
139
- font-weight: 500;
140
- color: #1d1d1f;
141
- margin-bottom: 4px;
142
- }
143
-
144
- .actionDesc {
145
- font-size: 12px;
146
- color: #86868b;
147
- }
148
-
149
- /* 列表项 */
150
- .listItem {
151
- display: flex;
152
- align-items: center;
153
- justify-content: space-between;
154
- padding: 12px 0;
155
- border-bottom: 1px solid #f5f5f7;
156
- cursor: pointer;
157
- transition: background 0.15s ease;
158
- margin: 0 -20px;
159
- padding-left: 20px;
160
- padding-right: 20px;
161
- }
162
-
163
- .listItem:hover {
164
- background: #f5f5f7;
165
- }
166
-
167
- .listItem:last-child {
168
- border-bottom: none;
169
- }
170
-
171
- .listMain {
172
- display: flex;
173
- align-items: center;
174
- gap: 12px;
175
- }
176
-
177
- .listAvatar {
178
- width: 36px;
179
- height: 36px;
180
- background: linear-gradient(135deg, #007aff, #5ac8fa);
181
- border-radius: 8px;
182
- display: flex;
183
- align-items: center;
184
- justify-content: center;
185
- color: #fff;
186
- font-size: 16px;
187
- }
188
-
189
- .listName {
190
- font-size: 14px;
191
- font-weight: 500;
192
- color: #1d1d1f;
193
- }
194
-
195
- .listTime {
196
- font-size: 12px;
197
- color: #86868b;
198
- }
199
-
200
- /* 待办事项 */
201
- .todoItem {
202
- padding: 12px 0;
203
- border-bottom: 1px solid #f5f5f7;
204
- }
205
-
206
- .todoItem:last-child {
207
- border-bottom: none;
208
- }
209
-
210
- .todoHeader {
211
- display: flex;
212
- align-items: center;
213
- gap: 8px;
214
- margin-bottom: 6px;
215
- }
216
-
217
- .todoTitle {
218
- font-size: 14px;
219
- color: #1d1d1f;
220
- flex: 1;
221
- }
222
-
223
- .todoTag {
224
- font-size: 11px;
225
- padding: 2px 8px;
226
- border-radius: 4px;
227
- font-weight: 500;
228
- }
229
-
230
- .todoTag.high {
231
- background: #ff3b30;
232
- color: #fff;
233
- }
234
-
235
- .todoTag.medium {
236
- background: #ff9500;
237
- color: #fff;
238
- }
239
-
240
- .todoTag.low {
241
- background: #32d74b;
242
- color: #fff;
243
- }
244
-
245
- .todoDate {
246
- font-size: 12px;
247
- color: #86868b;
248
- padding-left: 28px;
249
- }
250
-
251
- /* 时间线 */
252
- .timelineItem {
253
- padding: 12px 0;
254
- border-bottom: 1px solid #f5f5f7;
255
- }
256
-
257
- .timelineItem:last-child {
258
- border-bottom: none;
259
- }
260
-
261
- .timelineTitle {
262
- font-size: 14px;
263
- font-weight: 500;
264
- color: #1d1d1f;
265
- margin-bottom: 4px;
266
- }
267
-
268
- .timelineContent {
269
- font-size: 13px;
270
- color: #6e6e73;
271
- margin-bottom: 4px;
272
- line-height: 1.5;
273
- }
274
-
275
- .timelineTime {
276
- font-size: 12px;
277
- color: #86868b;
278
- }
279
-
280
- /* 响应式 */
281
- @media (max-width: 1024px) {
282
- .bentoGrid {
283
- grid-template-columns: repeat(2, 1fr);
284
- }
285
- }
286
-
287
- @media (max-width: 768px) {
288
- .bentoGrid {
289
- grid-template-columns: 1fr;
290
- }
291
-
292
- .row {
293
- grid-template-columns: 1fr;
294
- }
295
- }
@@ -1,242 +0,0 @@
1
- import React from "react";
2
- import { useNavigate } from "react-router-dom";
3
- import DemoPageContainer from "@/components/demo-page-container/DemoPageContainer";
4
- import styles from "./index.module.css";
5
- import {
6
- DashboardOutlined,
7
- ApiOutlined,
8
- BarChartOutlined,
9
- FileTextOutlined,
10
- UserOutlined,
11
- ShoppingOutlined,
12
- DollarOutlined,
13
- TrophyOutlined,
14
- ClockCircleOutlined,
15
- CheckCircleOutlined,
16
- ExclamationCircleOutlined,
17
- } from "@ant-design/icons";
18
-
19
- const mockData = {
20
- statistics: [
21
- {
22
- title: "今日访问",
23
- value: "1,256",
24
- icon: <UserOutlined />,
25
- trend: "+12.5%",
26
- },
27
- {
28
- title: "待处理订单",
29
- value: "89",
30
- icon: <ShoppingOutlined />,
31
- trend: "+8.3%",
32
- },
33
- {
34
- title: "本月收入",
35
- value: "¥89.6万",
36
- icon: <DollarOutlined />,
37
- trend: "+15.6%",
38
- },
39
- {
40
- title: "完成率",
41
- value: "89.5%",
42
- icon: <TrophyOutlined />,
43
- trend: "+3.2%",
44
- },
45
- ],
46
- quickActions: [
47
- {
48
- key: "/sdk-demo",
49
- title: "SDK 演示",
50
- desc: "查看 SDK 使用示例",
51
- icon: <ApiOutlined />,
52
- },
53
- {
54
- key: "/dashboard",
55
- title: "数据看板",
56
- desc: "查看业务数据统计",
57
- icon: <DashboardOutlined />,
58
- },
59
- {
60
- key: "/data-screen",
61
- title: "数据大屏",
62
- desc: "可视化数据展示",
63
- icon: <BarChartOutlined />,
64
- },
65
- {
66
- key: "https://open.lovrabet.com",
67
- title: "查看文档",
68
- desc: "访问完整文档",
69
- icon: <FileTextOutlined />,
70
- external: true,
71
- },
72
- ],
73
- recentAccess: [
74
- { name: "SDK 演示", path: "/sdk-demo", time: "2 小时前" },
75
- { name: "数据看板", path: "/dashboard", time: "5 小时前" },
76
- { name: "数据大屏", path: "/data-screen", time: "1 天前" },
77
- ],
78
- todos: [
79
- {
80
- title: "完成 SDK 集成文档",
81
- priority: "高",
82
- status: "pending",
83
- date: "2025-01-15",
84
- },
85
- {
86
- title: "优化数据大屏性能",
87
- priority: "中",
88
- status: "progress",
89
- date: "2025-01-20",
90
- },
91
- {
92
- title: "更新 API 文档",
93
- priority: "低",
94
- status: "pending",
95
- date: "2025-01-25",
96
- },
97
- ],
98
- announcements: [
99
- {
100
- title: "SDK v1.1.22 版本发布",
101
- content: "新增 filter 接口支持,支持复杂条件查询",
102
- time: "2025-01-10",
103
- },
104
- {
105
- title: "CLI v1.1.15 版本更新",
106
- content: "优化菜单同步功能,支持中文菜单名",
107
- time: "2025-01-08",
108
- },
109
- {
110
- title: "文档中心更新",
111
- content: "新增 API 使用指南和最佳实践",
112
- time: "2025-01-05",
113
- },
114
- ],
115
- };
116
-
117
- const Workbench: React.FC = () => {
118
- const navigate = useNavigate();
119
-
120
- const getStatusIcon = (status: string) => {
121
- if (status === "done")
122
- return <CheckCircleOutlined style={{ color: "#34c759" }} />;
123
- if (status === "progress")
124
- return <ClockCircleOutlined style={{ color: "#007aff" }} />;
125
- return <ExclamationCircleOutlined style={{ color: "#ff9500" }} />;
126
- };
127
-
128
- const getPriorityClass = (priority: string) => {
129
- const map: Record<string, string> = { 高: "high", 中: "medium", 低: "low" };
130
- return map[priority] || "low";
131
- };
132
-
133
- return (
134
- <DemoPageContainer>
135
- <div className={styles.page}>
136
- {/* 欢迎区 */}
137
- <div className={styles.welcome}>
138
- <h2>工作台</h2>
139
- <p>欢迎回来,这里是您的开发工作台</p>
140
- </div>
141
-
142
- {/* 统计数据 - Bento Grid */}
143
- <div className={styles.bentoGrid}>
144
- {mockData.statistics.map((item, i) => (
145
- <div key={i} className={styles.statCard}>
146
- <div className={styles.statLabel}>{item.title}</div>
147
- <div className={styles.statValue}>{item.value}</div>
148
- <div className={styles.statTrend}>{item.trend} 较昨日</div>
149
- </div>
150
- ))}
151
- </div>
152
-
153
- <div className={styles.row}>
154
- {/* 快捷操作 */}
155
- <div className={styles.card}>
156
- <div className={styles.cardHead}>快捷操作</div>
157
- <div className={styles.cardBody}>
158
- <div className={styles.actions}>
159
- {mockData.quickActions.map((item) => (
160
- <div
161
- key={item.key}
162
- className={styles.actionItem}
163
- onClick={() =>
164
- item.external
165
- ? window.open(item.key, "_blank")
166
- : navigate(item.key)
167
- }
168
- >
169
- <div className={styles.actionIcon}>{item.icon}</div>
170
- <div className={styles.actionTitle}>{item.title}</div>
171
- <div className={styles.actionDesc}>{item.desc}</div>
172
- </div>
173
- ))}
174
- </div>
175
- </div>
176
- </div>
177
-
178
- {/* 最近访问 */}
179
- <div className={styles.card}>
180
- <div className={styles.cardHead}>最近访问</div>
181
- <div className={styles.cardBody}>
182
- {mockData.recentAccess.map((item, i) => (
183
- <div
184
- key={i}
185
- className={styles.listItem}
186
- onClick={() => navigate(item.path)}
187
- >
188
- <div className={styles.listMain}>
189
- <div className={styles.listAvatar}>
190
- <FileTextOutlined />
191
- </div>
192
- <div>
193
- <div className={styles.listName}>{item.name}</div>
194
- <div className={styles.listTime}>{item.time}</div>
195
- </div>
196
- </div>
197
- </div>
198
- ))}
199
- </div>
200
- </div>
201
-
202
- {/* 待办事项 */}
203
- <div className={styles.card}>
204
- <div className={styles.cardHead}>待办事项</div>
205
- <div className={styles.cardBody}>
206
- {mockData.todos.map((item, i) => (
207
- <div key={i} className={styles.todoItem}>
208
- <div className={styles.todoHeader}>
209
- {getStatusIcon(item.status)}
210
- <span className={styles.todoTitle}>{item.title}</span>
211
- <span
212
- className={`${styles.todoTag} ${styles.todoTag[getPriorityClass(item.priority)]}`}
213
- >
214
- {item.priority}
215
- </span>
216
- </div>
217
- <div className={styles.todoDate}>截止:{item.date}</div>
218
- </div>
219
- ))}
220
- </div>
221
- </div>
222
-
223
- {/* 系统公告 */}
224
- <div className={styles.card}>
225
- <div className={styles.cardHead}>系统公告</div>
226
- <div className={styles.cardBody}>
227
- {mockData.announcements.map((item, i) => (
228
- <div key={i} className={styles.timelineItem}>
229
- <div className={styles.timelineTitle}>{item.title}</div>
230
- <div className={styles.timelineContent}>{item.content}</div>
231
- <div className={styles.timelineTime}>{item.time}</div>
232
- </div>
233
- ))}
234
- </div>
235
- </div>
236
- </div>
237
- </div>
238
- </DemoPageContainer>
239
- );
240
- };
241
-
242
- export default Workbench;
@@ -1,30 +0,0 @@
1
- import React from "react";
2
- import { createBrowserRouter, RouterProvider } from "react-router-dom";
3
- import { getBasename } from "@ice/stark-app";
4
- import MainLayout from "../layouts/MainLayout";
5
- import routes from "~react-pages";
6
-
7
- const router = createBrowserRouter(
8
- [
9
- {
10
- path: "/",
11
- element: <MainLayout />,
12
- children: routes,
13
- },
14
- ],
15
- {
16
- // 可选:通过getBasename()获取到微应用运行时的basename并传入
17
- basename: getBasename() || "/",
18
- },
19
- );
20
-
21
- // console.log("MicroAppRouter:", {
22
- // routes: router.routes,
23
- // basename: router.basename,
24
- // });
25
-
26
- const AppRouter: React.FC = () => {
27
- return <RouterProvider router={router} />;
28
- };
29
-
30
- export default AppRouter;
@@ -1,108 +0,0 @@
1
- * {
2
- margin: 0;
3
- padding: 0;
4
- box-sizing: border-box;
5
- }
6
-
7
- body {
8
- font-family:
9
- -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu",
10
- "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
11
- -webkit-font-smoothing: antialiased;
12
- -moz-osx-font-smoothing: grayscale;
13
- background: #fff;
14
- }
15
-
16
- #root {
17
- width: 100%;
18
- height: 100vh;
19
- background: #fff;
20
- }
21
-
22
- /* 壳层只负责提供子应用舞台和内容承载,不负责业务页的页面级 gutter。
23
- 页面外层留白只能由 DemoPageContainer / PageScaffold 这类 container 提供,
24
- 页面内容层不要再通过根节点 padding 或负 margin 抵消壳层 / container。 */
25
- .subapp-shell-content {
26
- min-width: 0;
27
- padding: 0;
28
- background: transparent !important;
29
- }
30
-
31
- .subapp-shell-stage {
32
- width: 100%;
33
- min-width: 0;
34
- }
35
-
36
- /* 自定义滚动条样式 */
37
- ::-webkit-scrollbar {
38
- width: 6px;
39
- height: 6px;
40
- }
41
-
42
- ::-webkit-scrollbar-track {
43
- background: transparent;
44
- }
45
-
46
- ::-webkit-scrollbar-thumb {
47
- background: #d1d5db;
48
- border-radius: 3px;
49
- }
50
-
51
- ::-webkit-scrollbar-thumb:hover {
52
- background: #9ca3af;
53
- }
54
-
55
- /* 自定义菜单样式 */
56
- .custom-menu.ant-menu {
57
- border-right: none !important;
58
- background: #fff !important;
59
- }
60
-
61
- .custom-menu .ant-menu-item {
62
- margin: 4px 8px !important;
63
- border-radius: 4px !important;
64
- height: 40px !important;
65
- line-height: 40px !important;
66
- color: #595959 !important;
67
- }
68
-
69
- .custom-menu .ant-menu-item:hover {
70
- color: #1890ff !important;
71
- }
72
-
73
- .custom-menu .ant-menu-item-selected {
74
- background: #1890ff !important;
75
- color: #fff !important;
76
- }
77
-
78
- .custom-menu .ant-menu-item-selected .ant-menu-item-icon {
79
- color: #fff !important;
80
- }
81
-
82
- .custom-menu .ant-menu-item-selected::after {
83
- display: none !important;
84
- }
85
-
86
- /* 响应式设计 */
87
- @media (max-width: 768px) {
88
- .ant-layout-sider {
89
- position: fixed !important;
90
- height: 100vh;
91
- z-index: 999;
92
- }
93
- }
94
-
95
- /* 面包屑导航颜色 */
96
- .ant-breadcrumb-link {
97
- color: #595959 !important;
98
- }
99
-
100
- .ant-breadcrumb-separator {
101
- color: #d9d9d9 !important;
102
- }
103
-
104
- /* 最后一个面包屑(当前页面)颜色更深 */
105
- .ant-breadcrumb-item:last-child .ant-breadcrumb-link {
106
- color: #262626 !important;
107
- font-weight: 500 !important;
108
- }
@@ -1,12 +0,0 @@
1
- // 简单封装 apiRequest
2
- export const apiRequest = async (path: string, options: RequestInit = {}) => {
3
- const response = await fetch(`https://runtime.lovrabet.com${path}`, {
4
- credentials: "include", // 关键配置:跨域请求携带Cookie
5
- headers: {
6
- "Content-Type": "application/json",
7
- ...(options.headers || {}),
8
- },
9
- ...options,
10
- });
11
- return response.json();
12
- };
@@ -1,2 +0,0 @@
1
- /// <reference types="vite/client" />
2
- /// <reference types="vite-plugin-pages/client" />
@@ -1,26 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "experimentalDecorators": true,
4
- "useDefineForClassFields": true,
5
- "importHelpers": true,
6
- "skipLibCheck": true,
7
- "target": "es2017",
8
- "module": "es2022",
9
- "strict": false,
10
- "moduleResolution": "node",
11
- "allowSyntheticDefaultImports": true,
12
- "esModuleInterop": true,
13
- "forceConsistentCasingInFileNames": true,
14
- "lib": ["ESNext", "DOM"],
15
- "jsx": "react",
16
- "declaration": true,
17
- "downlevelIteration": true,
18
- "resolveJsonModule": true,
19
- "baseUrl": ".",
20
- "paths": {
21
- "@": ["./src"],
22
- "@/*": ["./src/*"]
23
- }
24
- },
25
- "include": ["src", "types"]
26
- }