@dloizides/auth-client 1.0.0 → 2.0.0

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dloizides/auth-client",
3
- "version": "1.0.0",
4
- "description": "Realm-aware Keycloak/OIDC client for the dloizides.com portfolio. PKCE flow, token refresh, storage abstraction. Takes realm and clientId as config no hardcoding.",
3
+ "version": "2.0.0",
4
+ "description": "Realm-aware Keycloak/OIDC client for the dloizides.com portfolio. PKCE flow, token refresh, storage abstraction. Adapters for browser cookie, secure storage (mobile), and biometric gating. Hooks for sessions and password reset.",
5
5
  "keywords": [
6
6
  "keycloak",
7
7
  "oidc",
@@ -32,6 +32,16 @@
32
32
  "types": "./dist/index.d.mts",
33
33
  "default": "./dist/index.mjs"
34
34
  }
35
+ },
36
+ "./react": {
37
+ "require": {
38
+ "types": "./dist/react.d.ts",
39
+ "default": "./dist/react.js"
40
+ },
41
+ "import": {
42
+ "types": "./dist/react.d.mts",
43
+ "default": "./dist/react.mjs"
44
+ }
35
45
  }
36
46
  },
37
47
  "files": [
@@ -49,25 +59,53 @@
49
59
  "test": "jest",
50
60
  "test:watch": "jest --watch",
51
61
  "test:coverage": "jest --coverage",
52
- "lint": "eslint src --ext .ts",
53
- "lint:fix": "eslint src --ext .ts --fix",
62
+ "lint": "eslint src --ext .ts,.tsx",
63
+ "lint:fix": "eslint src --ext .ts,.tsx --fix",
54
64
  "typecheck": "tsc --noEmit",
55
65
  "clean": "rimraf dist",
56
66
  "security:audit": "npm audit --audit-level=high",
57
67
  "deps:outdated": "npm outdated || exit 0",
58
- "deps:unused": "npx depcheck --ignores \"@types/jest,@types/node,rimraf\"",
68
+ "deps:unused": "npx depcheck --ignores \"@types/jest,@types/node,@types/react,@types/react-dom,@testing-library/jest-dom,jest-environment-jsdom,rimraf\"",
59
69
  "deps:licenses": "npx license-checker --onlyAllow \"MIT;Apache-2.0;ISC;BSD-2-Clause;BSD-3-Clause;0BSD;Unlicense;CC0-1.0\"",
60
70
  "deps:health": "npm run deps:outdated && npm run deps:unused",
61
71
  "prepublishOnly": "npm run clean && npm run build && npm run test"
62
72
  },
73
+ "peerDependencies": {
74
+ "@tanstack/react-query": "^5.0.0",
75
+ "expo-local-authentication": "*",
76
+ "expo-secure-store": "*",
77
+ "react": ">=17.0.0"
78
+ },
79
+ "peerDependenciesMeta": {
80
+ "@tanstack/react-query": {
81
+ "optional": true
82
+ },
83
+ "expo-local-authentication": {
84
+ "optional": true
85
+ },
86
+ "expo-secure-store": {
87
+ "optional": true
88
+ },
89
+ "react": {
90
+ "optional": true
91
+ }
92
+ },
63
93
  "devDependencies": {
94
+ "@tanstack/react-query": "^5.0.0",
95
+ "@testing-library/dom": "^10.0.0",
96
+ "@testing-library/react": "^16.0.0",
64
97
  "@types/jest": "^29.5.0",
65
98
  "@types/node": "^20.19.32",
99
+ "@types/react": "^18.3.0",
100
+ "@types/react-dom": "^18.3.0",
66
101
  "@typescript-eslint/eslint-plugin": "^7.0.0",
67
102
  "@typescript-eslint/parser": "^7.0.0",
68
103
  "eslint": "^8.57.0",
69
104
  "eslint-plugin-sonarjs": "^4.0.3",
70
105
  "jest": "^29.7.0",
106
+ "jest-environment-jsdom": "^29.7.0",
107
+ "react": "^18.3.0",
108
+ "react-dom": "^18.3.0",
71
109
  "rimraf": "^5.0.0",
72
110
  "ts-jest": "^29.1.0",
73
111
  "tsup": "^8.0.0",