dn-react-router-toolkit 0.1.12 → 0.2.1
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/auth/apple_auth.d.mts +38 -0
- package/dist/auth/apple_auth.d.ts +38 -0
- package/dist/{auth-kit → auth}/apple_auth.js +31 -18
- package/dist/auth/apple_auth.mjs +63 -0
- package/dist/{auth-kit/repository.d.mts → auth/auth_repository.d.mts} +10 -11
- package/dist/{auth-kit/repository.d.ts → auth/auth_repository.d.ts} +10 -11
- package/dist/{file-kit/repository.js → auth/auth_repository.js} +3 -3
- package/dist/{auth-kit → auth}/auth_service.d.mts +12 -23
- package/dist/{auth-kit → auth}/auth_service.d.ts +12 -23
- package/dist/{auth-kit → auth}/auth_service.js +24 -77
- package/dist/{auth-kit → auth}/auth_service.mjs +24 -77
- package/dist/auth/client/google_login_button.d.mts +7 -0
- package/dist/auth/client/google_login_button.d.ts +7 -0
- package/dist/{auth-kit → auth}/client/google_login_button.js +24 -19
- package/dist/auth/client/google_login_button.mjs +37 -0
- package/dist/auth/client/provider.d.mts +26 -0
- package/dist/auth/client/provider.d.ts +26 -0
- package/dist/auth/client/provider.js +152 -0
- package/dist/auth/client/provider.mjs +116 -0
- package/dist/{auth-kit → auth}/client/redirect_page.js +1 -1
- package/dist/{auth-kit → auth}/client/redirect_page.mjs +1 -1
- package/dist/auth/google_auth.d.mts +33 -0
- package/dist/auth/google_auth.d.ts +33 -0
- package/dist/{auth-kit → auth}/google_auth.js +23 -32
- package/dist/{auth-kit → auth}/google_auth.mjs +22 -31
- package/dist/auth/handlers/find_auth.d.mts +13 -0
- package/dist/auth/handlers/find_auth.d.ts +13 -0
- package/dist/{route/api/auth/route.js → auth/handlers/find_auth.js} +10 -10
- package/dist/{route/api/auth/route.mjs → auth/handlers/find_auth.mjs} +5 -5
- package/dist/auth/handlers/login.d.mts +13 -0
- package/dist/auth/handlers/login.d.ts +13 -0
- package/dist/{route/api/auth/login/route.js → auth/handlers/login.js} +17 -17
- package/dist/{route/api/auth/login/route.mjs → auth/handlers/login.mjs} +12 -12
- package/dist/auth/handlers/login_with_thirdparty.d.mts +15 -0
- package/dist/auth/handlers/login_with_thirdparty.d.ts +15 -0
- package/dist/{route/api/auth/login/[provider]/route.js → auth/handlers/login_with_thirdparty.js} +12 -27
- package/dist/{route/api/auth/login/[provider]/route.mjs → auth/handlers/login_with_thirdparty.mjs} +7 -22
- package/dist/auth/handlers/logout.d.mts +13 -0
- package/dist/auth/handlers/logout.d.ts +13 -0
- package/dist/{route/api/auth/logout/route.js → auth/handlers/logout.js} +15 -11
- package/dist/{route/api/auth/logout/route.mjs → auth/handlers/logout.mjs} +11 -7
- package/dist/auth/handlers/refresh.d.mts +13 -0
- package/dist/auth/handlers/refresh.d.ts +13 -0
- package/dist/{route/api/auth/refresh/route.js → auth/handlers/refresh.js} +12 -12
- package/dist/{route/api/auth/refresh/route.mjs → auth/handlers/refresh.mjs} +7 -7
- package/dist/auth/handlers/request_password_reset.d.mts +10 -0
- package/dist/auth/handlers/request_password_reset.d.ts +10 -0
- package/dist/auth/handlers/request_password_reset.js +87 -0
- package/dist/auth/handlers/request_password_reset.mjs +60 -0
- package/dist/auth/handlers/reset_password.d.mts +10 -0
- package/dist/auth/handlers/reset_password.d.ts +10 -0
- package/dist/auth/handlers/reset_password.js +88 -0
- package/dist/auth/handlers/reset_password.mjs +61 -0
- package/dist/auth/handlers/signup.d.mts +15 -0
- package/dist/auth/handlers/signup.d.ts +15 -0
- package/dist/auth/handlers/signup.js +147 -0
- package/dist/auth/handlers/signup.mjs +112 -0
- package/dist/auth/handlers/signup_with_thirdparty.d.mts +17 -0
- package/dist/auth/handlers/signup_with_thirdparty.d.ts +17 -0
- package/dist/auth/handlers/signup_with_thirdparty.js +123 -0
- package/dist/auth/handlers/signup_with_thirdparty.mjs +98 -0
- package/dist/auth/handlers/thirdparty_auth_callback.d.mts +16 -0
- package/dist/auth/handlers/thirdparty_auth_callback.d.ts +16 -0
- package/dist/{route/auth/callback/[provider]/route.js → auth/handlers/thirdparty_auth_callback.js} +54 -45
- package/dist/{route/auth/callback/[provider]/route.mjs → auth/handlers/thirdparty_auth_callback.mjs} +49 -40
- package/dist/{auth-kit/jwt.d.mts → auth/jwt_manager.d.mts} +11 -1
- package/dist/{auth-kit/jwt.d.ts → auth/jwt_manager.d.ts} +11 -1
- package/dist/{auth-kit/jwt.js → auth/jwt_manager.js} +25 -11
- package/dist/{auth-kit/jwt.mjs → auth/jwt_manager.mjs} +22 -8
- package/dist/auth/kakao_auth.d.mts +27 -0
- package/dist/auth/kakao_auth.d.ts +27 -0
- package/dist/auth/kakao_auth.js +56 -0
- package/dist/auth/kakao_auth.mjs +31 -0
- package/dist/auth/password_recovery.d.mts +34 -0
- package/dist/auth/password_recovery.d.ts +34 -0
- package/dist/auth/password_recovery.js +169 -0
- package/dist/auth/password_recovery.mjs +134 -0
- package/dist/auth/thirdparty_auth.d.mts +41 -0
- package/dist/auth/thirdparty_auth.d.ts +41 -0
- package/dist/{auth-kit/kakao_auth.js → auth/thirdparty_auth.js} +31 -33
- package/dist/{auth-kit/kakao_auth.mjs → auth/thirdparty_auth.mjs} +26 -28
- package/dist/{auth-kit → auth}/with_auth.d.mts +5 -6
- package/dist/{auth-kit → auth}/with_auth.d.ts +5 -6
- package/dist/{auth-kit → auth}/with_auth.js +26 -10
- package/dist/auth/with_auth.mjs +63 -0
- package/dist/date.d.mts +2 -0
- package/dist/date.d.ts +2 -0
- package/dist/date.js +4 -2
- package/dist/date.mjs +2 -1
- package/dist/{file-kit → file}/cdn.js +1 -1
- package/dist/{file-kit → file}/cdn.mjs +1 -1
- package/dist/{file-kit → file}/client/drop_file_input.js +3 -3
- package/dist/{file-kit → file}/client/drop_file_input.mjs +3 -3
- package/dist/{file-kit → file}/client/file_upload_button.js +1 -1
- package/dist/{file-kit → file}/client/file_upload_button.mjs +1 -1
- package/dist/{file-kit → file}/client/file_uploader.js +3 -3
- package/dist/{file-kit → file}/client/file_uploader.mjs +2 -2
- package/dist/{file-kit → file}/client/format_size.js +1 -1
- package/dist/{file-kit → file}/client/format_size.mjs +1 -1
- package/dist/{file-kit → file}/client/metadata.js +1 -1
- package/dist/{file-kit → file}/client/metadata.mjs +1 -1
- package/dist/{file-kit/repository.d.mts → file/file_repository.d.mts} +4 -4
- package/dist/{file-kit/repository.d.ts → file/file_repository.d.ts} +4 -4
- package/dist/{auth-kit/repository.js → file/file_repository.js} +3 -3
- package/dist/file/file_service.d.mts +32 -0
- package/dist/file/file_service.d.ts +32 -0
- package/dist/{file-kit → file}/file_service.js +27 -21
- package/dist/file/file_service.mjs +41 -0
- package/dist/file/handlers/delete_file.d.mts +17 -0
- package/dist/file/handlers/delete_file.d.ts +17 -0
- package/dist/{route/api/files/[fileId]/route.js → file/handlers/delete_file.js} +15 -15
- package/dist/{route/api/files/[fileId]/route.mjs → file/handlers/delete_file.mjs} +10 -10
- package/dist/file/handlers/upload_file.d.mts +16 -0
- package/dist/file/handlers/upload_file.d.ts +16 -0
- package/dist/{route/api/files/route.js → file/handlers/upload_file.js} +13 -13
- package/dist/{route/api/files/route.mjs → file/handlers/upload_file.mjs} +8 -8
- package/dist/{file-kit → file}/object_storage.d.mts +3 -1
- package/dist/{file-kit → file}/object_storage.d.ts +3 -1
- package/dist/{file-kit → file}/object_storage.js +2 -2
- package/dist/{file-kit → file}/object_storage.mjs +2 -2
- package/dist/{file-kit → file}/responsive_image.d.mts +4 -4
- package/dist/{file-kit → file}/responsive_image.d.ts +4 -4
- package/dist/{file-kit → file}/responsive_image.js +18 -9
- package/dist/{file-kit → file}/responsive_image.mjs +18 -9
- package/dist/{http-kit → http}/index.js +5 -5
- package/dist/{http-kit → http}/index.mjs +1 -1
- package/dist/{http-kit → http}/response.js +1 -1
- package/dist/{http-kit → http}/response.mjs +1 -1
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -0
- package/dist/index.mjs +1 -0
- package/dist/route/api.d.mts +17 -25
- package/dist/route/api.d.ts +17 -25
- package/dist/route/api.js +367 -178
- package/dist/route/api.mjs +356 -177
- package/dist/{seo-kit → seo}/seo.js +1 -1
- package/dist/{seo-kit → seo}/seo.mjs +1 -1
- package/package.json +76 -74
- package/dist/auth-kit/apple_auth.d.mts +0 -24
- package/dist/auth-kit/apple_auth.d.ts +0 -24
- package/dist/auth-kit/apple_auth.mjs +0 -50
- package/dist/auth-kit/client/google_login_button.d.mts +0 -9
- package/dist/auth-kit/client/google_login_button.d.ts +0 -9
- package/dist/auth-kit/client/google_login_button.mjs +0 -32
- package/dist/auth-kit/client/logout.d.mts +0 -3
- package/dist/auth-kit/client/logout.d.ts +0 -3
- package/dist/auth-kit/client/logout.js +0 -49
- package/dist/auth-kit/client/logout.mjs +0 -24
- package/dist/auth-kit/google_auth.d.mts +0 -27
- package/dist/auth-kit/google_auth.d.ts +0 -27
- package/dist/auth-kit/kakao_auth.d.mts +0 -24
- package/dist/auth-kit/kakao_auth.d.ts +0 -24
- package/dist/auth-kit/with_auth.mjs +0 -47
- package/dist/file-kit/file_service.d.mts +0 -26
- package/dist/file-kit/file_service.d.ts +0 -26
- package/dist/file-kit/file_service.mjs +0 -35
- package/dist/route/api/auth/login/_provider_/route.d.mts +0 -20
- package/dist/route/api/auth/login/_provider_/route.d.ts +0 -20
- package/dist/route/api/auth/login/route.d.mts +0 -14
- package/dist/route/api/auth/login/route.d.ts +0 -14
- package/dist/route/api/auth/logout/route.d.mts +0 -14
- package/dist/route/api/auth/logout/route.d.ts +0 -14
- package/dist/route/api/auth/refresh/route.d.mts +0 -13
- package/dist/route/api/auth/refresh/route.d.ts +0 -13
- package/dist/route/api/auth/route.d.mts +0 -13
- package/dist/route/api/auth/route.d.ts +0 -13
- package/dist/route/api/files/_fileId_/route.d.mts +0 -17
- package/dist/route/api/files/_fileId_/route.d.ts +0 -17
- package/dist/route/api/files/route.d.mts +0 -16
- package/dist/route/api/files/route.d.ts +0 -16
- package/dist/route/auth/callback/_provider_/route.d.mts +0 -20
- package/dist/route/auth/callback/_provider_/route.d.ts +0 -20
- /package/dist/{auth-kit/repository.mjs → auth/auth_repository.mjs} +0 -0
- /package/dist/{auth-kit → auth}/client/redirect_page.d.mts +0 -0
- /package/dist/{auth-kit → auth}/client/redirect_page.d.ts +0 -0
- /package/dist/{file-kit → file}/cdn.d.mts +0 -0
- /package/dist/{file-kit → file}/cdn.d.ts +0 -0
- /package/dist/{file-kit → file}/client/drop_file_input.d.mts +0 -0
- /package/dist/{file-kit → file}/client/drop_file_input.d.ts +0 -0
- /package/dist/{file-kit → file}/client/file_upload_button.d.mts +0 -0
- /package/dist/{file-kit → file}/client/file_upload_button.d.ts +0 -0
- /package/dist/{file-kit → file}/client/file_uploader.d.mts +0 -0
- /package/dist/{file-kit → file}/client/file_uploader.d.ts +0 -0
- /package/dist/{file-kit → file}/client/format_size.d.mts +0 -0
- /package/dist/{file-kit → file}/client/format_size.d.ts +0 -0
- /package/dist/{file-kit → file}/client/metadata.d.mts +0 -0
- /package/dist/{file-kit → file}/client/metadata.d.ts +0 -0
- /package/dist/{file-kit/repository.mjs → file/file_repository.mjs} +0 -0
- /package/dist/{http-kit → http}/index.d.mts +0 -0
- /package/dist/{http-kit → http}/index.d.ts +0 -0
- /package/dist/{http-kit → http}/response.d.mts +0 -0
- /package/dist/{http-kit → http}/response.d.ts +0 -0
- /package/dist/{seo-kit → seo}/seo.d.mts +0 -0
- /package/dist/{seo-kit → seo}/seo.d.ts +0 -0
|
@@ -8,11 +8,11 @@ type ResponsiveImageProps = Omit<React.DetailedHTMLProps<React.ImgHTMLAttributes
|
|
|
8
8
|
};
|
|
9
9
|
ratio?: number;
|
|
10
10
|
};
|
|
11
|
-
declare const createResponsiveImage: (
|
|
12
|
-
|
|
13
|
-
}) =>
|
|
11
|
+
declare const createResponsiveImage: ({ cdnOrigin }: {
|
|
12
|
+
cdnOrigin: string;
|
|
13
|
+
}) => React.FC<ResponsiveImageProps>;
|
|
14
14
|
|
|
15
|
-
declare function generateSrcSet(image: HTMLImageElement | string, ratio?: number, props?: {
|
|
15
|
+
declare function generateSrcSet(cdnOrigin: string, image: HTMLImageElement | string, ratio?: number, props?: {
|
|
16
16
|
width?: string | number;
|
|
17
17
|
height?: string | number;
|
|
18
18
|
}): string | undefined;
|
|
@@ -27,7 +27,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
|
|
30
|
-
// src/file
|
|
30
|
+
// src/file/responsive_image.tsx
|
|
31
31
|
var responsive_image_exports = {};
|
|
32
32
|
__export(responsive_image_exports, {
|
|
33
33
|
createResponsiveImage: () => createResponsiveImage,
|
|
@@ -36,6 +36,15 @@ __export(responsive_image_exports, {
|
|
|
36
36
|
});
|
|
37
37
|
module.exports = __toCommonJS(responsive_image_exports);
|
|
38
38
|
var import_react = __toESM(require("react"));
|
|
39
|
+
|
|
40
|
+
// src/file/cdn.ts
|
|
41
|
+
var createCDN = (origin) => {
|
|
42
|
+
return (key, { width } = {}) => {
|
|
43
|
+
return key ? `${origin}/${key}${width ? `?w=${width}` : ""}` : void 0;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
// src/file/responsive_image.tsx
|
|
39
48
|
var sizes = [
|
|
40
49
|
64,
|
|
41
50
|
128,
|
|
@@ -51,28 +60,28 @@ var sizes = [
|
|
|
51
60
|
2560,
|
|
52
61
|
3840
|
|
53
62
|
];
|
|
54
|
-
var createResponsiveImage = (
|
|
63
|
+
var createResponsiveImage = ({ cdnOrigin }) => {
|
|
55
64
|
const Component = ({
|
|
56
65
|
alt,
|
|
57
66
|
file,
|
|
58
67
|
ratio,
|
|
59
68
|
...props
|
|
60
69
|
}) => {
|
|
61
|
-
const src =
|
|
70
|
+
const src = createCDN(cdnOrigin)(file?.key) || props.src || "#";
|
|
62
71
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
63
72
|
"img",
|
|
64
73
|
{
|
|
65
74
|
...props,
|
|
66
75
|
src,
|
|
67
76
|
alt,
|
|
68
|
-
srcSet: generateSrcSet(src, ratio, props)
|
|
77
|
+
srcSet: generateSrcSet(cdnOrigin, src, ratio, props)
|
|
69
78
|
}
|
|
70
79
|
);
|
|
71
80
|
};
|
|
72
81
|
return Component;
|
|
73
82
|
};
|
|
74
83
|
var responsive_image_default = createResponsiveImage;
|
|
75
|
-
var generateSrc = (src, width, height, ratio, image = {}) => {
|
|
84
|
+
var generateSrc = (cdnOrigin, src, width, height, ratio, image = {}) => {
|
|
76
85
|
const searchParams = new URLSearchParams();
|
|
77
86
|
if (image.width) {
|
|
78
87
|
searchParams.set("w", image.width.toString());
|
|
@@ -90,13 +99,12 @@ var generateSrc = (src, width, height, ratio, image = {}) => {
|
|
|
90
99
|
searchParams.set("h", height.toString());
|
|
91
100
|
}
|
|
92
101
|
const search = searchParams.toString() ? `?${searchParams.toString()}` : "";
|
|
93
|
-
|
|
94
|
-
if (!src.includes(origin)) {
|
|
102
|
+
if (!src.includes(cdnOrigin)) {
|
|
95
103
|
return src;
|
|
96
104
|
}
|
|
97
105
|
return `${encodeURI(decodeURI(src))}${search}`;
|
|
98
106
|
};
|
|
99
|
-
function generateSrcSet(image, ratio, props = {}) {
|
|
107
|
+
function generateSrcSet(cdnOrigin, image, ratio, props = {}) {
|
|
100
108
|
const src = typeof image === "string" ? image : image.src;
|
|
101
109
|
const isGif = src.endsWith(".gif");
|
|
102
110
|
if (isGif) {
|
|
@@ -106,6 +114,7 @@ function generateSrcSet(image, ratio, props = {}) {
|
|
|
106
114
|
return [1, 2, 3].map((scale) => {
|
|
107
115
|
const genWidth = Number(props.width) * scale;
|
|
108
116
|
return `${generateSrc(
|
|
117
|
+
cdnOrigin,
|
|
109
118
|
src,
|
|
110
119
|
genWidth,
|
|
111
120
|
props.height ? Number(props.height) * scale : ratio ? Math.round(genWidth / ratio) : void 0
|
|
@@ -113,7 +122,7 @@ function generateSrcSet(image, ratio, props = {}) {
|
|
|
113
122
|
}).join(", ");
|
|
114
123
|
}
|
|
115
124
|
return sizes.map(
|
|
116
|
-
(size) => `${generateSrc(src, size, void 0, ratio, props)} ${size}w`
|
|
125
|
+
(size) => `${generateSrc(cdnOrigin, src, size, void 0, ratio, props)} ${size}w`
|
|
117
126
|
).join(", ");
|
|
118
127
|
}
|
|
119
128
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -1,5 +1,14 @@
|
|
|
1
|
-
// src/file
|
|
1
|
+
// src/file/responsive_image.tsx
|
|
2
2
|
import React from "react";
|
|
3
|
+
|
|
4
|
+
// src/file/cdn.ts
|
|
5
|
+
var createCDN = (origin) => {
|
|
6
|
+
return (key, { width } = {}) => {
|
|
7
|
+
return key ? `${origin}/${key}${width ? `?w=${width}` : ""}` : void 0;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
// src/file/responsive_image.tsx
|
|
3
12
|
var sizes = [
|
|
4
13
|
64,
|
|
5
14
|
128,
|
|
@@ -15,28 +24,28 @@ var sizes = [
|
|
|
15
24
|
2560,
|
|
16
25
|
3840
|
|
17
26
|
];
|
|
18
|
-
var createResponsiveImage = (
|
|
27
|
+
var createResponsiveImage = ({ cdnOrigin }) => {
|
|
19
28
|
const Component = ({
|
|
20
29
|
alt,
|
|
21
30
|
file,
|
|
22
31
|
ratio,
|
|
23
32
|
...props
|
|
24
33
|
}) => {
|
|
25
|
-
const src =
|
|
34
|
+
const src = createCDN(cdnOrigin)(file?.key) || props.src || "#";
|
|
26
35
|
return /* @__PURE__ */ React.createElement(
|
|
27
36
|
"img",
|
|
28
37
|
{
|
|
29
38
|
...props,
|
|
30
39
|
src,
|
|
31
40
|
alt,
|
|
32
|
-
srcSet: generateSrcSet(src, ratio, props)
|
|
41
|
+
srcSet: generateSrcSet(cdnOrigin, src, ratio, props)
|
|
33
42
|
}
|
|
34
43
|
);
|
|
35
44
|
};
|
|
36
45
|
return Component;
|
|
37
46
|
};
|
|
38
47
|
var responsive_image_default = createResponsiveImage;
|
|
39
|
-
var generateSrc = (src, width, height, ratio, image = {}) => {
|
|
48
|
+
var generateSrc = (cdnOrigin, src, width, height, ratio, image = {}) => {
|
|
40
49
|
const searchParams = new URLSearchParams();
|
|
41
50
|
if (image.width) {
|
|
42
51
|
searchParams.set("w", image.width.toString());
|
|
@@ -54,13 +63,12 @@ var generateSrc = (src, width, height, ratio, image = {}) => {
|
|
|
54
63
|
searchParams.set("h", height.toString());
|
|
55
64
|
}
|
|
56
65
|
const search = searchParams.toString() ? `?${searchParams.toString()}` : "";
|
|
57
|
-
|
|
58
|
-
if (!src.includes(origin)) {
|
|
66
|
+
if (!src.includes(cdnOrigin)) {
|
|
59
67
|
return src;
|
|
60
68
|
}
|
|
61
69
|
return `${encodeURI(decodeURI(src))}${search}`;
|
|
62
70
|
};
|
|
63
|
-
function generateSrcSet(image, ratio, props = {}) {
|
|
71
|
+
function generateSrcSet(cdnOrigin, image, ratio, props = {}) {
|
|
64
72
|
const src = typeof image === "string" ? image : image.src;
|
|
65
73
|
const isGif = src.endsWith(".gif");
|
|
66
74
|
if (isGif) {
|
|
@@ -70,6 +78,7 @@ function generateSrcSet(image, ratio, props = {}) {
|
|
|
70
78
|
return [1, 2, 3].map((scale) => {
|
|
71
79
|
const genWidth = Number(props.width) * scale;
|
|
72
80
|
return `${generateSrc(
|
|
81
|
+
cdnOrigin,
|
|
73
82
|
src,
|
|
74
83
|
genWidth,
|
|
75
84
|
props.height ? Number(props.height) * scale : ratio ? Math.round(genWidth / ratio) : void 0
|
|
@@ -77,7 +86,7 @@ function generateSrcSet(image, ratio, props = {}) {
|
|
|
77
86
|
}).join(", ");
|
|
78
87
|
}
|
|
79
88
|
return sizes.map(
|
|
80
|
-
(size) => `${generateSrc(src, size, void 0, ratio, props)} ${size}w`
|
|
89
|
+
(size) => `${generateSrc(cdnOrigin, src, size, void 0, ratio, props)} ${size}w`
|
|
81
90
|
).join(", ");
|
|
82
91
|
}
|
|
83
92
|
export {
|
|
@@ -17,9 +17,9 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
|
|
20
|
-
// src/http
|
|
21
|
-
var
|
|
22
|
-
__export(
|
|
20
|
+
// src/http/index.ts
|
|
21
|
+
var http_exports = {};
|
|
22
|
+
__export(http_exports, {
|
|
23
23
|
ACCEPTED: () => ACCEPTED,
|
|
24
24
|
BAD_REQUEST: () => BAD_REQUEST,
|
|
25
25
|
CONFLICT: () => CONFLICT,
|
|
@@ -38,9 +38,9 @@ __export(http_kit_exports, {
|
|
|
38
38
|
createException: () => createException,
|
|
39
39
|
createJsonResponse: () => createJsonResponse
|
|
40
40
|
});
|
|
41
|
-
module.exports = __toCommonJS(
|
|
41
|
+
module.exports = __toCommonJS(http_exports);
|
|
42
42
|
|
|
43
|
-
// src/http
|
|
43
|
+
// src/http/response.ts
|
|
44
44
|
var createJsonResponse = (status) => {
|
|
45
45
|
return (data = {}, init) => {
|
|
46
46
|
return Response.json(data, { status, ...init });
|
|
@@ -17,7 +17,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
|
|
20
|
-
// src/http
|
|
20
|
+
// src/http/response.ts
|
|
21
21
|
var response_exports = {};
|
|
22
22
|
__export(response_exports, {
|
|
23
23
|
ACCEPTED: () => ACCEPTED,
|
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -32,6 +32,7 @@ var index_exports = {};
|
|
|
32
32
|
__export(index_exports, {
|
|
33
33
|
cn: () => cn,
|
|
34
34
|
formatHumanDateTime: () => formatHumanDateTime,
|
|
35
|
+
moment: () => import_moment_timezone.default,
|
|
35
36
|
singleton: () => singleton,
|
|
36
37
|
toSlug: () => toSlug
|
|
37
38
|
});
|
|
@@ -86,6 +87,7 @@ var toSlug = (str) => {
|
|
|
86
87
|
0 && (module.exports = {
|
|
87
88
|
cn,
|
|
88
89
|
formatHumanDateTime,
|
|
90
|
+
moment,
|
|
89
91
|
singleton,
|
|
90
92
|
toSlug
|
|
91
93
|
});
|
package/dist/index.mjs
CHANGED
package/dist/route/api.d.mts
CHANGED
|
@@ -1,29 +1,21 @@
|
|
|
1
|
-
import { AuthService } from '../auth
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { JWTManager } from '../auth-kit/jwt.mjs';
|
|
7
|
-
import { AuthRepository } from '../auth-kit/repository.mjs';
|
|
8
|
-
import { KakaoAuth } from '../auth-kit/kakao_auth.mjs';
|
|
1
|
+
import { AuthService } from '../auth/auth_service.mjs';
|
|
2
|
+
import { FileService } from '../file/file_service.mjs';
|
|
3
|
+
import { ThirdpartyAuth } from '../auth/thirdparty_auth.mjs';
|
|
4
|
+
import { LoaderFunctionArgs, ActionFunctionArgs } from 'react-router';
|
|
5
|
+
import { PasswordRecoveryService } from '../auth/password_recovery.mjs';
|
|
9
6
|
import 'jose';
|
|
10
|
-
import '
|
|
11
|
-
import '../file
|
|
7
|
+
import '../auth/jwt_manager.mjs';
|
|
8
|
+
import '../file/object_storage.mjs';
|
|
12
9
|
import '@aws-sdk/client-s3';
|
|
10
|
+
import '../auth/auth_repository.mjs';
|
|
11
|
+
import '../file/file_repository.mjs';
|
|
13
12
|
|
|
14
|
-
declare const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
FILE_SERVICE: FileService<TFile>;
|
|
22
|
-
authRepository: AuthRepository;
|
|
23
|
-
fileRepository: FileRepository<TFile>;
|
|
24
|
-
}) => ({ request, params, }: {
|
|
25
|
-
request: Request;
|
|
26
|
-
params: any;
|
|
27
|
-
}) => Promise<Response>;
|
|
13
|
+
declare const createAPIHandler: <TFile>({ authService, fileService, passwordRecoveryService, getThirdPartyAuth, signupTokenSecret, }: {
|
|
14
|
+
authService: AuthService<TFile>;
|
|
15
|
+
fileService: FileService<TFile>;
|
|
16
|
+
passwordRecoveryService: PasswordRecoveryService;
|
|
17
|
+
getThirdPartyAuth: (provider: string) => ThirdpartyAuth;
|
|
18
|
+
signupTokenSecret: string;
|
|
19
|
+
}) => ({ request, params }: LoaderFunctionArgs | ActionFunctionArgs) => Promise<Response>;
|
|
28
20
|
|
|
29
|
-
export {
|
|
21
|
+
export { createAPIHandler };
|
package/dist/route/api.d.ts
CHANGED
|
@@ -1,29 +1,21 @@
|
|
|
1
|
-
import { AuthService } from '../auth
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { JWTManager } from '../auth-kit/jwt.js';
|
|
7
|
-
import { AuthRepository } from '../auth-kit/repository.js';
|
|
8
|
-
import { KakaoAuth } from '../auth-kit/kakao_auth.js';
|
|
1
|
+
import { AuthService } from '../auth/auth_service.js';
|
|
2
|
+
import { FileService } from '../file/file_service.js';
|
|
3
|
+
import { ThirdpartyAuth } from '../auth/thirdparty_auth.js';
|
|
4
|
+
import { LoaderFunctionArgs, ActionFunctionArgs } from 'react-router';
|
|
5
|
+
import { PasswordRecoveryService } from '../auth/password_recovery.js';
|
|
9
6
|
import 'jose';
|
|
10
|
-
import '
|
|
11
|
-
import '../file
|
|
7
|
+
import '../auth/jwt_manager.js';
|
|
8
|
+
import '../file/object_storage.js';
|
|
12
9
|
import '@aws-sdk/client-s3';
|
|
10
|
+
import '../auth/auth_repository.js';
|
|
11
|
+
import '../file/file_repository.js';
|
|
13
12
|
|
|
14
|
-
declare const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
FILE_SERVICE: FileService<TFile>;
|
|
22
|
-
authRepository: AuthRepository;
|
|
23
|
-
fileRepository: FileRepository<TFile>;
|
|
24
|
-
}) => ({ request, params, }: {
|
|
25
|
-
request: Request;
|
|
26
|
-
params: any;
|
|
27
|
-
}) => Promise<Response>;
|
|
13
|
+
declare const createAPIHandler: <TFile>({ authService, fileService, passwordRecoveryService, getThirdPartyAuth, signupTokenSecret, }: {
|
|
14
|
+
authService: AuthService<TFile>;
|
|
15
|
+
fileService: FileService<TFile>;
|
|
16
|
+
passwordRecoveryService: PasswordRecoveryService;
|
|
17
|
+
getThirdPartyAuth: (provider: string) => ThirdpartyAuth;
|
|
18
|
+
signupTokenSecret: string;
|
|
19
|
+
}) => ({ request, params }: LoaderFunctionArgs | ActionFunctionArgs) => Promise<Response>;
|
|
28
20
|
|
|
29
|
-
export {
|
|
21
|
+
export { createAPIHandler };
|