@pubinfo-pr/core 0.234.1 → 0.238.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.
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`。只有在需要直接依赖内部运行时或拆分安装时,才单独使用这个包。
@@ -24,7 +24,7 @@ var D = h({
24
24
  }), O = { class: "settong-warp" }, k = /* @__PURE__ */ t(/* @__PURE__ */ m({
25
25
  name: "AppSetting",
26
26
  components: {
27
- SettingThemes: p(() => import("./SettingThemes--ObZszDO.js")),
27
+ SettingThemes: p(() => import("./SettingThemes-tF9f39iy.js")),
28
28
  SettingsMode: p(() => import("./SettingMode-DpAUEZUv.js")),
29
29
  SettingWidthMode: p(() => import("./SettingWidthMode-CZ2i-kzC.js")),
30
30
  SettingEnableTransition: p(() => import("./SettingEnableTransition-Bn37z29E.js")),
@@ -1,4 +1,4 @@
1
- import { w as e } from "./auth-BU3f3mc7.js";
1
+ import { w as e } from "./auth-cJIIobDi.js";
2
2
  import { t } from "./_plugin-vue_export-helper-CsLplWgU.js";
3
3
  import { n } from "./useContext-Dlqfap_7.js";
4
4
  import { t as r } from "./HDivider-BSj2DiEY.js";
@@ -1544,7 +1544,7 @@ var vi = k(M.KEEP_ALIVE, () => {
1544
1544
  //#endregion
1545
1545
  //#region src/features/api/modules/rbac/yonghujiekou.ts
1546
1546
  function bi(e, t) {
1547
- return $.Put("/rbac/user/changePassword", {}, {
1547
+ return $.Post("/rbac/user/changePassword", {}, {
1548
1548
  params: { ...e },
1549
1549
  ...t || {}
1550
1550
  });
@@ -1591,7 +1591,7 @@ var Di = [{
1591
1591
  children: [{
1592
1592
  path: "profile",
1593
1593
  name: "Profile",
1594
- component: () => import("./profile-Cp1PyI44.js"),
1594
+ component: () => import("./profile-CHNw1C_k.js"),
1595
1595
  meta: {
1596
1596
  title: "个人中心",
1597
1597
  icon: "i-iconamoon-profile-duotone"
@@ -1,5 +1,5 @@
1
1
  import { a as e, n as t } from "./modal-DXJis9Ay.js";
2
- import { d as n } from "./auth-BU3f3mc7.js";
2
+ import { d as n } from "./auth-cJIIobDi.js";
3
3
  import { d as r } from "./tree-select-DS-DUpQw.js";
4
4
  import { a as i } from "./components-CKYu3evU.js";
5
5
  import { t as a } from "./_plugin-vue_export-helper-CsLplWgU.js";
@@ -1,5 +1,5 @@
1
1
  import { a as e, n as t } from "./modal-DXJis9Ay.js";
2
- import { I as n, L as r, d as i } from "./auth-BU3f3mc7.js";
2
+ import { I as n, L as r, d as i } from "./auth-cJIIobDi.js";
3
3
  import { s as a } from "./tree-select-DS-DUpQw.js";
4
4
  import { r as o, t as s } from "./form-CmNl2b3W.js";
5
5
  import { n as c } from "./components-CKYu3evU.js";
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { r as e, t } from "./chunk-BdsCSvBP.js";
2
2
  import { $r as n, Ar as r, Cr as i, Dr as a, Er as o, Ir as s, Lr as c, Mr as l, Nr as u, Or as d, Qr as f, Sr as p, Tr as m, Ur as h, Vr as g, Xr as _, Zr as v, br as y, ei as b, jr as x, kr as ee, n as S, ti as C, wr as w, xr as te, yr as ne } from "./modal-DXJis9Ay.js";
3
- import { A as T, B as re, C as ie, D as ae, E as oe, F as se, M as ce, N as le, O as E, P as ue, R as de, S as fe, T as pe, _ as me, a as he, b as ge, c as _e, d as ve, f as ye, g as be, h as xe, i as Se, j as Ce, k as we, l as Te, m as Ee, n as De, o as Oe, p as ke, r as Ae, s as je, t as Me, u as Ne, v as Pe, w as Fe, y as Ie, z as Le } from "./auth-BU3f3mc7.js";
3
+ import { A as T, B as re, C as ie, D as ae, E as oe, F as se, M as ce, N as le, O as E, P as ue, R as de, S as fe, T as pe, _ as me, a as he, b as ge, c as _e, d as ve, f as ye, g as be, h as xe, i as Se, j as Ce, k as we, l as Te, m as Ee, n as De, o as Oe, p as ke, r as Ae, s as je, t as Me, u as Ne, v as Pe, w as Fe, y as Ie, z as Le } from "./auth-cJIIobDi.js";
4
4
  import { s as Re, t as ze } from "./watchDiff-Dofh9yLN.js";
5
5
  import { a as Be, c as Ve, d as He, f as Ue, i as We, l as Ge, n as Ke, o as qe, r as Je, u as Ye } from "./dist-HLiWAOC7.js";
6
6
  import { z as Xe } from "./tree-select-DS-DUpQw.js";
@@ -112,7 +112,7 @@ function Rn(e = {}) {
112
112
  var zn = [{
113
113
  path: "/change-password/:changePassWordToken",
114
114
  name: "ChangePassword",
115
- component: () => import("./change-password-BV3YkrI2.js"),
115
+ component: () => import("./change-password-B09dI1RQ.js"),
116
116
  beforeEnter: (e) => ue(e.params.changePassWordToken) ? { name: "Login" } : !0,
117
117
  meta: {
118
118
  whiteList: !0,
@@ -121,7 +121,7 @@ var zn = [{
121
121
  }, {
122
122
  path: "/change-organization/:orgId",
123
123
  name: "ChangeOrganization",
124
- component: () => import("./change-organization-Vl-hf_eS.js"),
124
+ component: () => import("./change-organization-BrjvU839.js"),
125
125
  beforeEnter: (e) => {
126
126
  let t = ve();
127
127
  return ue(e.params.orgId) || e.params.orgId !== t.user.orgId ? { name: "Login" } : !0;
@@ -180,7 +180,7 @@ function Un(e) {
180
180
  var Wn = {
181
181
  path: "/not-permission",
182
182
  name: "NotPermission",
183
- component: () => import("./not-permission-DpD0vTVw.js"),
183
+ component: () => import("./not-permission-BbVgwOEA.js"),
184
184
  meta: {
185
185
  whiteList: !0,
186
186
  title: "无权限访问"
@@ -3519,7 +3519,7 @@ var Rs = L({
3519
3519
  name: "SettingBar",
3520
3520
  __name: "index",
3521
3521
  setup(e) {
3522
- let t = Ut(() => import("./AppSetting-6MGS4YPK.js")), { settingsStore: n, isDev: r } = D();
3522
+ let t = Ut(() => import("./AppSetting-Bka_D_r8.js")), { settingsStore: n, isDev: r } = D();
3523
3523
  function i() {
3524
3524
  window.open("http://124.223.184.245:10000/docs/");
3525
3525
  }
@@ -10273,7 +10273,7 @@ function Qg(e) {
10273
10273
  routes: [...n.routes, {
10274
10274
  path: "/:all(.*)*",
10275
10275
  name: "NotFound",
10276
- component: () => import("./not-found-BLDgkCMn.js"),
10276
+ component: () => import("./not-found-DE1Fr95C.js"),
10277
10277
  meta: { title: "找不到页面" }
10278
10278
  }]
10279
10279
  },
@@ -1,4 +1,4 @@
1
- import { f as e, p as t } from "./auth-BU3f3mc7.js";
1
+ import { f as e, p as t } from "./auth-cJIIobDi.js";
2
2
  import { t as n } from "./_plugin-vue_export-helper-CsLplWgU.js";
3
3
  import { t as r } from "./HButton-pEqyd918.js";
4
4
  import { createElementBlock as i, createElementVNode as a, createTextVNode as o, createVNode as s, defineComponent as c, onMounted as l, openBlock as u, ref as d, toDisplayString as f, unref as p, withCtx as m } from "vue";
@@ -1,4 +1,4 @@
1
- import { d as e } from "./auth-BU3f3mc7.js";
1
+ import { d as e } from "./auth-cJIIobDi.js";
2
2
  import { t } from "./_plugin-vue_export-helper-CsLplWgU.js";
3
3
  import { t as n } from "./HButton-pEqyd918.js";
4
4
  import { createElementBlock as r, createElementVNode as i, createTextVNode as a, createVNode as o, defineComponent as s, onMounted as c, onUnmounted as l, openBlock as u, ref as d, toDisplayString as f, unref as p, withCtx as m } from "vue";
@@ -1,6 +1,6 @@
1
1
  import { r as e, t } from "./chunk-BdsCSvBP.js";
2
2
  import { $ as n, $t as r, A as i, At as a, Bn as o, Cn as s, D as c, Dn as l, Dt as u, E as d, Et as f, Ft as p, G as m, Gt as h, Ht as g, It as _, Jn as v, Jt as y, Kn as b, Kt as x, Ln as S, Lt as C, Mn as w, Nn as T, Nt as E, On as D, P as O, Pt as k, Qt as A, R as j, Rt as M, S as N, Sn as P, Tt as F, Ut as I, V as ee, Vt as L, W as R, Wt as z, X as te, Xt as B, Y as ne, Yn as re, Yt as V, Z as ie, Zt as ae, _ as oe, _n as se, a as ce, an as le, b as ue, bn as de, c as fe, cn as pe, cr as me, dn as he, dt as ge, en as _e, er as ve, et as H, f as ye, fn as be, ft as xe, gn as Se, gr as Ce, gt as we, h as Te, hn as Ee, ht as De, i as Oe, in as ke, jt as Ae, k as je, kn as Me, kt as Ne, l as Pe, ln as Fe, lr as Ie, lt as Le, m as Re, mn as ze, mr as Be, mt as Ve, nn as He, nr as Ue, nt as We, o as Ge, or as Ke, ot as qe, p as Je, pr as Ye, pt as Xe, qn as Ze, qt as U, rn as Qe, rr as $e, rt as et, s as tt, sn as nt, st as rt, t as it, tn as at, tr as ot, tt as st, ut as ct, v as lt, vn as ut, vr as dt, vt as ft, w as pt, wn as W, x as mt, y as G, yn as K, yt as ht, z as gt, zn as _t } from "./modal-DXJis9Ay.js";
3
- import { x as vt } from "./auth-BU3f3mc7.js";
3
+ import { x as vt } from "./auth-cJIIobDi.js";
4
4
  import { $ as yt, A as bt, B as xt, Bt as St, C as Ct, Ct as wt, D as Tt, E as Et, F as Dt, G as Ot, H as kt, Ht as At, I as jt, It as Mt, J as Nt, K as Pt, L as Ft, M as It, N as Lt, O as Rt, P as zt, Q as Bt, R as Vt, Rt as Ht, S as Ut, St as Wt, T as Gt, Tt as Kt, U as qt, Ut as Jt, V as Yt, W as Xt, X as Zt, Z as Qt, _ as $t, _t as en, a as tn, at as nn, b as rn, bt as an, c as on, ct as sn, d as cn, dt as ln, et as un, f as dn, g as fn, gt as pn, h as mn, ht as hn, i as gn, it as _n, j as vn, jt as yn, k as bn, l as xn, m as Sn, mt as Cn, n as wn, nt as Tn, o as En, p as Dn, pt as On, q as kn, r as An, rt as jn, st as Mn, t as Nn, tt as Pn, ut as Fn, v as In, vt as Ln, w as Rn, wt as zn, x as Bn, xt as Vn, y as Hn, yt as Un, z as Wn, zt as Gn } from "./tree-select-DS-DUpQw.js";
5
5
  import { C as Kn, D as qn, E as Jn, S as Yn, T as Xn, _ as Zn, a as Qn, b as $n, c as er, d as tr, f as nr, g as rr, h as ir, i as ar, l as or, m as sr, n as cr, o as lr, p as ur, r as dr, s as fr, t as pr, u as mr, v as hr, w as gr, x as _r, y as vr } from "./form-CmNl2b3W.js";
6
6
  import { Comment as yr, Fragment as br, Teleport as xr, Text as Sr, Transition as Cr, cloneVNode as wr, computed as q, createElementBlock as Tr, createElementVNode as Er, createTextVNode as Dr, createVNode as J, defineComponent as Y, getCurrentInstance as Or, getCurrentScope as kr, inject as Ar, isRef as jr, isVNode as Mr, mergeProps as Nr, nextTick as Pr, onActivated as Fr, onBeforeMount as Ir, onBeforeUnmount as Lr, onBeforeUpdate as Rr, onMounted as zr, onScopeDispose as Br, onUnmounted as Vr, onUpdated as Hr, openBlock as Ur, provide as Wr, reactive as Gr, ref as X, resolveDynamicComponent as Kr, shallowRef as Z, toRaw as qr, toRef as Q, toRefs as Jr, toValue as Yr, unref as Xr, useAttrs as Zr, useTemplateRef as Qr, vShow as $r, watch as $, watchEffect as ei, withCtx as ti, withDirectives as ni } from "vue";
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.238.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.238.1",
31
+ "@pubinfo-pr/devtools": "0.238.1",
32
+ "@pubinfo-pr/vite": "0.238.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.238.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.238.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.238.1",
76
76
  "@types/lodash-es": "^4.17.12",
77
77
  "@types/md5": "^2.3.6",
78
78
  "@types/nprogress": "^0.2.3",
@@ -3,7 +3,7 @@ import type { ComputedRef } from 'vue';
3
3
  import { find } from 'lodash-es';
4
4
  import { defineStore } from 'pinia';
5
5
  import { postAuthChangeLoginOrg, postAuthLogin, postAuthLoginNew } from '@/features/api/modules/auth';
6
- import { getRbacResourceGrantedResources, getRbacUserUserEntireInfo, putRbacUserChangePassword } from '@/features/api/modules/rbac';
6
+ import { getRbacResourceGrantedResources, getRbacUserUserEntireInfo, postRbacUserChangePassword } from '@/features/api/modules/rbac';
7
7
  import { usePubinfoContext } from '@/features/context';
8
8
  import { publicKeyEncryption } from '@/utils';
9
9
  import { STORE_NAME } from '../enum';
@@ -235,7 +235,7 @@ const useUserStore = defineStore<STORE_NAME.USER, UserStore>(
235
235
  }
236
236
  const encryptedOldpassword = await publicKeyEncryption(form.oldPassword);
237
237
  const encryptedNewpassword = await publicKeyEncryption(form.newPassword);
238
- const res = await putRbacUserChangePassword({
238
+ const res = await postRbacUserChangePassword({
239
239
  oldPassword: encryptedOldpassword,
240
240
  newPassword: encryptedNewpassword,
241
241
  }, {