@sqrzro/auth 4.0.0-alpha.5 → 4.0.0-alpha.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.
- package/.turbo/turbo-build.log +1 -1
- package/.turbo/turbo-dev.log +15 -19
- package/dist/components/Auth/index.d.ts +2 -5
- package/dist/components/Auth/index.js +4 -4
- package/dist/components/Password/index.d.ts +1 -1
- package/dist/components/Password/index.js +1 -1
- package/package.json +3 -3
- package/src/components/Auth/index.tsx +6 -12
- package/src/components/Password/index.tsx +2 -2
package/.turbo/turbo-build.log
CHANGED
package/.turbo/turbo-dev.log
CHANGED
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
|
|
2
|
-
> @sqrzro/auth@4.0.0-alpha.
|
|
2
|
+
> @sqrzro/auth@4.0.0-alpha.5 dev /Users/richard/Sites/@sqrzro/sqrzro/packages/auth
|
|
3
3
|
> tsc --watch
|
|
4
4
|
|
|
5
|
-
[2J[3J[H[[
|
|
5
|
+
[2J[3J[H[[90m2:01:09 PM[0m] Starting compilation in watch mode...
|
|
6
6
|
|
|
7
|
-
[[
|
|
7
|
+
[[90m2:01:11 PM[0m] Found 0 errors. Watching for file changes.
|
|
8
8
|
|
|
9
|
-
[2J[3J[H[[
|
|
10
|
-
|
|
11
|
-
[[90m9:53:26 AM[0m] Found 0 errors. Watching for file changes.
|
|
12
|
-
|
|
13
|
-
[2J[3J[H[[90m9:53:27 AM[0m] File change detected. Starting incremental compilation...
|
|
9
|
+
[2J[3J[H[[90m2:01:13 PM[0m] File change detected. Starting incremental compilation...
|
|
14
10
|
|
|
15
11
|
[96msrc/components/LogoutButton/server.ts[0m:[93m3[0m:[93m31[0m - [91merror[0m[90m TS7016: [0mCould not find a declaration file for module '@sqrzro/server/auth'. '/Users/richard/Sites/@sqrzro/sqrzro/packages/server/dist/auth/index.js' implicitly has an 'any' type.
|
|
16
12
|
Try `npm i --save-dev @types/sqrzro__server` if it exists or add a new declaration (.d.ts) file containing `declare module '@sqrzro/server/auth';`
|
|
@@ -72,26 +68,26 @@
|
|
|
72
68
|
[7m1[0m import { validateSession } from '@sqrzro/server/auth';
|
|
73
69
|
[7m [0m [91m ~~~~~~~~~~~~~~~~~~~~~[0m
|
|
74
70
|
|
|
75
|
-
[[
|
|
71
|
+
[[90m2:01:13 PM[0m] Found 10 errors. Watching for file changes.
|
|
76
72
|
|
|
77
|
-
[2J[3J[H[[
|
|
73
|
+
[2J[3J[H[[90m2:01:16 PM[0m] File change detected. Starting incremental compilation...
|
|
78
74
|
|
|
79
|
-
[[
|
|
75
|
+
[[90m2:01:16 PM[0m] Found 0 errors. Watching for file changes.
|
|
80
76
|
|
|
81
|
-
[2J[3J[H[[
|
|
77
|
+
[2J[3J[H[[90m2:13:49 PM[0m] File change detected. Starting incremental compilation...
|
|
82
78
|
|
|
83
|
-
[[
|
|
79
|
+
[[90m2:13:50 PM[0m] Found 0 errors. Watching for file changes.
|
|
84
80
|
|
|
85
|
-
[2J[3J[H[[
|
|
81
|
+
[2J[3J[H[[90m2:13:50 PM[0m] File change detected. Starting incremental compilation...
|
|
86
82
|
|
|
87
|
-
[[
|
|
83
|
+
[[90m2:13:50 PM[0m] Found 0 errors. Watching for file changes.
|
|
88
84
|
|
|
89
|
-
[2J[3J[H[[
|
|
85
|
+
[2J[3J[H[[90m2:21:47 PM[0m] File change detected. Starting incremental compilation...
|
|
90
86
|
|
|
91
|
-
[[
|
|
87
|
+
[[90m2:21:47 PM[0m] Found 0 errors. Watching for file changes.
|
|
92
88
|
|
|
93
|
-
[2J[3J[H[[
|
|
89
|
+
[2J[3J[H[[90m2:21:49 PM[0m] File change detected. Starting incremental compilation...
|
|
94
90
|
|
|
95
|
-
[[
|
|
91
|
+
[[90m2:21:49 PM[0m] Found 0 errors. Watching for file changes.
|
|
96
92
|
|
|
97
93
|
[41m[30m ELIFECYCLE [39m[49m [31mCommand failed.[39m
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
searchParams: Promise<Record<string, string>>;
|
|
4
|
-
}
|
|
5
|
-
declare function Auth({ params, searchParams }: Readonly<AuthProps>): React.ReactElement;
|
|
1
|
+
import type { NextPageProps } from '@sqrzro/ui/utility';
|
|
2
|
+
declare function Auth(props: NextPageProps): React.ReactElement;
|
|
6
3
|
export default Auth;
|
|
@@ -3,9 +3,9 @@ import { Suspense } from 'react';
|
|
|
3
3
|
import { notFound } from 'next/navigation';
|
|
4
4
|
import LoginForm from '../../forms/LoginForm';
|
|
5
5
|
import Password from '../Password';
|
|
6
|
-
async function AuthComponent({ params, searchParams
|
|
6
|
+
async function AuthComponent({ params, searchParams }) {
|
|
7
7
|
const awaitedParams = await params;
|
|
8
|
-
if (!Array.isArray(awaitedParams.auth) || awaitedParams.auth.length !== 1) {
|
|
8
|
+
if (!awaitedParams || !Array.isArray(awaitedParams.auth) || awaitedParams.auth.length !== 1) {
|
|
9
9
|
return notFound();
|
|
10
10
|
}
|
|
11
11
|
if (awaitedParams.auth[0] === 'login') {
|
|
@@ -19,7 +19,7 @@ async function AuthComponent({ params, searchParams, }) {
|
|
|
19
19
|
}
|
|
20
20
|
return notFound();
|
|
21
21
|
}
|
|
22
|
-
function Auth(
|
|
23
|
-
return (_jsxs("div", { children: ["AUTH PAGE HEADER", _jsx(Suspense, { children: _jsx(AuthComponent, {
|
|
22
|
+
function Auth(props) {
|
|
23
|
+
return (_jsxs("div", { children: ["AUTH PAGE HEADER", _jsx(Suspense, { children: _jsx(AuthComponent, { ...props }) })] }));
|
|
24
24
|
}
|
|
25
25
|
export default Auth;
|
|
@@ -4,7 +4,7 @@ import PasswordForm from '../../forms/PasswordForm';
|
|
|
4
4
|
import PasswordResetForm from '../../forms/PasswordResetForm';
|
|
5
5
|
async function Password({ searchParams }) {
|
|
6
6
|
const awaitedSearchParams = await searchParams;
|
|
7
|
-
if (awaitedSearchParams
|
|
7
|
+
if (awaitedSearchParams?.token) {
|
|
8
8
|
const validated = await validateReset('PASSWORD', awaitedSearchParams.token);
|
|
9
9
|
if (validated) {
|
|
10
10
|
return _jsx(PasswordResetForm, { token: awaitedSearchParams.token });
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sqrzro/auth",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "4.0.0-alpha.
|
|
4
|
+
"version": "4.0.0-alpha.6",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"zod": "^4.3.6",
|
|
9
|
-
"@sqrzro/server": "^4.0.0-alpha.
|
|
10
|
-
"@sqrzro/ui": "^4.0.0-alpha.
|
|
9
|
+
"@sqrzro/server": "^4.0.0-alpha.15",
|
|
10
|
+
"@sqrzro/ui": "^4.0.0-alpha.13"
|
|
11
11
|
},
|
|
12
12
|
"devDependencies": {
|
|
13
13
|
"@types/react": "^19.2.7",
|
|
@@ -1,22 +1,16 @@
|
|
|
1
1
|
import { Suspense } from 'react';
|
|
2
2
|
|
|
3
|
+
import type { NextPageProps } from '@sqrzro/ui/utility';
|
|
3
4
|
import { notFound } from 'next/navigation';
|
|
4
5
|
|
|
5
6
|
import LoginForm from '../../forms/LoginForm';
|
|
6
|
-
import Password from '../Password';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
params: Promise<Record<string, string>>;
|
|
10
|
-
searchParams: Promise<Record<string, string>>;
|
|
11
|
-
}
|
|
8
|
+
import Password from '../Password';
|
|
12
9
|
|
|
13
|
-
async function AuthComponent({
|
|
14
|
-
params,
|
|
15
|
-
searchParams,
|
|
16
|
-
}: Readonly<AuthProps>): Promise<React.ReactElement> {
|
|
10
|
+
async function AuthComponent({ params, searchParams }: NextPageProps): Promise<React.ReactElement> {
|
|
17
11
|
const awaitedParams = await params;
|
|
18
12
|
|
|
19
|
-
if (!Array.isArray(awaitedParams.auth) || awaitedParams.auth.length !== 1) {
|
|
13
|
+
if (!awaitedParams || !Array.isArray(awaitedParams.auth) || awaitedParams.auth.length !== 1) {
|
|
20
14
|
return notFound();
|
|
21
15
|
}
|
|
22
16
|
|
|
@@ -35,12 +29,12 @@ async function AuthComponent({
|
|
|
35
29
|
return notFound();
|
|
36
30
|
}
|
|
37
31
|
|
|
38
|
-
function Auth(
|
|
32
|
+
function Auth(props: NextPageProps): React.ReactElement {
|
|
39
33
|
return (
|
|
40
34
|
<div>
|
|
41
35
|
AUTH PAGE HEADER
|
|
42
36
|
<Suspense>
|
|
43
|
-
<AuthComponent
|
|
37
|
+
<AuthComponent {...props} />
|
|
44
38
|
</Suspense>
|
|
45
39
|
</div>
|
|
46
40
|
);
|
|
@@ -4,13 +4,13 @@ import PasswordForm from '../../forms/PasswordForm';
|
|
|
4
4
|
import PasswordResetForm from '../../forms/PasswordResetForm';
|
|
5
5
|
|
|
6
6
|
interface PasswordProps {
|
|
7
|
-
searchParams
|
|
7
|
+
searchParams?: Promise<Record<string, string>> | null;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
async function Password({ searchParams }: Readonly<PasswordProps>): Promise<React.ReactElement> {
|
|
11
11
|
const awaitedSearchParams = await searchParams;
|
|
12
12
|
|
|
13
|
-
if (awaitedSearchParams
|
|
13
|
+
if (awaitedSearchParams?.token) {
|
|
14
14
|
const validated = await validateReset('PASSWORD', awaitedSearchParams.token);
|
|
15
15
|
|
|
16
16
|
if (validated) {
|