@cedarjs/auth 4.2.1-next.0 → 4.2.1-next.258
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCurrentUser.d.ts","sourceRoot":"","sources":["../../src/AuthProvider/useCurrentUser.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AAIlE,eAAO,MAAM,cAAc,GAAI,oBAAoB,kBAAkB,WAGtC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"useCurrentUser.d.ts","sourceRoot":"","sources":["../../src/AuthProvider/useCurrentUser.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AAIlE,eAAO,MAAM,cAAc,GAAI,oBAAoB,kBAAkB,WAGtC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAyB7D,CAAA"}
|
|
@@ -13,12 +13,12 @@ const useCurrentUser = (authImplementation) => {
|
|
|
13
13
|
authorization: `Bearer ${token}`
|
|
14
14
|
},
|
|
15
15
|
body: JSON.stringify({
|
|
16
|
-
query: "query
|
|
16
|
+
query: "query __CEDAR__AUTH_GET_CURRENT_USER { cedar { currentUser } }"
|
|
17
17
|
})
|
|
18
18
|
});
|
|
19
19
|
if (response.ok) {
|
|
20
20
|
const { data } = await response.json();
|
|
21
|
-
return data?.
|
|
21
|
+
return data?.cedar?.currentUser;
|
|
22
22
|
} else {
|
|
23
23
|
throw new Error(
|
|
24
24
|
`Could not fetch current user: ${response.statusText} (${response.status})`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCurrentUser.d.ts","sourceRoot":"","sources":["../../../src/AuthProvider/useCurrentUser.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AAIlE,eAAO,MAAM,cAAc,GAAI,oBAAoB,kBAAkB,WAGtC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"useCurrentUser.d.ts","sourceRoot":"","sources":["../../../src/AuthProvider/useCurrentUser.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AAIlE,eAAO,MAAM,cAAc,GAAI,oBAAoB,kBAAkB,WAGtC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAyB7D,CAAA"}
|
|
@@ -36,12 +36,12 @@ const useCurrentUser = (authImplementation) => {
|
|
|
36
36
|
authorization: `Bearer ${token}`
|
|
37
37
|
},
|
|
38
38
|
body: JSON.stringify({
|
|
39
|
-
query: "query
|
|
39
|
+
query: "query __CEDAR__AUTH_GET_CURRENT_USER { cedar { currentUser } }"
|
|
40
40
|
})
|
|
41
41
|
});
|
|
42
42
|
if (response.ok) {
|
|
43
43
|
const { data } = await response.json();
|
|
44
|
-
return data?.
|
|
44
|
+
return data?.cedar?.currentUser;
|
|
45
45
|
} else {
|
|
46
46
|
throw new Error(
|
|
47
47
|
`Could not fetch current user: ${response.statusText} (${response.status})`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cedarjs/auth",
|
|
3
|
-
"version": "4.2.1-next.
|
|
3
|
+
"version": "4.2.1-next.258",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/cedarjs/cedar.git",
|
|
@@ -90,17 +90,17 @@
|
|
|
90
90
|
"react": "18.3.1"
|
|
91
91
|
},
|
|
92
92
|
"devDependencies": {
|
|
93
|
-
"@arethetypeswrong/cli": "0.18.
|
|
93
|
+
"@arethetypeswrong/cli": "0.18.4",
|
|
94
94
|
"@cedarjs/framework-tools": "4.2.0",
|
|
95
95
|
"@testing-library/jest-dom": "6.9.1",
|
|
96
96
|
"@testing-library/react": "14.3.1",
|
|
97
97
|
"concurrently": "9.2.1",
|
|
98
98
|
"msw": "1.3.5",
|
|
99
|
-
"publint": "0.3.
|
|
100
|
-
"tsx": "4.
|
|
99
|
+
"publint": "0.3.21",
|
|
100
|
+
"tsx": "4.22.4",
|
|
101
101
|
"type-fest": "5.6.0",
|
|
102
102
|
"typescript": "5.9.3",
|
|
103
|
-
"vitest": "3.2.
|
|
103
|
+
"vitest": "3.2.6"
|
|
104
104
|
},
|
|
105
105
|
"engines": {
|
|
106
106
|
"node": ">=24"
|