@lark-apaas/client-toolkit 1.1.21-alpha.auth.dev.4 → 1.1.21-alpha.auth.dev.6

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 +3 -3
  2. package/package.json +8 -7
package/README.md CHANGED
@@ -15,7 +15,7 @@
15
15
  ### 开发组件 - 使用 CanRole 组件 (推荐)
16
16
 
17
17
  ```tsx
18
- import { CanRole } from '@lark-apaas/client-toolkit';
18
+ import { CanRole } from '@lark-apaas/client-toolkit/auth';
19
19
 
20
20
  function Home() {
21
21
  return (
@@ -35,7 +35,7 @@ function Home() {
35
35
 
36
36
  ```tsx
37
37
  import { useContext } from 'react';
38
- import { AbilityContext, ROLE_SUBJECT } from '@lark-apaas/client-toolkit';
38
+ import { AbilityContext, ROLE_SUBJECT } from '@lark-apaas/client-toolkit/auth';
39
39
 
40
40
  function Home() {
41
41
  const ability = useContext(AbilityContext);
@@ -55,7 +55,7 @@ function Home() {
55
55
 
56
56
  ```tsx
57
57
  import { useContext } from 'react';
58
- import { AbilityContext, ROLE_SUBJECT } from '@lark-apaas/client-toolkit';
58
+ import { AbilityContext, ROLE_SUBJECT } from '@lark-apaas/client-toolkit/auth';
59
59
 
60
60
  const menus = [
61
61
  { name: 'Dashboard', path: '/dashboard', p: { action: 'role_admin', subject: ROLE_SUBJECT } },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lark-apaas/client-toolkit",
3
- "version": "1.1.21-alpha.auth.dev.4",
3
+ "version": "1.1.21-alpha.auth.dev.6",
4
4
  "types": "./lib/index.d.ts",
5
5
  "main": "./lib/index.js",
6
6
  "files": [
@@ -61,10 +61,10 @@
61
61
  "require": "./lib/apis/utils/*.js",
62
62
  "types": "./lib/apis/utils/*.d.ts"
63
63
  },
64
- "./auth/*": {
65
- "import": "./lib/auth.js",
66
- "require": "./lib/auth.js",
67
- "types": "./lib/auth.d.ts"
64
+ "./auth": {
65
+ "import": "./lib/auth/index.js",
66
+ "require": "./lib/auth/index.js",
67
+ "types": "./lib/auth/index.d.ts"
68
68
  }
69
69
  },
70
70
  "scripts": {
@@ -79,13 +79,14 @@
79
79
  "storybook": "storybook dev",
80
80
  "test": "echo 0",
81
81
  "lint": "eslint src --ext .js,.jsx,.ts,.tsx",
82
- "lint:fix": "eslint src --ext .js,.jsx,.ts,.tsx --fix"
82
+ "lint:fix": "eslint src --ext .js,.jsx,.ts,.tsx --fix",
83
+ "prepublishOnly": "npm run build && node scripts/replace-workspace-alias.js"
83
84
  },
84
85
  "dependencies": {
85
86
  "@ant-design/colors": "^7.2.1",
86
87
  "@ant-design/cssinjs": "^1.24.0",
87
88
  "@data-loom/js": "^0.4.0",
88
- "@lark-apaas/auth-sdk": "0.1.0-alpha.9",
89
+ "@lark-apaas/auth-sdk": "0.1.0-alpha.11",
89
90
  "@lark-apaas/miaoda-inspector": "^1.0.4",
90
91
  "@radix-ui/react-avatar": "^1.1.10",
91
92
  "@radix-ui/react-popover": "^1.1.15",