@lark-apaas/client-toolkit 1.2.69 → 1.2.70-alpha.20260904232021

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.
@@ -3,6 +3,8 @@ import { IBaseThemeProviderProps } from '../theme';
3
3
  import '../../runtime';
4
4
  interface IBaseAuthProviderProps {
5
5
  enableAuth?: boolean;
6
+ /** 本地开发角色覆盖;生产构建会由 auth-sdk 忽略。传空数组可模拟无角色用户。 */
7
+ localRoles?: string[];
6
8
  }
7
9
  interface IToasterProps {
8
10
  /** 禁用内建 Toaster 组件,默认 false */
@@ -43,7 +43,7 @@ const readAllCssVarColors = ()=>{
43
43
  };
44
44
  const appFlags = process.env.APP_FLAGS || {};
45
45
  const App = (props)=>{
46
- const { enableAuth, disableToaster = false } = props;
46
+ const { enableAuth, localRoles, disableToaster = false } = props;
47
47
  useAppInfo();
48
48
  useEffect(()=>{
49
49
  if (isMiaodaPreview) fetch(`${location.origin}/ai/api/feida_preview/csrf`).then(()=>{
@@ -90,9 +90,11 @@ const App = (props)=>{
90
90
  enable: enableAuth,
91
91
  permissionApi: {
92
92
  url: permissionApiUrl
93
- }
93
+ },
94
+ localRoles
94
95
  }), [
95
96
  enableAuth,
97
+ localRoles,
96
98
  permissionApiUrl
97
99
  ]);
98
100
  return /*#__PURE__*/ jsxs(AuthProvider, {
@@ -215,6 +217,7 @@ const AppContainer_AppContainer = (props)=>{
215
217
  },
216
218
  children: /*#__PURE__*/ jsx(App, {
217
219
  enableAuth: props.enableAuth,
220
+ localRoles: props.localRoles,
218
221
  disableToaster: props.disableToaster,
219
222
  children: children
220
223
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lark-apaas/client-toolkit",
3
- "version": "1.2.69",
3
+ "version": "1.2.70-alpha.20260904232021",
4
4
  "types": "./lib/index.d.ts",
5
5
  "main": "./lib/index.js",
6
6
  "files": [
@@ -100,7 +100,7 @@
100
100
  "@ant-design/colors": "^7.2.1",
101
101
  "@ant-design/cssinjs": "^1.24.0",
102
102
  "@lark-apaas/aily-web-sdk": "^0.0.12",
103
- "@lark-apaas/auth-sdk": "^0.1.5",
103
+ "@lark-apaas/auth-sdk": "0.1.8-alpha.20260904232023",
104
104
  "@lark-apaas/client-capability": "^0.1.7",
105
105
  "@lark-apaas/dataloom": "^0.1.4",
106
106
  "@lark-apaas/internal-slardar": "^0.0.3",