@descope/nextjs-sdk 0.0.16 → 0.0.17
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/README.md +2 -2
- package/dist/client/dts/src/shared/AuthProvider.d.ts +1 -2
- package/dist/client/dts/src/shared/DescopeFlows.d.ts +28 -26
- package/dist/client/dts/src/shared/DescopeWidgets.d.ts +6 -5
- package/dist/client/dts/src/shared/index.d.ts +2 -0
- package/dist/dts/src/shared/AuthProvider.d.ts +1 -2
- package/dist/dts/src/shared/DescopeFlows.d.ts +28 -26
- package/dist/dts/src/shared/DescopeWidgets.d.ts +6 -5
- package/dist/dts/src/shared/index.d.ts +2 -0
- package/dist/index.d.ts +44 -43
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/server/constants.js +1 -1
- package/dist/server/dts/src/shared/AuthProvider.d.ts +1 -2
- package/dist/server/dts/src/shared/DescopeFlows.d.ts +28 -26
- package/dist/server/dts/src/shared/DescopeWidgets.d.ts +6 -5
- package/dist/server/dts/src/shared/index.d.ts +2 -0
- package/dist/shared/AuthProvider.js +2 -2
- package/dist/shared/AuthProvider.js.map +1 -1
- package/dist/shared/DescopeFlows.js.map +1 -1
- package/dist/shared/DescopeWidgets.js.map +1 -1
- package/dist/shared/constants.js +1 -1
- package/package.json +149 -151
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
The Descope SDK for NextJS provides convenient access to the Descope for an application written on top of NextJS. You can read more on the [Descope Website](https://descope.com).
|
|
4
4
|
|
|
5
5
|
This SDK uses under the hood the Descope React SDK and Descope Node SDK
|
|
6
|
-
Refer to the [Descope React SDK](https://github.com/descope/react-sdk) and [Descope Node SDK](https://github.com/descope/node-sdk) for more details.
|
|
6
|
+
Refer to the [Descope React SDK](https://github.com/descope/descope-js/tree/main/packages/sdks/react-sdk) and [Descope Node SDK](https://github.com/descope/node-sdk) for more details.
|
|
7
7
|
|
|
8
8
|
## Requirements
|
|
9
9
|
|
|
@@ -72,7 +72,7 @@ const Page = () => {
|
|
|
72
72
|
};
|
|
73
73
|
```
|
|
74
74
|
|
|
75
|
-
Refer to the [Descope React SDK Section](
|
|
75
|
+
Refer to the [Descope React SDK Section](../react-sdk/README.md) for a list of available props.
|
|
76
76
|
|
|
77
77
|
**Note:** Descope is a client component. if the component that renders it is a server component, you cannot pass `onSuccess`/`onError`/`errorTransformer`/`logger` props because they are not serializable. To redirect the user after the flow is completed, use the `redirectAfterSuccess` and `redirectAfterError` props.
|
|
78
78
|
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React, { ComponentProps } from 'react';
|
|
2
1
|
import { AuthProvider as AuthProviderComp } from '@descope/react-sdk';
|
|
3
|
-
declare const AuthProvider:
|
|
2
|
+
declare const AuthProvider: typeof AuthProviderComp;
|
|
4
3
|
export default AuthProvider;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type * as _1 from '@descope/react-sdk/node_modules/@types/react';
|
|
2
|
+
import type * as _2 from '@descope/react-sdk/node_modules/@descope/web-component/dist';
|
|
1
3
|
import React from 'react';
|
|
2
4
|
type AdditionalProps = {
|
|
3
5
|
redirectAfterSuccess?: string;
|
|
@@ -13,11 +15,11 @@ export declare const Descope: React.ComponentType<(({
|
|
|
13
15
|
retryAfter?: string;
|
|
14
16
|
}>) => void;
|
|
15
17
|
onReady?: (e: CustomEvent<{}>) => void;
|
|
16
|
-
logger?:
|
|
18
|
+
logger?: _2.ILogger;
|
|
17
19
|
tenant?: string;
|
|
18
|
-
theme?:
|
|
20
|
+
theme?: _2.ThemeOptions;
|
|
19
21
|
locale?: string;
|
|
20
|
-
autoFocus?:
|
|
22
|
+
autoFocus?: _2.AutoFocusOptions;
|
|
21
23
|
validateOnBlur?: boolean;
|
|
22
24
|
debug?: boolean;
|
|
23
25
|
telemetryKey?: string;
|
|
@@ -28,7 +30,7 @@ export declare const Descope: React.ComponentType<(({
|
|
|
28
30
|
}) => string;
|
|
29
31
|
form?: Record<string, any>;
|
|
30
32
|
client?: Record<string, any>;
|
|
31
|
-
} &
|
|
33
|
+
} & _1.RefAttributes<HTMLElement>) | ({
|
|
32
34
|
flowId: string;
|
|
33
35
|
onSuccess?: (e: CustomEvent<import("@descope/core-js-sdk").JWTResponse>) => void;
|
|
34
36
|
onError?: (e: CustomEvent<{
|
|
@@ -38,11 +40,11 @@ export declare const Descope: React.ComponentType<(({
|
|
|
38
40
|
retryAfter?: string;
|
|
39
41
|
}>) => void;
|
|
40
42
|
onReady?: (e: CustomEvent<{}>) => void;
|
|
41
|
-
logger?:
|
|
43
|
+
logger?: _2.ILogger;
|
|
42
44
|
tenant?: string;
|
|
43
|
-
theme?:
|
|
45
|
+
theme?: _2.ThemeOptions;
|
|
44
46
|
locale?: string;
|
|
45
|
-
autoFocus?:
|
|
47
|
+
autoFocus?: _2.AutoFocusOptions;
|
|
46
48
|
validateOnBlur?: boolean;
|
|
47
49
|
debug?: boolean;
|
|
48
50
|
telemetryKey?: string;
|
|
@@ -53,7 +55,7 @@ export declare const Descope: React.ComponentType<(({
|
|
|
53
55
|
}) => string;
|
|
54
56
|
form?: Record<string, any>;
|
|
55
57
|
client?: Record<string, any>;
|
|
56
|
-
} &
|
|
58
|
+
} & _1.RefAttributes<HTMLElement> & {
|
|
57
59
|
children?: React.ReactNode;
|
|
58
60
|
})) & AdditionalProps>;
|
|
59
61
|
export declare const SignInFlow: React.ComponentType<({
|
|
@@ -66,11 +68,11 @@ export declare const SignInFlow: React.ComponentType<({
|
|
|
66
68
|
retryAfter?: string;
|
|
67
69
|
}>) => void;
|
|
68
70
|
onReady?: (e: CustomEvent<{}>) => void;
|
|
69
|
-
logger?:
|
|
71
|
+
logger?: _2.ILogger;
|
|
70
72
|
tenant?: string;
|
|
71
|
-
theme?:
|
|
73
|
+
theme?: _2.ThemeOptions;
|
|
72
74
|
locale?: string;
|
|
73
|
-
autoFocus?:
|
|
75
|
+
autoFocus?: _2.AutoFocusOptions;
|
|
74
76
|
validateOnBlur?: boolean;
|
|
75
77
|
debug?: boolean;
|
|
76
78
|
telemetryKey?: string;
|
|
@@ -90,11 +92,11 @@ export declare const SignInFlow: React.ComponentType<({
|
|
|
90
92
|
retryAfter?: string;
|
|
91
93
|
}>) => void;
|
|
92
94
|
onReady?: (e: CustomEvent<{}>) => void;
|
|
93
|
-
logger?:
|
|
95
|
+
logger?: _2.ILogger;
|
|
94
96
|
tenant?: string;
|
|
95
|
-
theme?:
|
|
97
|
+
theme?: _2.ThemeOptions;
|
|
96
98
|
locale?: string;
|
|
97
|
-
autoFocus?:
|
|
99
|
+
autoFocus?: _2.AutoFocusOptions;
|
|
98
100
|
validateOnBlur?: boolean;
|
|
99
101
|
debug?: boolean;
|
|
100
102
|
telemetryKey?: string;
|
|
@@ -117,11 +119,11 @@ export declare const SignUpFlow: React.ComponentType<({
|
|
|
117
119
|
retryAfter?: string;
|
|
118
120
|
}>) => void;
|
|
119
121
|
onReady?: (e: CustomEvent<{}>) => void;
|
|
120
|
-
logger?:
|
|
122
|
+
logger?: _2.ILogger;
|
|
121
123
|
tenant?: string;
|
|
122
|
-
theme?:
|
|
124
|
+
theme?: _2.ThemeOptions;
|
|
123
125
|
locale?: string;
|
|
124
|
-
autoFocus?:
|
|
126
|
+
autoFocus?: _2.AutoFocusOptions;
|
|
125
127
|
validateOnBlur?: boolean;
|
|
126
128
|
debug?: boolean;
|
|
127
129
|
telemetryKey?: string;
|
|
@@ -141,11 +143,11 @@ export declare const SignUpFlow: React.ComponentType<({
|
|
|
141
143
|
retryAfter?: string;
|
|
142
144
|
}>) => void;
|
|
143
145
|
onReady?: (e: CustomEvent<{}>) => void;
|
|
144
|
-
logger?:
|
|
146
|
+
logger?: _2.ILogger;
|
|
145
147
|
tenant?: string;
|
|
146
|
-
theme?:
|
|
148
|
+
theme?: _2.ThemeOptions;
|
|
147
149
|
locale?: string;
|
|
148
|
-
autoFocus?:
|
|
150
|
+
autoFocus?: _2.AutoFocusOptions;
|
|
149
151
|
validateOnBlur?: boolean;
|
|
150
152
|
debug?: boolean;
|
|
151
153
|
telemetryKey?: string;
|
|
@@ -168,11 +170,11 @@ export declare const SignUpOrInFlow: React.ComponentType<({
|
|
|
168
170
|
retryAfter?: string;
|
|
169
171
|
}>) => void;
|
|
170
172
|
onReady?: (e: CustomEvent<{}>) => void;
|
|
171
|
-
logger?:
|
|
173
|
+
logger?: _2.ILogger;
|
|
172
174
|
tenant?: string;
|
|
173
|
-
theme?:
|
|
175
|
+
theme?: _2.ThemeOptions;
|
|
174
176
|
locale?: string;
|
|
175
|
-
autoFocus?:
|
|
177
|
+
autoFocus?: _2.AutoFocusOptions;
|
|
176
178
|
validateOnBlur?: boolean;
|
|
177
179
|
debug?: boolean;
|
|
178
180
|
telemetryKey?: string;
|
|
@@ -192,11 +194,11 @@ export declare const SignUpOrInFlow: React.ComponentType<({
|
|
|
192
194
|
retryAfter?: string;
|
|
193
195
|
}>) => void;
|
|
194
196
|
onReady?: (e: CustomEvent<{}>) => void;
|
|
195
|
-
logger?:
|
|
197
|
+
logger?: _2.ILogger;
|
|
196
198
|
tenant?: string;
|
|
197
|
-
theme?:
|
|
199
|
+
theme?: _2.ThemeOptions;
|
|
198
200
|
locale?: string;
|
|
199
|
-
autoFocus?:
|
|
201
|
+
autoFocus?: _2.AutoFocusOptions;
|
|
200
202
|
validateOnBlur?: boolean;
|
|
201
203
|
debug?: boolean;
|
|
202
204
|
telemetryKey?: string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type * as _1 from '@descope/react-sdk/node_modules/@types/react';
|
|
1
2
|
import { ComponentType } from 'react';
|
|
2
3
|
export declare const UserManagement: ComponentType<{
|
|
3
4
|
logger?: import("@descope/web-component").ILogger;
|
|
@@ -5,28 +6,28 @@ export declare const UserManagement: ComponentType<{
|
|
|
5
6
|
widgetId: string;
|
|
6
7
|
theme?: import("@descope/web-component").ThemeOptions;
|
|
7
8
|
debug?: boolean;
|
|
8
|
-
} &
|
|
9
|
+
} & _1.RefAttributes<HTMLElement>>;
|
|
9
10
|
export declare const RoleManagement: ComponentType<{
|
|
10
11
|
logger?: import("@descope/web-component").ILogger;
|
|
11
12
|
tenant: string;
|
|
12
13
|
widgetId: string;
|
|
13
14
|
theme?: import("@descope/web-component").ThemeOptions;
|
|
14
15
|
debug?: boolean;
|
|
15
|
-
} &
|
|
16
|
+
} & _1.RefAttributes<HTMLElement>>;
|
|
16
17
|
export declare const AccessKeyManagement: ComponentType<{
|
|
17
18
|
logger?: import("@descope/web-component").ILogger;
|
|
18
19
|
tenant: string;
|
|
19
20
|
widgetId: string;
|
|
20
21
|
theme?: import("@descope/web-component").ThemeOptions;
|
|
21
22
|
debug?: boolean;
|
|
22
|
-
} &
|
|
23
|
+
} & _1.RefAttributes<HTMLElement>>;
|
|
23
24
|
export declare const AuditManagement: ComponentType<{
|
|
24
25
|
logger?: import("@descope/web-component").ILogger;
|
|
25
26
|
tenant: string;
|
|
26
27
|
widgetId: string;
|
|
27
28
|
theme?: import("@descope/web-component").ThemeOptions;
|
|
28
29
|
debug?: boolean;
|
|
29
|
-
} &
|
|
30
|
+
} & _1.RefAttributes<HTMLElement>>;
|
|
30
31
|
export declare const UserProfile: ComponentType<Omit<{
|
|
31
32
|
logger?: import("@descope/web-component").ILogger;
|
|
32
33
|
tenant: string;
|
|
@@ -35,4 +36,4 @@ export declare const UserProfile: ComponentType<Omit<{
|
|
|
35
36
|
debug?: boolean;
|
|
36
37
|
}, "tenant"> & {
|
|
37
38
|
onLogout?: (e: CustomEvent<any>) => void;
|
|
38
|
-
} &
|
|
39
|
+
} & _1.RefAttributes<HTMLElement>>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React, { ComponentProps } from 'react';
|
|
2
1
|
import { AuthProvider as AuthProviderComp } from '@descope/react-sdk';
|
|
3
|
-
declare const AuthProvider:
|
|
2
|
+
declare const AuthProvider: typeof AuthProviderComp;
|
|
4
3
|
export default AuthProvider;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type * as _1 from '@descope/react-sdk/node_modules/@types/react';
|
|
2
|
+
import type * as _2 from '@descope/react-sdk/node_modules/@descope/web-component/dist';
|
|
1
3
|
import React from 'react';
|
|
2
4
|
type AdditionalProps = {
|
|
3
5
|
redirectAfterSuccess?: string;
|
|
@@ -13,11 +15,11 @@ export declare const Descope: React.ComponentType<(({
|
|
|
13
15
|
retryAfter?: string;
|
|
14
16
|
}>) => void;
|
|
15
17
|
onReady?: (e: CustomEvent<{}>) => void;
|
|
16
|
-
logger?:
|
|
18
|
+
logger?: _2.ILogger;
|
|
17
19
|
tenant?: string;
|
|
18
|
-
theme?:
|
|
20
|
+
theme?: _2.ThemeOptions;
|
|
19
21
|
locale?: string;
|
|
20
|
-
autoFocus?:
|
|
22
|
+
autoFocus?: _2.AutoFocusOptions;
|
|
21
23
|
validateOnBlur?: boolean;
|
|
22
24
|
debug?: boolean;
|
|
23
25
|
telemetryKey?: string;
|
|
@@ -28,7 +30,7 @@ export declare const Descope: React.ComponentType<(({
|
|
|
28
30
|
}) => string;
|
|
29
31
|
form?: Record<string, any>;
|
|
30
32
|
client?: Record<string, any>;
|
|
31
|
-
} &
|
|
33
|
+
} & _1.RefAttributes<HTMLElement>) | ({
|
|
32
34
|
flowId: string;
|
|
33
35
|
onSuccess?: (e: CustomEvent<import("@descope/core-js-sdk").JWTResponse>) => void;
|
|
34
36
|
onError?: (e: CustomEvent<{
|
|
@@ -38,11 +40,11 @@ export declare const Descope: React.ComponentType<(({
|
|
|
38
40
|
retryAfter?: string;
|
|
39
41
|
}>) => void;
|
|
40
42
|
onReady?: (e: CustomEvent<{}>) => void;
|
|
41
|
-
logger?:
|
|
43
|
+
logger?: _2.ILogger;
|
|
42
44
|
tenant?: string;
|
|
43
|
-
theme?:
|
|
45
|
+
theme?: _2.ThemeOptions;
|
|
44
46
|
locale?: string;
|
|
45
|
-
autoFocus?:
|
|
47
|
+
autoFocus?: _2.AutoFocusOptions;
|
|
46
48
|
validateOnBlur?: boolean;
|
|
47
49
|
debug?: boolean;
|
|
48
50
|
telemetryKey?: string;
|
|
@@ -53,7 +55,7 @@ export declare const Descope: React.ComponentType<(({
|
|
|
53
55
|
}) => string;
|
|
54
56
|
form?: Record<string, any>;
|
|
55
57
|
client?: Record<string, any>;
|
|
56
|
-
} &
|
|
58
|
+
} & _1.RefAttributes<HTMLElement> & {
|
|
57
59
|
children?: React.ReactNode;
|
|
58
60
|
})) & AdditionalProps>;
|
|
59
61
|
export declare const SignInFlow: React.ComponentType<({
|
|
@@ -66,11 +68,11 @@ export declare const SignInFlow: React.ComponentType<({
|
|
|
66
68
|
retryAfter?: string;
|
|
67
69
|
}>) => void;
|
|
68
70
|
onReady?: (e: CustomEvent<{}>) => void;
|
|
69
|
-
logger?:
|
|
71
|
+
logger?: _2.ILogger;
|
|
70
72
|
tenant?: string;
|
|
71
|
-
theme?:
|
|
73
|
+
theme?: _2.ThemeOptions;
|
|
72
74
|
locale?: string;
|
|
73
|
-
autoFocus?:
|
|
75
|
+
autoFocus?: _2.AutoFocusOptions;
|
|
74
76
|
validateOnBlur?: boolean;
|
|
75
77
|
debug?: boolean;
|
|
76
78
|
telemetryKey?: string;
|
|
@@ -90,11 +92,11 @@ export declare const SignInFlow: React.ComponentType<({
|
|
|
90
92
|
retryAfter?: string;
|
|
91
93
|
}>) => void;
|
|
92
94
|
onReady?: (e: CustomEvent<{}>) => void;
|
|
93
|
-
logger?:
|
|
95
|
+
logger?: _2.ILogger;
|
|
94
96
|
tenant?: string;
|
|
95
|
-
theme?:
|
|
97
|
+
theme?: _2.ThemeOptions;
|
|
96
98
|
locale?: string;
|
|
97
|
-
autoFocus?:
|
|
99
|
+
autoFocus?: _2.AutoFocusOptions;
|
|
98
100
|
validateOnBlur?: boolean;
|
|
99
101
|
debug?: boolean;
|
|
100
102
|
telemetryKey?: string;
|
|
@@ -117,11 +119,11 @@ export declare const SignUpFlow: React.ComponentType<({
|
|
|
117
119
|
retryAfter?: string;
|
|
118
120
|
}>) => void;
|
|
119
121
|
onReady?: (e: CustomEvent<{}>) => void;
|
|
120
|
-
logger?:
|
|
122
|
+
logger?: _2.ILogger;
|
|
121
123
|
tenant?: string;
|
|
122
|
-
theme?:
|
|
124
|
+
theme?: _2.ThemeOptions;
|
|
123
125
|
locale?: string;
|
|
124
|
-
autoFocus?:
|
|
126
|
+
autoFocus?: _2.AutoFocusOptions;
|
|
125
127
|
validateOnBlur?: boolean;
|
|
126
128
|
debug?: boolean;
|
|
127
129
|
telemetryKey?: string;
|
|
@@ -141,11 +143,11 @@ export declare const SignUpFlow: React.ComponentType<({
|
|
|
141
143
|
retryAfter?: string;
|
|
142
144
|
}>) => void;
|
|
143
145
|
onReady?: (e: CustomEvent<{}>) => void;
|
|
144
|
-
logger?:
|
|
146
|
+
logger?: _2.ILogger;
|
|
145
147
|
tenant?: string;
|
|
146
|
-
theme?:
|
|
148
|
+
theme?: _2.ThemeOptions;
|
|
147
149
|
locale?: string;
|
|
148
|
-
autoFocus?:
|
|
150
|
+
autoFocus?: _2.AutoFocusOptions;
|
|
149
151
|
validateOnBlur?: boolean;
|
|
150
152
|
debug?: boolean;
|
|
151
153
|
telemetryKey?: string;
|
|
@@ -168,11 +170,11 @@ export declare const SignUpOrInFlow: React.ComponentType<({
|
|
|
168
170
|
retryAfter?: string;
|
|
169
171
|
}>) => void;
|
|
170
172
|
onReady?: (e: CustomEvent<{}>) => void;
|
|
171
|
-
logger?:
|
|
173
|
+
logger?: _2.ILogger;
|
|
172
174
|
tenant?: string;
|
|
173
|
-
theme?:
|
|
175
|
+
theme?: _2.ThemeOptions;
|
|
174
176
|
locale?: string;
|
|
175
|
-
autoFocus?:
|
|
177
|
+
autoFocus?: _2.AutoFocusOptions;
|
|
176
178
|
validateOnBlur?: boolean;
|
|
177
179
|
debug?: boolean;
|
|
178
180
|
telemetryKey?: string;
|
|
@@ -192,11 +194,11 @@ export declare const SignUpOrInFlow: React.ComponentType<({
|
|
|
192
194
|
retryAfter?: string;
|
|
193
195
|
}>) => void;
|
|
194
196
|
onReady?: (e: CustomEvent<{}>) => void;
|
|
195
|
-
logger?:
|
|
197
|
+
logger?: _2.ILogger;
|
|
196
198
|
tenant?: string;
|
|
197
|
-
theme?:
|
|
199
|
+
theme?: _2.ThemeOptions;
|
|
198
200
|
locale?: string;
|
|
199
|
-
autoFocus?:
|
|
201
|
+
autoFocus?: _2.AutoFocusOptions;
|
|
200
202
|
validateOnBlur?: boolean;
|
|
201
203
|
debug?: boolean;
|
|
202
204
|
telemetryKey?: string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type * as _1 from '@descope/react-sdk/node_modules/@types/react';
|
|
1
2
|
import { ComponentType } from 'react';
|
|
2
3
|
export declare const UserManagement: ComponentType<{
|
|
3
4
|
logger?: import("@descope/web-component").ILogger;
|
|
@@ -5,28 +6,28 @@ export declare const UserManagement: ComponentType<{
|
|
|
5
6
|
widgetId: string;
|
|
6
7
|
theme?: import("@descope/web-component").ThemeOptions;
|
|
7
8
|
debug?: boolean;
|
|
8
|
-
} &
|
|
9
|
+
} & _1.RefAttributes<HTMLElement>>;
|
|
9
10
|
export declare const RoleManagement: ComponentType<{
|
|
10
11
|
logger?: import("@descope/web-component").ILogger;
|
|
11
12
|
tenant: string;
|
|
12
13
|
widgetId: string;
|
|
13
14
|
theme?: import("@descope/web-component").ThemeOptions;
|
|
14
15
|
debug?: boolean;
|
|
15
|
-
} &
|
|
16
|
+
} & _1.RefAttributes<HTMLElement>>;
|
|
16
17
|
export declare const AccessKeyManagement: ComponentType<{
|
|
17
18
|
logger?: import("@descope/web-component").ILogger;
|
|
18
19
|
tenant: string;
|
|
19
20
|
widgetId: string;
|
|
20
21
|
theme?: import("@descope/web-component").ThemeOptions;
|
|
21
22
|
debug?: boolean;
|
|
22
|
-
} &
|
|
23
|
+
} & _1.RefAttributes<HTMLElement>>;
|
|
23
24
|
export declare const AuditManagement: ComponentType<{
|
|
24
25
|
logger?: import("@descope/web-component").ILogger;
|
|
25
26
|
tenant: string;
|
|
26
27
|
widgetId: string;
|
|
27
28
|
theme?: import("@descope/web-component").ThemeOptions;
|
|
28
29
|
debug?: boolean;
|
|
29
|
-
} &
|
|
30
|
+
} & _1.RefAttributes<HTMLElement>>;
|
|
30
31
|
export declare const UserProfile: ComponentType<Omit<{
|
|
31
32
|
logger?: import("@descope/web-component").ILogger;
|
|
32
33
|
tenant: string;
|
|
@@ -35,4 +36,4 @@ export declare const UserProfile: ComponentType<Omit<{
|
|
|
35
36
|
debug?: boolean;
|
|
36
37
|
}, "tenant"> & {
|
|
37
38
|
onLogout?: (e: CustomEvent<any>) => void;
|
|
38
|
-
} &
|
|
39
|
+
} & _1.RefAttributes<HTMLElement>>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import React__default, { ComponentProps, ComponentType } from 'react';
|
|
3
1
|
import { AuthProvider as AuthProvider$1 } from '@descope/react-sdk';
|
|
4
|
-
import * as _descope_web_component from '@descope/web-component';
|
|
5
2
|
import * as _descope_core_js_sdk from '@descope/core-js-sdk';
|
|
3
|
+
import * as _1 from '@descope/react-sdk/node_modules/@types/react';
|
|
4
|
+
import * as _2 from '@descope/react-sdk/node_modules/@descope/web-component/dist';
|
|
5
|
+
import React, { ComponentType } from 'react';
|
|
6
|
+
import * as _descope_web_component from '@descope/web-component';
|
|
6
7
|
|
|
7
|
-
declare const AuthProvider:
|
|
8
|
+
declare const AuthProvider: typeof AuthProvider$1;
|
|
8
9
|
|
|
9
10
|
type AdditionalProps = {
|
|
10
11
|
redirectAfterSuccess?: string;
|
|
11
12
|
redirectAfterError?: string;
|
|
12
13
|
};
|
|
13
|
-
declare const Descope:
|
|
14
|
+
declare const Descope: React.ComponentType<(({
|
|
14
15
|
flowId: string;
|
|
15
16
|
onSuccess?: (e: CustomEvent<_descope_core_js_sdk.JWTResponse>) => void;
|
|
16
17
|
onError?: (e: CustomEvent<{
|
|
@@ -20,11 +21,11 @@ declare const Descope: React__default.ComponentType<(({
|
|
|
20
21
|
retryAfter?: string;
|
|
21
22
|
}>) => void;
|
|
22
23
|
onReady?: (e: CustomEvent<{}>) => void;
|
|
23
|
-
logger?:
|
|
24
|
+
logger?: _2.ILogger;
|
|
24
25
|
tenant?: string;
|
|
25
|
-
theme?:
|
|
26
|
+
theme?: _2.ThemeOptions;
|
|
26
27
|
locale?: string;
|
|
27
|
-
autoFocus?:
|
|
28
|
+
autoFocus?: _2.AutoFocusOptions;
|
|
28
29
|
validateOnBlur?: boolean;
|
|
29
30
|
debug?: boolean;
|
|
30
31
|
telemetryKey?: string;
|
|
@@ -35,7 +36,7 @@ declare const Descope: React__default.ComponentType<(({
|
|
|
35
36
|
}) => string;
|
|
36
37
|
form?: Record<string, any>;
|
|
37
38
|
client?: Record<string, any>;
|
|
38
|
-
} &
|
|
39
|
+
} & _1.RefAttributes<HTMLElement>) | ({
|
|
39
40
|
flowId: string;
|
|
40
41
|
onSuccess?: (e: CustomEvent<_descope_core_js_sdk.JWTResponse>) => void;
|
|
41
42
|
onError?: (e: CustomEvent<{
|
|
@@ -45,11 +46,11 @@ declare const Descope: React__default.ComponentType<(({
|
|
|
45
46
|
retryAfter?: string;
|
|
46
47
|
}>) => void;
|
|
47
48
|
onReady?: (e: CustomEvent<{}>) => void;
|
|
48
|
-
logger?:
|
|
49
|
+
logger?: _2.ILogger;
|
|
49
50
|
tenant?: string;
|
|
50
|
-
theme?:
|
|
51
|
+
theme?: _2.ThemeOptions;
|
|
51
52
|
locale?: string;
|
|
52
|
-
autoFocus?:
|
|
53
|
+
autoFocus?: _2.AutoFocusOptions;
|
|
53
54
|
validateOnBlur?: boolean;
|
|
54
55
|
debug?: boolean;
|
|
55
56
|
telemetryKey?: string;
|
|
@@ -60,10 +61,10 @@ declare const Descope: React__default.ComponentType<(({
|
|
|
60
61
|
}) => string;
|
|
61
62
|
form?: Record<string, any>;
|
|
62
63
|
client?: Record<string, any>;
|
|
63
|
-
} &
|
|
64
|
-
children?:
|
|
64
|
+
} & _1.RefAttributes<HTMLElement> & {
|
|
65
|
+
children?: React.ReactNode;
|
|
65
66
|
})) & AdditionalProps>;
|
|
66
|
-
declare const SignInFlow:
|
|
67
|
+
declare const SignInFlow: React.ComponentType<({
|
|
67
68
|
form?: Record<string, any>;
|
|
68
69
|
onSuccess?: (e: CustomEvent<_descope_core_js_sdk.JWTResponse>) => void;
|
|
69
70
|
onError?: (e: CustomEvent<{
|
|
@@ -73,11 +74,11 @@ declare const SignInFlow: React__default.ComponentType<({
|
|
|
73
74
|
retryAfter?: string;
|
|
74
75
|
}>) => void;
|
|
75
76
|
onReady?: (e: CustomEvent<{}>) => void;
|
|
76
|
-
logger?:
|
|
77
|
+
logger?: _2.ILogger;
|
|
77
78
|
tenant?: string;
|
|
78
|
-
theme?:
|
|
79
|
+
theme?: _2.ThemeOptions;
|
|
79
80
|
locale?: string;
|
|
80
|
-
autoFocus?:
|
|
81
|
+
autoFocus?: _2.AutoFocusOptions;
|
|
81
82
|
validateOnBlur?: boolean;
|
|
82
83
|
debug?: boolean;
|
|
83
84
|
telemetryKey?: string;
|
|
@@ -97,11 +98,11 @@ declare const SignInFlow: React__default.ComponentType<({
|
|
|
97
98
|
retryAfter?: string;
|
|
98
99
|
}>) => void;
|
|
99
100
|
onReady?: (e: CustomEvent<{}>) => void;
|
|
100
|
-
logger?:
|
|
101
|
+
logger?: _2.ILogger;
|
|
101
102
|
tenant?: string;
|
|
102
|
-
theme?:
|
|
103
|
+
theme?: _2.ThemeOptions;
|
|
103
104
|
locale?: string;
|
|
104
|
-
autoFocus?:
|
|
105
|
+
autoFocus?: _2.AutoFocusOptions;
|
|
105
106
|
validateOnBlur?: boolean;
|
|
106
107
|
debug?: boolean;
|
|
107
108
|
telemetryKey?: string;
|
|
@@ -112,9 +113,9 @@ declare const SignInFlow: React__default.ComponentType<({
|
|
|
112
113
|
}) => string;
|
|
113
114
|
client?: Record<string, any>;
|
|
114
115
|
} & {
|
|
115
|
-
children?:
|
|
116
|
+
children?: React.ReactNode;
|
|
116
117
|
})) & AdditionalProps>;
|
|
117
|
-
declare const SignUpFlow:
|
|
118
|
+
declare const SignUpFlow: React.ComponentType<({
|
|
118
119
|
form?: Record<string, any>;
|
|
119
120
|
onSuccess?: (e: CustomEvent<_descope_core_js_sdk.JWTResponse>) => void;
|
|
120
121
|
onError?: (e: CustomEvent<{
|
|
@@ -124,11 +125,11 @@ declare const SignUpFlow: React__default.ComponentType<({
|
|
|
124
125
|
retryAfter?: string;
|
|
125
126
|
}>) => void;
|
|
126
127
|
onReady?: (e: CustomEvent<{}>) => void;
|
|
127
|
-
logger?:
|
|
128
|
+
logger?: _2.ILogger;
|
|
128
129
|
tenant?: string;
|
|
129
|
-
theme?:
|
|
130
|
+
theme?: _2.ThemeOptions;
|
|
130
131
|
locale?: string;
|
|
131
|
-
autoFocus?:
|
|
132
|
+
autoFocus?: _2.AutoFocusOptions;
|
|
132
133
|
validateOnBlur?: boolean;
|
|
133
134
|
debug?: boolean;
|
|
134
135
|
telemetryKey?: string;
|
|
@@ -148,11 +149,11 @@ declare const SignUpFlow: React__default.ComponentType<({
|
|
|
148
149
|
retryAfter?: string;
|
|
149
150
|
}>) => void;
|
|
150
151
|
onReady?: (e: CustomEvent<{}>) => void;
|
|
151
|
-
logger?:
|
|
152
|
+
logger?: _2.ILogger;
|
|
152
153
|
tenant?: string;
|
|
153
|
-
theme?:
|
|
154
|
+
theme?: _2.ThemeOptions;
|
|
154
155
|
locale?: string;
|
|
155
|
-
autoFocus?:
|
|
156
|
+
autoFocus?: _2.AutoFocusOptions;
|
|
156
157
|
validateOnBlur?: boolean;
|
|
157
158
|
debug?: boolean;
|
|
158
159
|
telemetryKey?: string;
|
|
@@ -163,9 +164,9 @@ declare const SignUpFlow: React__default.ComponentType<({
|
|
|
163
164
|
}) => string;
|
|
164
165
|
client?: Record<string, any>;
|
|
165
166
|
} & {
|
|
166
|
-
children?:
|
|
167
|
+
children?: React.ReactNode;
|
|
167
168
|
})) & AdditionalProps>;
|
|
168
|
-
declare const SignUpOrInFlow:
|
|
169
|
+
declare const SignUpOrInFlow: React.ComponentType<({
|
|
169
170
|
form?: Record<string, any>;
|
|
170
171
|
onSuccess?: (e: CustomEvent<_descope_core_js_sdk.JWTResponse>) => void;
|
|
171
172
|
onError?: (e: CustomEvent<{
|
|
@@ -175,11 +176,11 @@ declare const SignUpOrInFlow: React__default.ComponentType<({
|
|
|
175
176
|
retryAfter?: string;
|
|
176
177
|
}>) => void;
|
|
177
178
|
onReady?: (e: CustomEvent<{}>) => void;
|
|
178
|
-
logger?:
|
|
179
|
+
logger?: _2.ILogger;
|
|
179
180
|
tenant?: string;
|
|
180
|
-
theme?:
|
|
181
|
+
theme?: _2.ThemeOptions;
|
|
181
182
|
locale?: string;
|
|
182
|
-
autoFocus?:
|
|
183
|
+
autoFocus?: _2.AutoFocusOptions;
|
|
183
184
|
validateOnBlur?: boolean;
|
|
184
185
|
debug?: boolean;
|
|
185
186
|
telemetryKey?: string;
|
|
@@ -199,11 +200,11 @@ declare const SignUpOrInFlow: React__default.ComponentType<({
|
|
|
199
200
|
retryAfter?: string;
|
|
200
201
|
}>) => void;
|
|
201
202
|
onReady?: (e: CustomEvent<{}>) => void;
|
|
202
|
-
logger?:
|
|
203
|
+
logger?: _2.ILogger;
|
|
203
204
|
tenant?: string;
|
|
204
|
-
theme?:
|
|
205
|
+
theme?: _2.ThemeOptions;
|
|
205
206
|
locale?: string;
|
|
206
|
-
autoFocus?:
|
|
207
|
+
autoFocus?: _2.AutoFocusOptions;
|
|
207
208
|
validateOnBlur?: boolean;
|
|
208
209
|
debug?: boolean;
|
|
209
210
|
telemetryKey?: string;
|
|
@@ -214,7 +215,7 @@ declare const SignUpOrInFlow: React__default.ComponentType<({
|
|
|
214
215
|
}) => string;
|
|
215
216
|
client?: Record<string, any>;
|
|
216
217
|
} & {
|
|
217
|
-
children?:
|
|
218
|
+
children?: React.ReactNode;
|
|
218
219
|
})) & AdditionalProps>;
|
|
219
220
|
|
|
220
221
|
declare const UserManagement: ComponentType<{
|
|
@@ -223,28 +224,28 @@ declare const UserManagement: ComponentType<{
|
|
|
223
224
|
widgetId: string;
|
|
224
225
|
theme?: _descope_web_component.ThemeOptions;
|
|
225
226
|
debug?: boolean;
|
|
226
|
-
} &
|
|
227
|
+
} & _1.RefAttributes<HTMLElement>>;
|
|
227
228
|
declare const RoleManagement: ComponentType<{
|
|
228
229
|
logger?: _descope_web_component.ILogger;
|
|
229
230
|
tenant: string;
|
|
230
231
|
widgetId: string;
|
|
231
232
|
theme?: _descope_web_component.ThemeOptions;
|
|
232
233
|
debug?: boolean;
|
|
233
|
-
} &
|
|
234
|
+
} & _1.RefAttributes<HTMLElement>>;
|
|
234
235
|
declare const AccessKeyManagement: ComponentType<{
|
|
235
236
|
logger?: _descope_web_component.ILogger;
|
|
236
237
|
tenant: string;
|
|
237
238
|
widgetId: string;
|
|
238
239
|
theme?: _descope_web_component.ThemeOptions;
|
|
239
240
|
debug?: boolean;
|
|
240
|
-
} &
|
|
241
|
+
} & _1.RefAttributes<HTMLElement>>;
|
|
241
242
|
declare const AuditManagement: ComponentType<{
|
|
242
243
|
logger?: _descope_web_component.ILogger;
|
|
243
244
|
tenant: string;
|
|
244
245
|
widgetId: string;
|
|
245
246
|
theme?: _descope_web_component.ThemeOptions;
|
|
246
247
|
debug?: boolean;
|
|
247
|
-
} &
|
|
248
|
+
} & _1.RefAttributes<HTMLElement>>;
|
|
248
249
|
declare const UserProfile: ComponentType<Omit<{
|
|
249
250
|
logger?: _descope_web_component.ILogger;
|
|
250
251
|
tenant: string;
|
|
@@ -253,6 +254,6 @@ declare const UserProfile: ComponentType<Omit<{
|
|
|
253
254
|
debug?: boolean;
|
|
254
255
|
}, "tenant"> & {
|
|
255
256
|
onLogout?: (e: CustomEvent<any>) => void;
|
|
256
|
-
} &
|
|
257
|
+
} & _1.RefAttributes<HTMLElement>>;
|
|
257
258
|
|
|
258
259
|
export { AccessKeyManagement, AuditManagement, AuthProvider, Descope, RoleManagement, SignInFlow, SignUpFlow, SignUpOrInFlow, UserManagement, UserProfile };
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import '@descope/core-js-sdk';
|
|
2
|
+
import '@descope/web-component';
|
|
1
3
|
export { default as AuthProvider } from './shared/AuthProvider.js';
|
|
2
4
|
export { Descope, SignInFlow, SignUpFlow, SignUpOrInFlow } from './shared/DescopeFlows.js';
|
|
3
5
|
export { AccessKeyManagement, AuditManagement, RoleManagement, UserManagement, UserProfile } from './shared/DescopeWidgets.js';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
package/dist/server/constants.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const DESCOPE_SESSION_HEADER = 'x-descope-session';
|
|
2
2
|
const baseHeaders = {
|
|
3
3
|
'x-descope-sdk-name': 'nextjs',
|
|
4
|
-
'x-descope-sdk-version': "0.0.
|
|
4
|
+
'x-descope-sdk-version': "0.0.17"
|
|
5
5
|
};
|
|
6
6
|
const DEFAULT_PUBLIC_ROUTES = {
|
|
7
7
|
signIn: process.env.SIGN_IN_ROUTE || '/sign-in',
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React, { ComponentProps } from 'react';
|
|
2
1
|
import { AuthProvider as AuthProviderComp } from '@descope/react-sdk';
|
|
3
|
-
declare const AuthProvider:
|
|
2
|
+
declare const AuthProvider: typeof AuthProviderComp;
|
|
4
3
|
export default AuthProvider;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type * as _1 from '@descope/react-sdk/node_modules/@types/react';
|
|
2
|
+
import type * as _2 from '@descope/react-sdk/node_modules/@descope/web-component/dist';
|
|
1
3
|
import React from 'react';
|
|
2
4
|
type AdditionalProps = {
|
|
3
5
|
redirectAfterSuccess?: string;
|
|
@@ -13,11 +15,11 @@ export declare const Descope: React.ComponentType<(({
|
|
|
13
15
|
retryAfter?: string;
|
|
14
16
|
}>) => void;
|
|
15
17
|
onReady?: (e: CustomEvent<{}>) => void;
|
|
16
|
-
logger?:
|
|
18
|
+
logger?: _2.ILogger;
|
|
17
19
|
tenant?: string;
|
|
18
|
-
theme?:
|
|
20
|
+
theme?: _2.ThemeOptions;
|
|
19
21
|
locale?: string;
|
|
20
|
-
autoFocus?:
|
|
22
|
+
autoFocus?: _2.AutoFocusOptions;
|
|
21
23
|
validateOnBlur?: boolean;
|
|
22
24
|
debug?: boolean;
|
|
23
25
|
telemetryKey?: string;
|
|
@@ -28,7 +30,7 @@ export declare const Descope: React.ComponentType<(({
|
|
|
28
30
|
}) => string;
|
|
29
31
|
form?: Record<string, any>;
|
|
30
32
|
client?: Record<string, any>;
|
|
31
|
-
} &
|
|
33
|
+
} & _1.RefAttributes<HTMLElement>) | ({
|
|
32
34
|
flowId: string;
|
|
33
35
|
onSuccess?: (e: CustomEvent<import("@descope/core-js-sdk").JWTResponse>) => void;
|
|
34
36
|
onError?: (e: CustomEvent<{
|
|
@@ -38,11 +40,11 @@ export declare const Descope: React.ComponentType<(({
|
|
|
38
40
|
retryAfter?: string;
|
|
39
41
|
}>) => void;
|
|
40
42
|
onReady?: (e: CustomEvent<{}>) => void;
|
|
41
|
-
logger?:
|
|
43
|
+
logger?: _2.ILogger;
|
|
42
44
|
tenant?: string;
|
|
43
|
-
theme?:
|
|
45
|
+
theme?: _2.ThemeOptions;
|
|
44
46
|
locale?: string;
|
|
45
|
-
autoFocus?:
|
|
47
|
+
autoFocus?: _2.AutoFocusOptions;
|
|
46
48
|
validateOnBlur?: boolean;
|
|
47
49
|
debug?: boolean;
|
|
48
50
|
telemetryKey?: string;
|
|
@@ -53,7 +55,7 @@ export declare const Descope: React.ComponentType<(({
|
|
|
53
55
|
}) => string;
|
|
54
56
|
form?: Record<string, any>;
|
|
55
57
|
client?: Record<string, any>;
|
|
56
|
-
} &
|
|
58
|
+
} & _1.RefAttributes<HTMLElement> & {
|
|
57
59
|
children?: React.ReactNode;
|
|
58
60
|
})) & AdditionalProps>;
|
|
59
61
|
export declare const SignInFlow: React.ComponentType<({
|
|
@@ -66,11 +68,11 @@ export declare const SignInFlow: React.ComponentType<({
|
|
|
66
68
|
retryAfter?: string;
|
|
67
69
|
}>) => void;
|
|
68
70
|
onReady?: (e: CustomEvent<{}>) => void;
|
|
69
|
-
logger?:
|
|
71
|
+
logger?: _2.ILogger;
|
|
70
72
|
tenant?: string;
|
|
71
|
-
theme?:
|
|
73
|
+
theme?: _2.ThemeOptions;
|
|
72
74
|
locale?: string;
|
|
73
|
-
autoFocus?:
|
|
75
|
+
autoFocus?: _2.AutoFocusOptions;
|
|
74
76
|
validateOnBlur?: boolean;
|
|
75
77
|
debug?: boolean;
|
|
76
78
|
telemetryKey?: string;
|
|
@@ -90,11 +92,11 @@ export declare const SignInFlow: React.ComponentType<({
|
|
|
90
92
|
retryAfter?: string;
|
|
91
93
|
}>) => void;
|
|
92
94
|
onReady?: (e: CustomEvent<{}>) => void;
|
|
93
|
-
logger?:
|
|
95
|
+
logger?: _2.ILogger;
|
|
94
96
|
tenant?: string;
|
|
95
|
-
theme?:
|
|
97
|
+
theme?: _2.ThemeOptions;
|
|
96
98
|
locale?: string;
|
|
97
|
-
autoFocus?:
|
|
99
|
+
autoFocus?: _2.AutoFocusOptions;
|
|
98
100
|
validateOnBlur?: boolean;
|
|
99
101
|
debug?: boolean;
|
|
100
102
|
telemetryKey?: string;
|
|
@@ -117,11 +119,11 @@ export declare const SignUpFlow: React.ComponentType<({
|
|
|
117
119
|
retryAfter?: string;
|
|
118
120
|
}>) => void;
|
|
119
121
|
onReady?: (e: CustomEvent<{}>) => void;
|
|
120
|
-
logger?:
|
|
122
|
+
logger?: _2.ILogger;
|
|
121
123
|
tenant?: string;
|
|
122
|
-
theme?:
|
|
124
|
+
theme?: _2.ThemeOptions;
|
|
123
125
|
locale?: string;
|
|
124
|
-
autoFocus?:
|
|
126
|
+
autoFocus?: _2.AutoFocusOptions;
|
|
125
127
|
validateOnBlur?: boolean;
|
|
126
128
|
debug?: boolean;
|
|
127
129
|
telemetryKey?: string;
|
|
@@ -141,11 +143,11 @@ export declare const SignUpFlow: React.ComponentType<({
|
|
|
141
143
|
retryAfter?: string;
|
|
142
144
|
}>) => void;
|
|
143
145
|
onReady?: (e: CustomEvent<{}>) => void;
|
|
144
|
-
logger?:
|
|
146
|
+
logger?: _2.ILogger;
|
|
145
147
|
tenant?: string;
|
|
146
|
-
theme?:
|
|
148
|
+
theme?: _2.ThemeOptions;
|
|
147
149
|
locale?: string;
|
|
148
|
-
autoFocus?:
|
|
150
|
+
autoFocus?: _2.AutoFocusOptions;
|
|
149
151
|
validateOnBlur?: boolean;
|
|
150
152
|
debug?: boolean;
|
|
151
153
|
telemetryKey?: string;
|
|
@@ -168,11 +170,11 @@ export declare const SignUpOrInFlow: React.ComponentType<({
|
|
|
168
170
|
retryAfter?: string;
|
|
169
171
|
}>) => void;
|
|
170
172
|
onReady?: (e: CustomEvent<{}>) => void;
|
|
171
|
-
logger?:
|
|
173
|
+
logger?: _2.ILogger;
|
|
172
174
|
tenant?: string;
|
|
173
|
-
theme?:
|
|
175
|
+
theme?: _2.ThemeOptions;
|
|
174
176
|
locale?: string;
|
|
175
|
-
autoFocus?:
|
|
177
|
+
autoFocus?: _2.AutoFocusOptions;
|
|
176
178
|
validateOnBlur?: boolean;
|
|
177
179
|
debug?: boolean;
|
|
178
180
|
telemetryKey?: string;
|
|
@@ -192,11 +194,11 @@ export declare const SignUpOrInFlow: React.ComponentType<({
|
|
|
192
194
|
retryAfter?: string;
|
|
193
195
|
}>) => void;
|
|
194
196
|
onReady?: (e: CustomEvent<{}>) => void;
|
|
195
|
-
logger?:
|
|
197
|
+
logger?: _2.ILogger;
|
|
196
198
|
tenant?: string;
|
|
197
|
-
theme?:
|
|
199
|
+
theme?: _2.ThemeOptions;
|
|
198
200
|
locale?: string;
|
|
199
|
-
autoFocus?:
|
|
201
|
+
autoFocus?: _2.AutoFocusOptions;
|
|
200
202
|
validateOnBlur?: boolean;
|
|
201
203
|
debug?: boolean;
|
|
202
204
|
telemetryKey?: string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type * as _1 from '@descope/react-sdk/node_modules/@types/react';
|
|
1
2
|
import { ComponentType } from 'react';
|
|
2
3
|
export declare const UserManagement: ComponentType<{
|
|
3
4
|
logger?: import("@descope/web-component").ILogger;
|
|
@@ -5,28 +6,28 @@ export declare const UserManagement: ComponentType<{
|
|
|
5
6
|
widgetId: string;
|
|
6
7
|
theme?: import("@descope/web-component").ThemeOptions;
|
|
7
8
|
debug?: boolean;
|
|
8
|
-
} &
|
|
9
|
+
} & _1.RefAttributes<HTMLElement>>;
|
|
9
10
|
export declare const RoleManagement: ComponentType<{
|
|
10
11
|
logger?: import("@descope/web-component").ILogger;
|
|
11
12
|
tenant: string;
|
|
12
13
|
widgetId: string;
|
|
13
14
|
theme?: import("@descope/web-component").ThemeOptions;
|
|
14
15
|
debug?: boolean;
|
|
15
|
-
} &
|
|
16
|
+
} & _1.RefAttributes<HTMLElement>>;
|
|
16
17
|
export declare const AccessKeyManagement: ComponentType<{
|
|
17
18
|
logger?: import("@descope/web-component").ILogger;
|
|
18
19
|
tenant: string;
|
|
19
20
|
widgetId: string;
|
|
20
21
|
theme?: import("@descope/web-component").ThemeOptions;
|
|
21
22
|
debug?: boolean;
|
|
22
|
-
} &
|
|
23
|
+
} & _1.RefAttributes<HTMLElement>>;
|
|
23
24
|
export declare const AuditManagement: ComponentType<{
|
|
24
25
|
logger?: import("@descope/web-component").ILogger;
|
|
25
26
|
tenant: string;
|
|
26
27
|
widgetId: string;
|
|
27
28
|
theme?: import("@descope/web-component").ThemeOptions;
|
|
28
29
|
debug?: boolean;
|
|
29
|
-
} &
|
|
30
|
+
} & _1.RefAttributes<HTMLElement>>;
|
|
30
31
|
export declare const UserProfile: ComponentType<Omit<{
|
|
31
32
|
logger?: import("@descope/web-component").ILogger;
|
|
32
33
|
tenant: string;
|
|
@@ -35,4 +36,4 @@ export declare const UserProfile: ComponentType<Omit<{
|
|
|
35
36
|
debug?: boolean;
|
|
36
37
|
}, "tenant"> & {
|
|
37
38
|
onLogout?: (e: CustomEvent<any>) => void;
|
|
38
|
-
} &
|
|
39
|
+
} & _1.RefAttributes<HTMLElement>>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import React from 'react';
|
|
3
2
|
import { baseHeaders, AuthProvider as AuthProvider$1 } from '@descope/react-sdk';
|
|
3
|
+
import React from 'react';
|
|
4
4
|
import { baseHeaders as baseHeaders$1 } from './constants.js';
|
|
5
5
|
|
|
6
6
|
// Override baseHeaders
|
|
7
7
|
Object.assign(baseHeaders, baseHeaders$1);
|
|
8
|
-
const AuthProvider = (props) => (
|
|
8
|
+
const AuthProvider = ({ ...props }) => (
|
|
9
9
|
// by default we use sessionTokenViaCookie, so middleware will work out of the box
|
|
10
10
|
React.createElement(AuthProvider$1, { sessionTokenViaCookie: true, ...props }));
|
|
11
11
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthProvider.js","sources":["../../src/shared/AuthProvider.tsx"],"sourcesContent":["'use client';\n\nimport
|
|
1
|
+
{"version":3,"file":"AuthProvider.js","sources":["../../src/shared/AuthProvider.tsx"],"sourcesContent":["'use client';\n\nimport {\n\tAuthProvider as AuthProviderComp,\n\tbaseHeaders\n} from '@descope/react-sdk';\nimport React from 'react';\nimport { baseHeaders as nextBaseHeaders } from './constants';\n\n// Override baseHeaders\nObject.assign(baseHeaders, nextBaseHeaders);\n\nconst AuthProvider: typeof AuthProviderComp = ({ ...props }) => (\n\t// by default we use sessionTokenViaCookie, so middleware will work out of the box\n\t<AuthProviderComp sessionTokenViaCookie {...props} />\n);\n\nexport default AuthProvider;\n"],"names":[],"mappings":";;;;;AASA;AACA;AAEM;AACL;AACA;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DescopeFlows.js","sources":["../../src/shared/DescopeFlows.tsx"],"sourcesContent":["'use client';\n\nimport React, { ComponentType, ComponentProps } from 'react';\nimport dynamic from 'next/dynamic';\nimport { useRouter } from 'next/navigation';\nimport {\n\tDescope as DescopeWC,\n\tSignInFlow as SignInFlowWC,\n\tSignUpFlow as SignUpFlowWC,\n\tSignUpOrInFlow as SignUpOrInFlowWC\n} from '@descope/react-sdk';\nimport { baseHeaders as nextBaseHeaders } from './constants';\n\ntype DescopeWCProps = ComponentProps<typeof DescopeWC>;\ntype SignInFlowProps = ComponentProps<typeof SignInFlowWC>;\ntype SignUpFlowProps = ComponentProps<typeof SignUpFlowWC>;\ntype SignUpOrInFlowProps = ComponentProps<typeof SignUpOrInFlowWC>;\n\ntype AdditionalProps = {\n\tredirectAfterSuccess?: string;\n\tredirectAfterError?: string;\n};\n\ntype DynamicComponentProps = {\n\tonSuccess?: (...args: any[]) => void;\n\tonError?: (...args: any[]) => void;\n};\n\n// Generalized function to dynamically import components from @descope/react-sdk\n// Dynamic is needed because the Descope components has a side effect us\n// and NextJS will load the page on the server even if it is a client side only page\nconst dynamicDescopeComponent = <\n\tT extends ComponentType<DynamicComponentProps>\n>(\n\tcomponentName: string\n) =>\n\tdynamic<ComponentProps<T> & AdditionalProps>(\n\t\tasync () => {\n\t\t\tconst DescopeComponents = await import('@descope/react-sdk');\n\n\t\t\t// Override baseHeaders\n\t\t\tObject.assign(DescopeComponents.baseHeaders, nextBaseHeaders);\n\n\t\t\tconst Component = DescopeComponents[componentName];\n\t\t\treturn ({\n\t\t\t\tredirectAfterSuccess = '',\n\t\t\t\tredirectAfterError = '',\n\t\t\t\t...props\n\t\t\t}: ComponentProps<T> & AdditionalProps) => {\n\t\t\t\tconst router = useRouter();\n\t\t\t\tconst modifiedProps = { ...props };\n\n\t\t\t\tif (redirectAfterSuccess) {\n\t\t\t\t\tmodifiedProps.onSuccess = (...args) => {\n\t\t\t\t\t\tif (props.onSuccess) {\n\t\t\t\t\t\t\tprops.onSuccess(...args);\n\t\t\t\t\t\t}\n\t\t\t\t\t\trouter.push(redirectAfterSuccess);\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\tif (redirectAfterError) {\n\t\t\t\t\tmodifiedProps.onError = (...args) => {\n\t\t\t\t\t\tif (props.onError) {\n\t\t\t\t\t\t\tprops.onError(...args);\n\t\t\t\t\t\t}\n\t\t\t\t\t\trouter.push(redirectAfterError);\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\treturn <Component {...modifiedProps} />;\n\t\t\t};\n\t\t},\n\t\t{\n\t\t\tssr: false\n\t\t}\n\t);\n\nexport const Descope =\n\tdynamicDescopeComponent<React.ComponentType<DescopeWCProps>>('Descope');\nexport const SignInFlow =\n\tdynamicDescopeComponent<React.ComponentType<SignInFlowProps>>('SignInFlow');\nexport const SignUpFlow =\n\tdynamicDescopeComponent<React.ComponentType<SignUpFlowProps>>('SignUpFlow');\nexport const SignUpOrInFlow =\n\tdynamicDescopeComponent<React.ComponentType<SignUpOrInFlowProps>>(\n\t\t'SignUpOrInFlow'\n\t);\n"],"names":[],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"DescopeFlows.js","sources":["../../src/shared/DescopeFlows.tsx"],"sourcesContent":["'use client';\n\n// workaround for TS issue https://github.com/microsoft/TypeScript/issues/42873\n// eslint-disable-next-line\nimport type * as _1 from '@descope/react-sdk/node_modules/@types/react';\n// eslint-disable-next-line\nimport type * as _2 from '@descope/react-sdk/node_modules/@descope/web-component/dist';\n\nimport React, { ComponentType, ComponentProps } from 'react';\nimport dynamic from 'next/dynamic';\nimport { useRouter } from 'next/navigation';\nimport {\n\tDescope as DescopeWC,\n\tSignInFlow as SignInFlowWC,\n\tSignUpFlow as SignUpFlowWC,\n\tSignUpOrInFlow as SignUpOrInFlowWC\n} from '@descope/react-sdk';\nimport { baseHeaders as nextBaseHeaders } from './constants';\n\ntype DescopeWCProps = ComponentProps<typeof DescopeWC>;\ntype SignInFlowProps = ComponentProps<typeof SignInFlowWC>;\ntype SignUpFlowProps = ComponentProps<typeof SignUpFlowWC>;\ntype SignUpOrInFlowProps = ComponentProps<typeof SignUpOrInFlowWC>;\n\ntype AdditionalProps = {\n\tredirectAfterSuccess?: string;\n\tredirectAfterError?: string;\n};\n\ntype DynamicComponentProps = {\n\tonSuccess?: (...args: any[]) => void;\n\tonError?: (...args: any[]) => void;\n};\n\n// Generalized function to dynamically import components from @descope/react-sdk\n// Dynamic is needed because the Descope components has a side effect us\n// and NextJS will load the page on the server even if it is a client side only page\nconst dynamicDescopeComponent = <\n\tT extends ComponentType<DynamicComponentProps>\n>(\n\tcomponentName: string\n) =>\n\tdynamic<ComponentProps<T> & AdditionalProps>(\n\t\tasync () => {\n\t\t\tconst DescopeComponents = await import('@descope/react-sdk');\n\n\t\t\t// Override baseHeaders\n\t\t\tObject.assign(DescopeComponents.baseHeaders, nextBaseHeaders);\n\n\t\t\tconst Component = DescopeComponents[componentName];\n\t\t\treturn ({\n\t\t\t\tredirectAfterSuccess = '',\n\t\t\t\tredirectAfterError = '',\n\t\t\t\t...props\n\t\t\t}: ComponentProps<T> & AdditionalProps) => {\n\t\t\t\tconst router = useRouter();\n\t\t\t\tconst modifiedProps = { ...props };\n\n\t\t\t\tif (redirectAfterSuccess) {\n\t\t\t\t\tmodifiedProps.onSuccess = (...args) => {\n\t\t\t\t\t\tif (props.onSuccess) {\n\t\t\t\t\t\t\tprops.onSuccess(...args);\n\t\t\t\t\t\t}\n\t\t\t\t\t\trouter.push(redirectAfterSuccess);\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\tif (redirectAfterError) {\n\t\t\t\t\tmodifiedProps.onError = (...args) => {\n\t\t\t\t\t\tif (props.onError) {\n\t\t\t\t\t\t\tprops.onError(...args);\n\t\t\t\t\t\t}\n\t\t\t\t\t\trouter.push(redirectAfterError);\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\treturn <Component {...modifiedProps} />;\n\t\t\t};\n\t\t},\n\t\t{\n\t\t\tssr: false\n\t\t}\n\t);\n\nexport const Descope =\n\tdynamicDescopeComponent<React.ComponentType<DescopeWCProps>>('Descope');\nexport const SignInFlow =\n\tdynamicDescopeComponent<React.ComponentType<SignInFlowProps>>('SignInFlow');\nexport const SignUpFlow =\n\tdynamicDescopeComponent<React.ComponentType<SignUpFlowProps>>('SignUpFlow');\nexport const SignUpOrInFlow =\n\tdynamicDescopeComponent<React.ComponentType<SignUpOrInFlowProps>>(\n\t\t'SignUpOrInFlow'\n\t);\n"],"names":[],"mappings":";;;;;;AAkCA;AACA;AACA;AACA;AAOG;;;AAKA;AACA;AAKC;AACA;AAEA;AACC;;AAEE;AACA;AACD;AACD;AACA;AAED;AACC;;AAEE;AACA;AACD;AACD;AACA;AACD;AACD;AACD;AAEC;AACA;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DescopeWidgets.js","sources":["../../src/shared/DescopeWidgets.tsx"],"sourcesContent":["'use client';\n\nimport { ComponentType } from 'react';\nimport dynamic from 'next/dynamic';\nimport {\n\tUserManagement as UserManagementWC,\n\tRoleManagement as RoleManagementWC,\n\tAccessKeyManagement as AccessKeyManagementWC,\n\tAuditManagement as AuditManagementWC,\n\tUserProfile as UserProfileWc\n} from '@descope/react-sdk';\n\n// a helper function to dynamically load the components\n// This function prevents Next.js from trying to server-side render these components\n// Update the helper function to use generics for preserving component prop types\nconst dynamicWidgetComponent = <P extends {}>(Component: ComponentType<P>) =>\n\tdynamic<P>(() => Promise.resolve(Component), {\n\t\tssr: false // Disable server-side rendering for this component\n\t});\n\n// Use the helper function to create dynamically loaded components\nexport const UserManagement = dynamicWidgetComponent(UserManagementWC);\nexport const RoleManagement = dynamicWidgetComponent(RoleManagementWC);\nexport const AccessKeyManagement = dynamicWidgetComponent(\n\tAccessKeyManagementWC\n);\nexport const AuditManagement = dynamicWidgetComponent(AuditManagementWC);\nexport const UserProfile = dynamicWidgetComponent(UserProfileWc);\n"],"names":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"DescopeWidgets.js","sources":["../../src/shared/DescopeWidgets.tsx"],"sourcesContent":["'use client';\n\n// eslint-disable-next-line\nimport type * as _1 from '@descope/react-sdk/node_modules/@types/react';\n\nimport { ComponentType } from 'react';\nimport dynamic from 'next/dynamic';\nimport {\n\tUserManagement as UserManagementWC,\n\tRoleManagement as RoleManagementWC,\n\tAccessKeyManagement as AccessKeyManagementWC,\n\tAuditManagement as AuditManagementWC,\n\tUserProfile as UserProfileWc\n} from '@descope/react-sdk';\n\n// a helper function to dynamically load the components\n// This function prevents Next.js from trying to server-side render these components\n// Update the helper function to use generics for preserving component prop types\nconst dynamicWidgetComponent = <P extends {}>(Component: ComponentType<P>) =>\n\tdynamic<P>(() => Promise.resolve(Component), {\n\t\tssr: false // Disable server-side rendering for this component\n\t});\n\n// Use the helper function to create dynamically loaded components\nexport const UserManagement = dynamicWidgetComponent(UserManagementWC);\nexport const RoleManagement = dynamicWidgetComponent(RoleManagementWC);\nexport const AccessKeyManagement = dynamicWidgetComponent(\n\tAccessKeyManagementWC\n);\nexport const AuditManagement = dynamicWidgetComponent(AuditManagementWC);\nexport const UserProfile = dynamicWidgetComponent(UserProfileWc);\n"],"names":[],"mappings":";;;;AAeA;AACA;AACA;AACA;;AAGE;AAEF;;;;;;;"}
|
package/dist/shared/constants.js
CHANGED
package/package.json
CHANGED
|
@@ -1,152 +1,150 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
}
|
|
152
|
-
}
|
|
2
|
+
"name": "@descope/nextjs-sdk",
|
|
3
|
+
"version": "0.0.17",
|
|
4
|
+
"description": "Descope NextJS SDK",
|
|
5
|
+
"author": "Descope Team <info@descope.com>",
|
|
6
|
+
"homepage": "https://github.com/descope/descope-js",
|
|
7
|
+
"bugs": {
|
|
8
|
+
"url": "https://github.com/descope/descope-js/issues",
|
|
9
|
+
"email": "help@descope.com"
|
|
10
|
+
},
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "https://github.com/descope/descope-js.git"
|
|
14
|
+
},
|
|
15
|
+
"license": "MIT",
|
|
16
|
+
"type": "module",
|
|
17
|
+
"exports": {
|
|
18
|
+
".": {
|
|
19
|
+
"import": {
|
|
20
|
+
"types": "./dist/index.d.ts",
|
|
21
|
+
"default": "./dist/index.js"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"./client": {
|
|
25
|
+
"import": {
|
|
26
|
+
"types": "./dist/client/index.d.ts",
|
|
27
|
+
"default": "./dist/client/index.js"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"./server": {
|
|
31
|
+
"import": {
|
|
32
|
+
"types": "./dist/server/index.d.ts",
|
|
33
|
+
"default": "./dist/server/index.js"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"typesVersions": {
|
|
38
|
+
"*": {
|
|
39
|
+
"*": [
|
|
40
|
+
"dist/index.d.ts"
|
|
41
|
+
],
|
|
42
|
+
"client": [
|
|
43
|
+
"dist/client/index.d.ts"
|
|
44
|
+
],
|
|
45
|
+
"server": [
|
|
46
|
+
"dist/server/index.d.ts"
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"main": "dist/index.js",
|
|
51
|
+
"module": "dist/index.mjs",
|
|
52
|
+
"types": "dist/index.d.ts",
|
|
53
|
+
"files": [
|
|
54
|
+
"dist/**/*"
|
|
55
|
+
],
|
|
56
|
+
"lint-staged": {
|
|
57
|
+
"+(src|test|examples)/**/*.{js,ts,jsx,tsx}": [
|
|
58
|
+
"npm run lint",
|
|
59
|
+
"npm run format"
|
|
60
|
+
]
|
|
61
|
+
},
|
|
62
|
+
"dependencies": {
|
|
63
|
+
"@descope/node-sdk": "1.6.9",
|
|
64
|
+
"@descope/core-js-sdk": "2.24.0",
|
|
65
|
+
"@descope/web-component": "3.21.1",
|
|
66
|
+
"@descope/react-sdk": "2.0.60"
|
|
67
|
+
},
|
|
68
|
+
"devDependencies": {
|
|
69
|
+
"@babel/core": "7.23.9",
|
|
70
|
+
"@babel/preset-env": "7.23.9",
|
|
71
|
+
"@babel/preset-react": "7.23.3",
|
|
72
|
+
"@babel/preset-typescript": "7.23.3",
|
|
73
|
+
"@open-wc/rollup-plugin-html": "^1.2.5",
|
|
74
|
+
"@rollup/plugin-commonjs": "^25.0.7",
|
|
75
|
+
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
76
|
+
"@rollup/plugin-replace": "^5.0.5",
|
|
77
|
+
"@rollup/plugin-typescript": "^8.5.0",
|
|
78
|
+
"@swc/core": "^1.4.0",
|
|
79
|
+
"@testing-library/jest-dom": "^6.4.2",
|
|
80
|
+
"@testing-library/react": "^14.2.1",
|
|
81
|
+
"@types/jest": "^29.5.12",
|
|
82
|
+
"@types/react": "17.0.75",
|
|
83
|
+
"@types/react-dom": "18.2.18",
|
|
84
|
+
"@types/react-router-dom": "^5.3.3",
|
|
85
|
+
"babel": "^6.23.0",
|
|
86
|
+
"babel-jest": "^27.5.1",
|
|
87
|
+
"eslint": "8.56.0",
|
|
88
|
+
"eslint-config-airbnb": "19.0.4",
|
|
89
|
+
"eslint-config-airbnb-typescript": "17.1.0",
|
|
90
|
+
"eslint-config-prettier": "8.10.0",
|
|
91
|
+
"eslint-config-standard": "17.1.0",
|
|
92
|
+
"eslint-import-resolver-typescript": "2.7.1",
|
|
93
|
+
"eslint-plugin-import": "2.29.1",
|
|
94
|
+
"eslint-plugin-jest": "27.6.3",
|
|
95
|
+
"eslint-plugin-jest-dom": "4.0.3",
|
|
96
|
+
"eslint-plugin-jest-formatting": "3.1.0",
|
|
97
|
+
"eslint-plugin-jsx-a11y": "6.8.0",
|
|
98
|
+
"eslint-plugin-n": "15.7.0",
|
|
99
|
+
"eslint-plugin-no-only-tests": "3.1.0",
|
|
100
|
+
"eslint-plugin-prefer-arrow": "1.2.3",
|
|
101
|
+
"eslint-plugin-prettier": "4.2.1",
|
|
102
|
+
"eslint-plugin-promise": "6.1.1",
|
|
103
|
+
"eslint-plugin-react": "7.33.2",
|
|
104
|
+
"eslint-plugin-react-hooks": "4.6.0",
|
|
105
|
+
"eslint-plugin-testing-library": "5.11.1",
|
|
106
|
+
"git-format-staged": "^3.0.0",
|
|
107
|
+
"jest": "^29.7.0",
|
|
108
|
+
"jest-config": "^29.7.0",
|
|
109
|
+
"jest-environment-jsdom": "^29.7.0",
|
|
110
|
+
"jest-fetch-mock": "^3.0.3",
|
|
111
|
+
"lint-staged": "^13.3.0",
|
|
112
|
+
"msw": "^2.1.7",
|
|
113
|
+
"next": "^14.0.0",
|
|
114
|
+
"rollup": "^2.79.1",
|
|
115
|
+
"rollup-plugin-auto-external": "^2.0.0",
|
|
116
|
+
"rollup-plugin-browsersync": "^1.0.0",
|
|
117
|
+
"rollup-plugin-define": "^1.0.1",
|
|
118
|
+
"rollup-plugin-delete": "^2.0.0",
|
|
119
|
+
"rollup-plugin-dotenv": "^0.5.0",
|
|
120
|
+
"rollup-plugin-dts": "^4.2.3",
|
|
121
|
+
"rollup-plugin-livereload": "^2.0.5",
|
|
122
|
+
"rollup-plugin-preserve-directives": "^0.4.0",
|
|
123
|
+
"rollup-plugin-serve": "^2.0.3",
|
|
124
|
+
"rollup-plugin-swc3": "^0.11.0",
|
|
125
|
+
"rollup-plugin-terser": "^7.0.2",
|
|
126
|
+
"rollup-swc-preserve-directives": "^0.7.0",
|
|
127
|
+
"ts-node": "^10.9.2",
|
|
128
|
+
"typescript": "^4.9.5"
|
|
129
|
+
},
|
|
130
|
+
"peerDependencies": {
|
|
131
|
+
"@types/react": ">=18",
|
|
132
|
+
"next": ">=13",
|
|
133
|
+
"react": ">=18"
|
|
134
|
+
},
|
|
135
|
+
"optionalDependencies": {
|
|
136
|
+
"@descope/web-js-sdk": ">=1"
|
|
137
|
+
},
|
|
138
|
+
"engines": {
|
|
139
|
+
"node": "^18 || ^20"
|
|
140
|
+
},
|
|
141
|
+
"scripts": {
|
|
142
|
+
"build": "rollup -c",
|
|
143
|
+
"format": "prettier . -w --ignore-path .gitignore",
|
|
144
|
+
"format-check": "prettier . --check --ignore-path .gitignore",
|
|
145
|
+
"lint": "npm run lint-check -- --fix",
|
|
146
|
+
"lint-check": "eslint '+(src|test)/**/*.+(ts|tsx)'",
|
|
147
|
+
"start": "npm run build && (cd examples/app-router && npm run dev)",
|
|
148
|
+
"test": "jest"
|
|
149
|
+
}
|
|
150
|
+
}
|