@das-fed/upf-utils 6.4.0-dev.156 → 6.4.0-dev.158
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/api-services/index.js +1 -1
- package/api-services/index.js.gz +0 -0
- package/api-services/modules/app-manage/index.js +806 -792
- package/api-services/modules/app-manage/index.js.gz +0 -0
- package/api-services/modules/authentication/index.js +836 -818
- package/api-services/modules/authentication/index.js.gz +0 -0
- package/api-services/modules/bems/index.js +839 -821
- package/api-services/modules/bems/index.js.gz +0 -0
- package/api-services/modules/contract/index.js +662 -658
- package/api-services/modules/contract/index.js.gz +0 -0
- package/api-services/modules/duty-manage/index.js +1 -1
- package/api-services/modules/duty-manage/index.js.gz +0 -0
- package/api-services/modules/enterpriseright/index.js +1 -1
- package/api-services/modules/enterpriseright/index.js.gz +0 -0
- package/api-services/modules/file/index.js +1 -1
- package/api-services/modules/file/index.js.gz +0 -0
- package/api-services/modules/gateway-edge/index.js +836 -818
- package/api-services/modules/gateway-edge/index.js.gz +0 -0
- package/api-services/modules/index.js +1 -1
- package/api-services/modules/index.js.gz +0 -0
- package/api-services/modules/iot/index.js +1076 -1094
- package/api-services/modules/iot/index.js.gz +0 -0
- package/api-services/modules/justauth/index.js +1 -1
- package/api-services/modules/justauth/index.js.gz +0 -0
- package/api-services/modules/knowledge/index.js +836 -818
- package/api-services/modules/knowledge/index.js.gz +0 -0
- package/api-services/modules/link/index.js +1 -1
- package/api-services/modules/link/index.js.gz +0 -0
- package/api-services/modules/permission/index.js +836 -818
- package/api-services/modules/permission/index.js.gz +0 -0
- package/api-services/modules/platformManage/index.js +1 -1
- package/api-services/modules/platformManage/index.js.gz +0 -0
- package/api-services/modules/portal/index.js +1 -1
- package/api-services/modules/portal/index.js.gz +0 -0
- package/api-services/modules/space-manage/index.js +1 -1
- package/api-services/modules/space-manage/index.js.gz +0 -0
- package/api-services/modules/super-admin/index.js +1 -1
- package/api-services/modules/super-admin/index.js.gz +0 -0
- package/api-services/modules/supplier/index.js +820 -838
- package/api-services/modules/supplier/index.js.gz +0 -0
- package/api-services/modules/supplychain-manage/index.js +1 -1
- package/api-services/modules/supplychain-manage/index.js.gz +0 -0
- package/api-services/modules/systemConfiguration/index.js +1 -1
- package/api-services/modules/systemConfiguration/index.js.gz +0 -0
- package/api-services/modules/tool/index.js +836 -818
- package/api-services/modules/tool/index.js.gz +0 -0
- package/api-services/src/create-service/index.js +1 -1
- package/api-services/src/create-service/index.js.gz +0 -0
- package/common-tools/handle-data/index.js +9 -10
- package/create-api-service/check-token/index.d.ts +16 -0
- package/create-api-service/check-token/index.js +1757 -0
- package/create-api-service/check-token/index.js.gz +0 -0
- package/create-api-service/index.js +1 -1
- package/create-api-service/index.js.gz +0 -0
- package/esm-map.json +2 -1
- package/package.json +4 -4
|
Binary file
|
|
@@ -7,7 +7,7 @@ import Xn from "dayjs/plugin/timezone";
|
|
|
7
7
|
import { getProjectInfo as Zn, getInstanceInfo as Yn } from "@das-fed/upf-utils/common-info";
|
|
8
8
|
import { getAccessToken as eo } from "@das-fed/upf-utils/token-tools";
|
|
9
9
|
import { getConfig as kr } from "@das-fed/upf-utils/config";
|
|
10
|
-
import { getValidAccessToken as to } from "@das-fed/upf-utils/create-api-service/
|
|
10
|
+
import { getValidAccessToken as to } from "@das-fed/upf-utils/create-api-service/check-token";
|
|
11
11
|
function qr(t, e) {
|
|
12
12
|
return function() {
|
|
13
13
|
return t.apply(e, arguments);
|
|
Binary file
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
const
|
|
2
|
-
let { pathname:
|
|
3
|
-
r = "/upf/web/admin";
|
|
1
|
+
const i = (n) => n === null || typeof n > "u" || n === "", o = async (n) => {
|
|
2
|
+
let { pathname: a = "back-end", langArr: l = ["zh-CN", "en"], urlPrefix: f = "" } = n || {}, t = {};
|
|
4
3
|
for (let e of l)
|
|
5
|
-
if (!
|
|
6
|
-
const
|
|
4
|
+
if (!t[e]) {
|
|
5
|
+
const r = await import(
|
|
7
6
|
/* @vite-ignore */
|
|
8
|
-
`${
|
|
7
|
+
`${f}/i18n/${a}/${e}.js`
|
|
9
8
|
);
|
|
10
|
-
|
|
9
|
+
t[e] = (r == null ? void 0 : r.default) || {};
|
|
11
10
|
}
|
|
12
|
-
return
|
|
11
|
+
return t;
|
|
13
12
|
};
|
|
14
13
|
export {
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
o as handleI18nData,
|
|
15
|
+
i as isEmpty
|
|
17
16
|
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface RefreshDataType {
|
|
2
|
+
accessToken: string;
|
|
3
|
+
refreshToken: string;
|
|
4
|
+
accessExp: number;
|
|
5
|
+
refreshExp: number;
|
|
6
|
+
sub?: string;
|
|
7
|
+
tenant?: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* 检查并获取有效的 Access Token(带缓冲、防并发和重试机制)
|
|
11
|
+
* @param tokenData 当前 token 数据
|
|
12
|
+
* @param updateTokenCallback 更新 token 的回调函数
|
|
13
|
+
* @param retryCount 内部重试计数器(外部调用无需传递)
|
|
14
|
+
* @returns 有效的 access_token
|
|
15
|
+
*/
|
|
16
|
+
export declare function getValidAccessToken(tokenData: RefreshDataType, updateTokenCallback: (newToken: RefreshDataType) => void, retryCount?: number): Promise<string>;
|