@iyulab/enterprise 0.11.0 → 0.11.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/CHANGELOG.md +9 -0
- package/README.md +9 -1
- package/dist/icons.d.ts +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.11.1
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- **`createAuthClient`'s README section documented only 4 of `AuthClientConfig`'s
|
|
8
|
+
7 fields** — `baseUrl`, `credentials`, and `extractLoginError` had no mention
|
|
9
|
+
anywhere (only `permissionStore` was covered, in prose). Added a config table
|
|
10
|
+
matching the one already used for `createODataService`.
|
|
11
|
+
|
|
3
12
|
## 0.11.0
|
|
4
13
|
|
|
5
14
|
### Added
|
package/README.md
CHANGED
|
@@ -147,8 +147,16 @@ const user = await auth.fetchMe() // null → 미인증(로그인 화면)
|
|
|
147
147
|
if (hasPermission('orders.write')) { /* 저장 버튼 노출 */ }
|
|
148
148
|
```
|
|
149
149
|
|
|
150
|
+
주입 항목(위 예시가 쓴 것 외 나머지):
|
|
151
|
+
|
|
152
|
+
| config | 용도 |
|
|
153
|
+
|--------|------|
|
|
154
|
+
| `baseUrl` | 상대 URL 앞에 붙일 오리진 (기본 `''` = same-origin) |
|
|
155
|
+
| `credentials` | fetch `credentials` 모드 (기본 `'same-origin'` — 쿠키 세션) |
|
|
156
|
+
| `extractLoginError` | 로그인 실패(non-401) 응답 바디에서 서버 메시지 추출 오버라이드 (기본: `body.Message ?? body.message`) |
|
|
157
|
+
| `permissionStore` | 권한 자동 갱신 대상 store (기본 `defaultPermissionStore`) — 격리가 필요하면 `createPermissionStore()`로 별도 store를 만들어 주입 |
|
|
158
|
+
|
|
150
159
|
- `fetchMe()` 는 401/네트워크 오류 시 `null` — 이 신호가 로그인 게이트를 구동한다(라이브러리가 리다이렉트하지 않음).
|
|
151
|
-
- 격리가 필요하면 `createPermissionStore()` 로 별도 store 를 만들어 `permissionStore` 로 주입한다.
|
|
152
160
|
- 도메인 판정(`isPortalUser` 등)·권한 코드 상수는 라이브러리가 아니라 앱 adapter 에 둔다.
|
|
153
161
|
|
|
154
162
|
### 도메인 헬퍼
|
package/dist/icons.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {}
|
|
1
|
+
export {}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iyulab/enterprise",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.1",
|
|
4
4
|
"description": "Enterprise utilities and components for iyulab framework",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"enterprise",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"./styles/preset.css": "./dist/styles/preset.css"
|
|
46
46
|
},
|
|
47
47
|
"scripts": {
|
|
48
|
-
"preversion": "node ../../scripts/preversion-check.mjs",
|
|
48
|
+
"preversion": "node -e \"if(require('fs').existsSync('../../scripts/preversion-check.mjs'))require('child_process').execFileSync('node',['../../scripts/preversion-check.mjs'],{stdio:'inherit'})\"",
|
|
49
49
|
"build": "npm run typecheck && vite build && node scripts/copy-styles.mjs",
|
|
50
50
|
"test": "vitest run",
|
|
51
51
|
"typecheck": "tsc --noEmit"
|