@pubinfo-pr/core 0.234.1 → 0.237.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 (2) hide show
  1. package/README.md +66 -0
  2. package/package.json +7 -7
package/README.md ADDED
@@ -0,0 +1,66 @@
1
+ # @pubinfo/core
2
+
3
+ Pubinfo 框架的核心运行时。这里包含应用启动入口、内置模块、布局系统、请求封装、路由和状态相关能力。
4
+
5
+ ## 它在做什么
6
+
7
+ - 提供 `createPubinfo()`,把 Vue、Router、Pinia、请求实例和模块系统串起来
8
+ - 内置认证、授权、预访问校验、布局、设置、进度条、系统信息和 devtools 模块
9
+ - 暴露请求封装、路由模块解析、图标模块解析、持久化状态工具
10
+ - 导出一组框架组件和运行时组件
11
+
12
+ ## 默认启动流程
13
+
14
+ `createPubinfo()` 在非 `pure` 模式下会自动注册这些内置模块:
15
+
16
+ - `PiniaPlugin`
17
+ - `PreAccess`
18
+ - `Authentication`
19
+ - `Authorization`
20
+ - `LayoutComponent`
21
+ - `Settings`
22
+ - `NProgress`
23
+ - `SystemInfo`
24
+ - `Devtools`
25
+
26
+ 同时会补一个 404 路由,并初始化全局 Pubinfo context。
27
+
28
+ ## 基本用法
29
+
30
+ ```ts
31
+ import { createPubinfo } from '@pubinfo/core';
32
+ import App from './App.vue';
33
+
34
+ createPubinfo({
35
+ app: App,
36
+ router: {
37
+ routes: [],
38
+ },
39
+ request: {
40
+ auth,
41
+ basic,
42
+ },
43
+ });
44
+ ```
45
+
46
+ ## 主要导出
47
+
48
+ - `createPubinfo`
49
+ - `createRequest`
50
+ - `defineRouteModule` / `defineIconModule`
51
+ - `readProjectModules`
52
+ - `Layout`、`LayoutSidebar`、`LayoutTopbar`、`Tools`、`Logo`
53
+ - `defineSettings` / `getSettings`
54
+ - `clearPersistedState` / `getPersistedState` / `setPersistedState`
55
+ - `updateWatermark`
56
+ - `cleanup` / `storage` / `publicKeyEncryption`
57
+
58
+ ## 子路径与产物
59
+
60
+ - `@pubinfo/core/style.css`: 框架样式
61
+ - `@pubinfo/core/runtime`: 运行时组件导出,目前包含 `PubinfoDev`
62
+ - `@pubinfo/core/types`: 类型入口
63
+
64
+ ## 适用边界
65
+
66
+ 如果你只是消费框架,通常应优先使用顶层包 `pubinfo`。只有在需要直接依赖内部运行时或拆分安装时,才单独使用这个包。
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pubinfo-pr/core",
3
3
  "type": "module",
4
- "version": "0.234.1",
4
+ "version": "0.237.1",
5
5
  "exports": {
6
6
  ".": {
7
7
  "types": "./dist/index.d.ts",
@@ -27,9 +27,9 @@
27
27
  "node": "^20.19.0 || >=22.12.0"
28
28
  },
29
29
  "peerDependencies": {
30
- "@pubinfo-pr/config": "0.234.1",
31
- "@pubinfo-pr/devtools": "0.234.1",
32
- "@pubinfo-pr/vite": "0.234.1",
30
+ "@pubinfo-pr/config": "0.237.1",
31
+ "@pubinfo-pr/devtools": "0.237.1",
32
+ "@pubinfo-pr/vite": "0.237.1",
33
33
  "alova": "^3.5.0",
34
34
  "pinia": "^3.0.4",
35
35
  "vue": "^3.5.28",
@@ -42,7 +42,7 @@
42
42
  "@headlessui/vue": "^1.7.23",
43
43
  "@imengyu/vue3-context-menu": "^1.5.4",
44
44
  "@pubinfo/pro-components": "^1.8.2",
45
- "@pubinfo-pr/shared": "0.234.1",
45
+ "@pubinfo-pr/shared": "0.237.1",
46
46
  "@unocss/reset": "^66.6.0",
47
47
  "@vueuse/core": "^14.2.1",
48
48
  "@vueuse/integrations": "^14.2.1",
@@ -69,10 +69,10 @@
69
69
  "@alova/mock": "^2.0.18",
70
70
  "@iconify/json": "^2.2.437",
71
71
  "@iconify/vue": "^5.0.0",
72
- "@pubinfo-pr/config": "0.234.1",
72
+ "@pubinfo-pr/config": "0.237.1",
73
73
  "@pubinfo/openapi": "^0.9.1",
74
74
  "@pubinfo/preset-openapi": "^0.9.1",
75
- "@pubinfo-pr/vite": "0.234.1",
75
+ "@pubinfo-pr/vite": "0.237.1",
76
76
  "@types/lodash-es": "^4.17.12",
77
77
  "@types/md5": "^2.3.6",
78
78
  "@types/nprogress": "^0.2.3",