dn-react-router-toolkit 0.3.10 → 0.4.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/dist/api/create_handler.d.mts +3 -3
- package/dist/api/create_handler.d.ts +3 -3
- package/dist/api/create_handler.js +6 -38
- package/dist/api/create_handler.mjs +6 -55
- package/dist/api/index.js +6 -36
- package/dist/api/index.mjs +6 -55
- package/dist/auth/cookie_store.d.mts +10 -10
- package/dist/auth/cookie_store.d.ts +10 -10
- package/dist/auth/cookie_store.js +15 -11
- package/dist/auth/cookie_store.mjs +14 -10
- package/dist/auth/index.d.mts +3 -2
- package/dist/auth/index.d.ts +3 -2
- package/dist/auth/index.js +18 -17
- package/dist/auth/index.mjs +16 -15
- package/dist/auth/with_auth.js +2 -2
- package/dist/auth/with_auth.mjs +2 -2
- package/package.json +57 -120
- package/dist/auth/client/index.d.mts +0 -3
- package/dist/auth/client/index.d.ts +0 -3
- package/dist/auth/client/index.js +0 -58
- package/dist/auth/client/index.mjs +0 -21
- package/dist/auth/client/redirect_page.d.mts +0 -6
- package/dist/auth/client/redirect_page.d.ts +0 -6
- package/dist/auth/client/redirect_page.js +0 -53
- package/dist/auth/client/redirect_page.mjs +0 -18
- package/dist/auth/server/index.d.mts +0 -1
- package/dist/auth/server/index.d.ts +0 -1
- package/dist/auth/server/index.js +0 -24
- package/dist/auth/server/index.mjs +0 -2
- package/dist/file/client/index.d.mts +0 -1
- package/dist/file/client/index.d.ts +0 -1
- package/dist/file/client/index.js +0 -24
- package/dist/file/client/index.mjs +0 -2
- package/dist/file/index.d.mts +0 -1
- package/dist/file/index.d.ts +0 -1
- package/dist/file/index.js +0 -24
- package/dist/file/index.mjs +0 -2
- package/dist/file/server/index.d.mts +0 -1
- package/dist/file/server/index.d.ts +0 -1
- package/dist/file/server/index.js +0 -24
- package/dist/file/server/index.mjs +0 -2
- package/dist/http/index.d.mts +0 -1
- package/dist/http/index.d.ts +0 -1
- package/dist/http/index.js +0 -24
- package/dist/http/index.mjs +0 -2
- package/dist/index.d.mts +0 -8
- package/dist/index.d.ts +0 -8
- package/dist/index.js +0 -24
- package/dist/index.mjs +0 -2
- package/dist/modal/index.d.mts +0 -1
- package/dist/modal/index.d.ts +0 -1
- package/dist/modal/index.js +0 -24
- package/dist/modal/index.mjs +0 -2
- package/dist/text_editor/index.d.mts +0 -1
- package/dist/text_editor/index.d.ts +0 -1
- package/dist/text_editor/index.js +0 -24
- package/dist/text_editor/index.mjs +0 -2
package/dist/auth/index.js
CHANGED
|
@@ -15,17 +15,15 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
15
15
|
}
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
19
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
19
|
|
|
21
20
|
// src/auth/index.ts
|
|
22
21
|
var auth_exports = {};
|
|
23
22
|
__export(auth_exports, {
|
|
24
|
-
|
|
23
|
+
ReactRouterCookieManager: () => ReactRouterCookieManager,
|
|
25
24
|
createWithAuthHandler: () => createWithAuthHandler
|
|
26
25
|
});
|
|
27
26
|
module.exports = __toCommonJS(auth_exports);
|
|
28
|
-
__reExport(auth_exports, require("dn-react-toolkit/auth"), module.exports);
|
|
29
27
|
|
|
30
28
|
// src/auth/with_auth.ts
|
|
31
29
|
var toResponse = (result) => {
|
|
@@ -51,7 +49,7 @@ function createWithAuthHandler({ authService }) {
|
|
|
51
49
|
arg.request
|
|
52
50
|
);
|
|
53
51
|
if (accessToken) {
|
|
54
|
-
const payload = await authService.
|
|
52
|
+
const payload = await authService.accessTokenManager.verify(
|
|
55
53
|
accessToken
|
|
56
54
|
);
|
|
57
55
|
if (payload) {
|
|
@@ -71,7 +69,7 @@ function createWithAuthHandler({ authService }) {
|
|
|
71
69
|
);
|
|
72
70
|
const headers = new Headers();
|
|
73
71
|
headers.append("Set-Cookie", setCookieHeader);
|
|
74
|
-
const payload = authService.
|
|
72
|
+
const payload = authService.accessTokenManager.decode(
|
|
75
73
|
newAccessToken
|
|
76
74
|
);
|
|
77
75
|
return respond(payload, headers);
|
|
@@ -93,27 +91,30 @@ function createWithAuthHandler({ authService }) {
|
|
|
93
91
|
|
|
94
92
|
// src/auth/cookie_store.ts
|
|
95
93
|
var import_react_router = require("react-router");
|
|
96
|
-
var
|
|
94
|
+
var ReactRouterCookieManager = class {
|
|
95
|
+
name;
|
|
96
|
+
options;
|
|
97
97
|
store;
|
|
98
|
-
constructor(
|
|
99
|
-
this.
|
|
98
|
+
constructor(name) {
|
|
99
|
+
this.name = name;
|
|
100
|
+
this.options = {
|
|
100
101
|
path: "/",
|
|
101
102
|
httpOnly: process.env.NODE_ENV === "production",
|
|
102
103
|
secure: process.env.NODE_ENV === "production",
|
|
103
104
|
sameSite: "strict"
|
|
104
|
-
}
|
|
105
|
+
};
|
|
106
|
+
this.store = (0, import_react_router.createCookie)(this.name, this.options);
|
|
105
107
|
}
|
|
106
|
-
parse(request) {
|
|
107
|
-
const
|
|
108
|
-
return this.store.parse(
|
|
108
|
+
async parse(request, parseOptions) {
|
|
109
|
+
const cookieStore = request.headers.get("cookie") || "";
|
|
110
|
+
return this.store.parse(cookieStore, parseOptions);
|
|
109
111
|
}
|
|
110
|
-
serialize(value,
|
|
111
|
-
return this.store.serialize(value, options);
|
|
112
|
+
async serialize(value, serializeOptions) {
|
|
113
|
+
return this.store.serialize(value, { ...this.options, ...serializeOptions });
|
|
112
114
|
}
|
|
113
115
|
};
|
|
114
116
|
// Annotate the CommonJS export names for ESM import in node:
|
|
115
117
|
0 && (module.exports = {
|
|
116
|
-
|
|
117
|
-
createWithAuthHandler
|
|
118
|
-
...require("dn-react-toolkit/auth")
|
|
118
|
+
ReactRouterCookieManager,
|
|
119
|
+
createWithAuthHandler
|
|
119
120
|
});
|
package/dist/auth/index.mjs
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
// src/auth/index.ts
|
|
2
|
-
export * from "dn-react-toolkit/auth";
|
|
3
|
-
|
|
4
1
|
// src/auth/with_auth.ts
|
|
5
2
|
var toResponse = (result) => {
|
|
6
3
|
if (result instanceof Response) {
|
|
@@ -25,7 +22,7 @@ function createWithAuthHandler({ authService }) {
|
|
|
25
22
|
arg.request
|
|
26
23
|
);
|
|
27
24
|
if (accessToken) {
|
|
28
|
-
const payload = await authService.
|
|
25
|
+
const payload = await authService.accessTokenManager.verify(
|
|
29
26
|
accessToken
|
|
30
27
|
);
|
|
31
28
|
if (payload) {
|
|
@@ -45,7 +42,7 @@ function createWithAuthHandler({ authService }) {
|
|
|
45
42
|
);
|
|
46
43
|
const headers = new Headers();
|
|
47
44
|
headers.append("Set-Cookie", setCookieHeader);
|
|
48
|
-
const payload = authService.
|
|
45
|
+
const payload = authService.accessTokenManager.decode(
|
|
49
46
|
newAccessToken
|
|
50
47
|
);
|
|
51
48
|
return respond(payload, headers);
|
|
@@ -67,25 +64,29 @@ function createWithAuthHandler({ authService }) {
|
|
|
67
64
|
|
|
68
65
|
// src/auth/cookie_store.ts
|
|
69
66
|
import { createCookie } from "react-router";
|
|
70
|
-
var
|
|
67
|
+
var ReactRouterCookieManager = class {
|
|
68
|
+
name;
|
|
69
|
+
options;
|
|
71
70
|
store;
|
|
72
|
-
constructor(
|
|
73
|
-
this.
|
|
71
|
+
constructor(name) {
|
|
72
|
+
this.name = name;
|
|
73
|
+
this.options = {
|
|
74
74
|
path: "/",
|
|
75
75
|
httpOnly: process.env.NODE_ENV === "production",
|
|
76
76
|
secure: process.env.NODE_ENV === "production",
|
|
77
77
|
sameSite: "strict"
|
|
78
|
-
}
|
|
78
|
+
};
|
|
79
|
+
this.store = createCookie(this.name, this.options);
|
|
79
80
|
}
|
|
80
|
-
parse(request) {
|
|
81
|
-
const
|
|
82
|
-
return this.store.parse(
|
|
81
|
+
async parse(request, parseOptions) {
|
|
82
|
+
const cookieStore = request.headers.get("cookie") || "";
|
|
83
|
+
return this.store.parse(cookieStore, parseOptions);
|
|
83
84
|
}
|
|
84
|
-
serialize(value,
|
|
85
|
-
return this.store.serialize(value, options);
|
|
85
|
+
async serialize(value, serializeOptions) {
|
|
86
|
+
return this.store.serialize(value, { ...this.options, ...serializeOptions });
|
|
86
87
|
}
|
|
87
88
|
};
|
|
88
89
|
export {
|
|
89
|
-
|
|
90
|
+
ReactRouterCookieManager,
|
|
90
91
|
createWithAuthHandler
|
|
91
92
|
};
|
package/dist/auth/with_auth.js
CHANGED
|
@@ -46,7 +46,7 @@ function createWithAuthHandler({ authService }) {
|
|
|
46
46
|
arg.request
|
|
47
47
|
);
|
|
48
48
|
if (accessToken) {
|
|
49
|
-
const payload = await authService.
|
|
49
|
+
const payload = await authService.accessTokenManager.verify(
|
|
50
50
|
accessToken
|
|
51
51
|
);
|
|
52
52
|
if (payload) {
|
|
@@ -66,7 +66,7 @@ function createWithAuthHandler({ authService }) {
|
|
|
66
66
|
);
|
|
67
67
|
const headers = new Headers();
|
|
68
68
|
headers.append("Set-Cookie", setCookieHeader);
|
|
69
|
-
const payload = authService.
|
|
69
|
+
const payload = authService.accessTokenManager.decode(
|
|
70
70
|
newAccessToken
|
|
71
71
|
);
|
|
72
72
|
return respond(payload, headers);
|
package/dist/auth/with_auth.mjs
CHANGED
|
@@ -22,7 +22,7 @@ function createWithAuthHandler({ authService }) {
|
|
|
22
22
|
arg.request
|
|
23
23
|
);
|
|
24
24
|
if (accessToken) {
|
|
25
|
-
const payload = await authService.
|
|
25
|
+
const payload = await authService.accessTokenManager.verify(
|
|
26
26
|
accessToken
|
|
27
27
|
);
|
|
28
28
|
if (payload) {
|
|
@@ -42,7 +42,7 @@ function createWithAuthHandler({ authService }) {
|
|
|
42
42
|
);
|
|
43
43
|
const headers = new Headers();
|
|
44
44
|
headers.append("Set-Cookie", setCookieHeader);
|
|
45
|
-
const payload = authService.
|
|
45
|
+
const payload = authService.accessTokenManager.decode(
|
|
46
46
|
newAccessToken
|
|
47
47
|
);
|
|
48
48
|
return respond(payload, headers);
|
package/package.json
CHANGED
|
@@ -1,123 +1,60 @@
|
|
|
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
|
-
"types": "./dist/http/index.d.ts",
|
|
60
|
-
"import": "./dist/http/index.mjs",
|
|
61
|
-
"require": "./dist/http/index.js"
|
|
62
|
-
},
|
|
63
|
-
"./seo": {
|
|
64
|
-
"types": "./dist/seo/index.d.ts",
|
|
65
|
-
"import": "./dist/seo/index.mjs",
|
|
66
|
-
"require": "./dist/seo/index.js"
|
|
67
|
-
},
|
|
68
|
-
"./text_editor": {
|
|
69
|
-
"types": "./dist/text_editor/index.d.ts",
|
|
70
|
-
"import": "./dist/text_editor/index.mjs",
|
|
71
|
-
"require": "./dist/text_editor/index.js"
|
|
2
|
+
"name": "dn-react-router-toolkit",
|
|
3
|
+
"version": "0.4.0",
|
|
4
|
+
"types": "./dist/index.d.ts",
|
|
5
|
+
"main": "./dist/index.mjs",
|
|
6
|
+
"module": "./dist/index.js",
|
|
7
|
+
"exports": {
|
|
8
|
+
"./auth": {
|
|
9
|
+
"types": "./dist/auth/index.d.ts",
|
|
10
|
+
"import": "./dist/auth/index.mjs",
|
|
11
|
+
"require": "./dist/auth/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./api": {
|
|
14
|
+
"types": "./dist/api/index.d.ts",
|
|
15
|
+
"import": "./dist/api/index.mjs",
|
|
16
|
+
"require": "./dist/api/index.js"
|
|
17
|
+
},
|
|
18
|
+
"./client": {
|
|
19
|
+
"types": "./dist/client/index.d.ts",
|
|
20
|
+
"import": "./dist/client/index.mjs",
|
|
21
|
+
"require": "./dist/client/index.js"
|
|
22
|
+
},
|
|
23
|
+
"./seo": {
|
|
24
|
+
"types": "./dist/seo/index.d.ts",
|
|
25
|
+
"import": "./dist/seo/index.mjs",
|
|
26
|
+
"require": "./dist/seo/index.js"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"scripts": {
|
|
30
|
+
"build": "tsup",
|
|
31
|
+
"dev": "tsup --watch"
|
|
32
|
+
},
|
|
33
|
+
"repository": {
|
|
34
|
+
"type": "git",
|
|
35
|
+
"url": "git+https://github.com/dndnsoft/dn-react-router-toolkit.git"
|
|
36
|
+
},
|
|
37
|
+
"author": "",
|
|
38
|
+
"license": "MIT",
|
|
39
|
+
"bugs": {
|
|
40
|
+
"url": "https://github.com/dndnsoft/dn-react-router-toolkit/issues"
|
|
41
|
+
},
|
|
42
|
+
"homepage": "https://github.com/dndnsoft/dn-react-router-toolkit#readme",
|
|
43
|
+
"description": "",
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@types/node": "^24.10.1",
|
|
46
|
+
"@types/react": "^19",
|
|
47
|
+
"@types/react-dom": "^19",
|
|
48
|
+
"schema-dts": "^1.1.5",
|
|
49
|
+
"tsup": "^8.5.1",
|
|
50
|
+
"typescript": "^5.7.3"
|
|
51
|
+
},
|
|
52
|
+
"dependencies": {
|
|
53
|
+
"dn-react-toolkit": "0.2.7"
|
|
54
|
+
},
|
|
55
|
+
"peerDependencies": {
|
|
56
|
+
"react": "^19",
|
|
57
|
+
"react-dom": "^19",
|
|
58
|
+
"react-router": "^7"
|
|
72
59
|
}
|
|
73
|
-
},
|
|
74
|
-
"scripts": {
|
|
75
|
-
"build": "tsup",
|
|
76
|
-
"dev": "tsup --watch"
|
|
77
|
-
},
|
|
78
|
-
"repository": {
|
|
79
|
-
"type": "git",
|
|
80
|
-
"url": "git+https://github.com/dndnsoft/dn-react-router-toolkit.git"
|
|
81
|
-
},
|
|
82
|
-
"author": "",
|
|
83
|
-
"license": "MIT",
|
|
84
|
-
"bugs": {
|
|
85
|
-
"url": "https://github.com/dndnsoft/dn-react-router-toolkit/issues"
|
|
86
|
-
},
|
|
87
|
-
"homepage": "https://github.com/dndnsoft/dn-react-router-toolkit#readme",
|
|
88
|
-
"description": "",
|
|
89
|
-
"devDependencies": {
|
|
90
|
-
"@types/node": "^24.10.1",
|
|
91
|
-
"@types/nodemailer": "^7.0.4",
|
|
92
|
-
"@types/react": "^19",
|
|
93
|
-
"@types/react-dom": "^19",
|
|
94
|
-
"rimraf": "^6.0.1",
|
|
95
|
-
"schema-dts": "^1.1.5",
|
|
96
|
-
"tsup": "^8.5.1",
|
|
97
|
-
"typescript": "^5.7.3"
|
|
98
|
-
},
|
|
99
|
-
"dependencies": {
|
|
100
|
-
"@aws-sdk/client-s3": "^3.940.0",
|
|
101
|
-
"@aws-sdk/s3-request-presigner": "^3.940.0",
|
|
102
|
-
"bcryptjs": "^3.0.3",
|
|
103
|
-
"dn-react-toolkit": "0.2.3",
|
|
104
|
-
"jose": "^6.1.2",
|
|
105
|
-
"moment-timezone": "^0.6.0",
|
|
106
|
-
"nodemailer": "^7.0.11",
|
|
107
|
-
"prosemirror-commands": "^1.7.1",
|
|
108
|
-
"prosemirror-history": "^1.5.0",
|
|
109
|
-
"prosemirror-keymap": "^1.2.3",
|
|
110
|
-
"prosemirror-model": "^1.25.4",
|
|
111
|
-
"prosemirror-schema-list": "^1.5.1",
|
|
112
|
-
"prosemirror-state": "^1.4.4",
|
|
113
|
-
"prosemirror-view": "^1.41.3",
|
|
114
|
-
"react-icons": "^5.5.0",
|
|
115
|
-
"uuid": "^13.0.0"
|
|
116
|
-
},
|
|
117
|
-
"peerDependencies": {
|
|
118
|
-
"drizzle-orm": "^0.44",
|
|
119
|
-
"react": "^19",
|
|
120
|
-
"react-dom": "^19",
|
|
121
|
-
"react-router": "^7"
|
|
122
|
-
}
|
|
123
60
|
}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
21
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
-
mod
|
|
28
|
-
));
|
|
29
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
-
|
|
31
|
-
// src/auth/client/index.tsx
|
|
32
|
-
var client_exports = {};
|
|
33
|
-
__export(client_exports, {
|
|
34
|
-
RedirectPage: () => RedirectPage
|
|
35
|
-
});
|
|
36
|
-
module.exports = __toCommonJS(client_exports);
|
|
37
|
-
__reExport(client_exports, require("dn-react-toolkit/auth/client"), module.exports);
|
|
38
|
-
|
|
39
|
-
// src/auth/client/redirect_page.tsx
|
|
40
|
-
var import_react = __toESM(require("react"));
|
|
41
|
-
var import_react2 = require("react");
|
|
42
|
-
var import_react_router = require("react-router");
|
|
43
|
-
function RedirectPage() {
|
|
44
|
-
const navigate = (0, import_react_router.useNavigate)();
|
|
45
|
-
(0, import_react2.useEffect)(() => {
|
|
46
|
-
const searchParams = new URLSearchParams(window.location.search);
|
|
47
|
-
const redirectUrl = searchParams.get("redirectUrl") || new URL("/", window.location.origin).toString();
|
|
48
|
-
if (redirectUrl) {
|
|
49
|
-
navigate(redirectUrl);
|
|
50
|
-
}
|
|
51
|
-
}, [navigate]);
|
|
52
|
-
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null);
|
|
53
|
-
}
|
|
54
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
55
|
-
0 && (module.exports = {
|
|
56
|
-
RedirectPage,
|
|
57
|
-
...require("dn-react-toolkit/auth/client")
|
|
58
|
-
});
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
// src/auth/client/index.tsx
|
|
2
|
-
export * from "dn-react-toolkit/auth/client";
|
|
3
|
-
|
|
4
|
-
// src/auth/client/redirect_page.tsx
|
|
5
|
-
import React from "react";
|
|
6
|
-
import { useEffect } from "react";
|
|
7
|
-
import { useNavigate } from "react-router";
|
|
8
|
-
function RedirectPage() {
|
|
9
|
-
const navigate = useNavigate();
|
|
10
|
-
useEffect(() => {
|
|
11
|
-
const searchParams = new URLSearchParams(window.location.search);
|
|
12
|
-
const redirectUrl = searchParams.get("redirectUrl") || new URL("/", window.location.origin).toString();
|
|
13
|
-
if (redirectUrl) {
|
|
14
|
-
navigate(redirectUrl);
|
|
15
|
-
}
|
|
16
|
-
}, [navigate]);
|
|
17
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null);
|
|
18
|
-
}
|
|
19
|
-
export {
|
|
20
|
-
RedirectPage
|
|
21
|
-
};
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
|
|
30
|
-
// src/auth/client/redirect_page.tsx
|
|
31
|
-
var redirect_page_exports = {};
|
|
32
|
-
__export(redirect_page_exports, {
|
|
33
|
-
RedirectPage: () => RedirectPage
|
|
34
|
-
});
|
|
35
|
-
module.exports = __toCommonJS(redirect_page_exports);
|
|
36
|
-
var import_react = __toESM(require("react"));
|
|
37
|
-
var import_react2 = require("react");
|
|
38
|
-
var import_react_router = require("react-router");
|
|
39
|
-
function RedirectPage() {
|
|
40
|
-
const navigate = (0, import_react_router.useNavigate)();
|
|
41
|
-
(0, import_react2.useEffect)(() => {
|
|
42
|
-
const searchParams = new URLSearchParams(window.location.search);
|
|
43
|
-
const redirectUrl = searchParams.get("redirectUrl") || new URL("/", window.location.origin).toString();
|
|
44
|
-
if (redirectUrl) {
|
|
45
|
-
navigate(redirectUrl);
|
|
46
|
-
}
|
|
47
|
-
}, [navigate]);
|
|
48
|
-
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null);
|
|
49
|
-
}
|
|
50
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
51
|
-
0 && (module.exports = {
|
|
52
|
-
RedirectPage
|
|
53
|
-
});
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
// src/auth/client/redirect_page.tsx
|
|
2
|
-
import React from "react";
|
|
3
|
-
import { useEffect } from "react";
|
|
4
|
-
import { useNavigate } from "react-router";
|
|
5
|
-
function RedirectPage() {
|
|
6
|
-
const navigate = useNavigate();
|
|
7
|
-
useEffect(() => {
|
|
8
|
-
const searchParams = new URLSearchParams(window.location.search);
|
|
9
|
-
const redirectUrl = searchParams.get("redirectUrl") || new URL("/", window.location.origin).toString();
|
|
10
|
-
if (redirectUrl) {
|
|
11
|
-
navigate(redirectUrl);
|
|
12
|
-
}
|
|
13
|
-
}, [navigate]);
|
|
14
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null);
|
|
15
|
-
}
|
|
16
|
-
export {
|
|
17
|
-
RedirectPage
|
|
18
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from 'dn-react-toolkit/auth/server';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from 'dn-react-toolkit/auth/server';
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
-
}
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
16
|
-
|
|
17
|
-
// src/auth/server/index.tsx
|
|
18
|
-
var server_exports = {};
|
|
19
|
-
module.exports = __toCommonJS(server_exports);
|
|
20
|
-
__reExport(server_exports, require("dn-react-toolkit/auth/server"), module.exports);
|
|
21
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
22
|
-
0 && (module.exports = {
|
|
23
|
-
...require("dn-react-toolkit/auth/server")
|
|
24
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from 'dn-react-toolkit/file/client';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from 'dn-react-toolkit/file/client';
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
-
}
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
16
|
-
|
|
17
|
-
// src/file/client/index.ts
|
|
18
|
-
var client_exports = {};
|
|
19
|
-
module.exports = __toCommonJS(client_exports);
|
|
20
|
-
__reExport(client_exports, require("dn-react-toolkit/file/client"), module.exports);
|
|
21
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
22
|
-
0 && (module.exports = {
|
|
23
|
-
...require("dn-react-toolkit/file/client")
|
|
24
|
-
});
|
package/dist/file/index.d.mts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from 'dn-react-toolkit/file';
|
package/dist/file/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from 'dn-react-toolkit/file';
|
package/dist/file/index.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
-
}
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
16
|
-
|
|
17
|
-
// src/file/index.ts
|
|
18
|
-
var file_exports = {};
|
|
19
|
-
module.exports = __toCommonJS(file_exports);
|
|
20
|
-
__reExport(file_exports, require("dn-react-toolkit/file"), module.exports);
|
|
21
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
22
|
-
0 && (module.exports = {
|
|
23
|
-
...require("dn-react-toolkit/file")
|
|
24
|
-
});
|