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.
Files changed (195) hide show
  1. package/dist/auth/apple_auth.d.mts +38 -0
  2. package/dist/auth/apple_auth.d.ts +38 -0
  3. package/dist/{auth-kit → auth}/apple_auth.js +31 -18
  4. package/dist/auth/apple_auth.mjs +63 -0
  5. package/dist/{auth-kit/repository.d.mts → auth/auth_repository.d.mts} +10 -11
  6. package/dist/{auth-kit/repository.d.ts → auth/auth_repository.d.ts} +10 -11
  7. package/dist/{file-kit/repository.js → auth/auth_repository.js} +3 -3
  8. package/dist/{auth-kit → auth}/auth_service.d.mts +12 -23
  9. package/dist/{auth-kit → auth}/auth_service.d.ts +12 -23
  10. package/dist/{auth-kit → auth}/auth_service.js +24 -77
  11. package/dist/{auth-kit → auth}/auth_service.mjs +24 -77
  12. package/dist/auth/client/google_login_button.d.mts +7 -0
  13. package/dist/auth/client/google_login_button.d.ts +7 -0
  14. package/dist/{auth-kit → auth}/client/google_login_button.js +24 -19
  15. package/dist/auth/client/google_login_button.mjs +37 -0
  16. package/dist/auth/client/provider.d.mts +26 -0
  17. package/dist/auth/client/provider.d.ts +26 -0
  18. package/dist/auth/client/provider.js +152 -0
  19. package/dist/auth/client/provider.mjs +116 -0
  20. package/dist/{auth-kit → auth}/client/redirect_page.js +1 -1
  21. package/dist/{auth-kit → auth}/client/redirect_page.mjs +1 -1
  22. package/dist/auth/google_auth.d.mts +33 -0
  23. package/dist/auth/google_auth.d.ts +33 -0
  24. package/dist/{auth-kit → auth}/google_auth.js +23 -32
  25. package/dist/{auth-kit → auth}/google_auth.mjs +22 -31
  26. package/dist/auth/handlers/find_auth.d.mts +13 -0
  27. package/dist/auth/handlers/find_auth.d.ts +13 -0
  28. package/dist/{route/api/auth/route.js → auth/handlers/find_auth.js} +10 -10
  29. package/dist/{route/api/auth/route.mjs → auth/handlers/find_auth.mjs} +5 -5
  30. package/dist/auth/handlers/login.d.mts +13 -0
  31. package/dist/auth/handlers/login.d.ts +13 -0
  32. package/dist/{route/api/auth/login/route.js → auth/handlers/login.js} +17 -17
  33. package/dist/{route/api/auth/login/route.mjs → auth/handlers/login.mjs} +12 -12
  34. package/dist/auth/handlers/login_with_thirdparty.d.mts +15 -0
  35. package/dist/auth/handlers/login_with_thirdparty.d.ts +15 -0
  36. package/dist/{route/api/auth/login/[provider]/route.js → auth/handlers/login_with_thirdparty.js} +12 -27
  37. package/dist/{route/api/auth/login/[provider]/route.mjs → auth/handlers/login_with_thirdparty.mjs} +7 -22
  38. package/dist/auth/handlers/logout.d.mts +13 -0
  39. package/dist/auth/handlers/logout.d.ts +13 -0
  40. package/dist/{route/api/auth/logout/route.js → auth/handlers/logout.js} +15 -11
  41. package/dist/{route/api/auth/logout/route.mjs → auth/handlers/logout.mjs} +11 -7
  42. package/dist/auth/handlers/refresh.d.mts +13 -0
  43. package/dist/auth/handlers/refresh.d.ts +13 -0
  44. package/dist/{route/api/auth/refresh/route.js → auth/handlers/refresh.js} +12 -12
  45. package/dist/{route/api/auth/refresh/route.mjs → auth/handlers/refresh.mjs} +7 -7
  46. package/dist/auth/handlers/request_password_reset.d.mts +10 -0
  47. package/dist/auth/handlers/request_password_reset.d.ts +10 -0
  48. package/dist/auth/handlers/request_password_reset.js +87 -0
  49. package/dist/auth/handlers/request_password_reset.mjs +60 -0
  50. package/dist/auth/handlers/reset_password.d.mts +10 -0
  51. package/dist/auth/handlers/reset_password.d.ts +10 -0
  52. package/dist/auth/handlers/reset_password.js +88 -0
  53. package/dist/auth/handlers/reset_password.mjs +61 -0
  54. package/dist/auth/handlers/signup.d.mts +15 -0
  55. package/dist/auth/handlers/signup.d.ts +15 -0
  56. package/dist/auth/handlers/signup.js +147 -0
  57. package/dist/auth/handlers/signup.mjs +112 -0
  58. package/dist/auth/handlers/signup_with_thirdparty.d.mts +17 -0
  59. package/dist/auth/handlers/signup_with_thirdparty.d.ts +17 -0
  60. package/dist/auth/handlers/signup_with_thirdparty.js +123 -0
  61. package/dist/auth/handlers/signup_with_thirdparty.mjs +98 -0
  62. package/dist/auth/handlers/thirdparty_auth_callback.d.mts +16 -0
  63. package/dist/auth/handlers/thirdparty_auth_callback.d.ts +16 -0
  64. package/dist/{route/auth/callback/[provider]/route.js → auth/handlers/thirdparty_auth_callback.js} +54 -45
  65. package/dist/{route/auth/callback/[provider]/route.mjs → auth/handlers/thirdparty_auth_callback.mjs} +49 -40
  66. package/dist/{auth-kit/jwt.d.mts → auth/jwt_manager.d.mts} +11 -1
  67. package/dist/{auth-kit/jwt.d.ts → auth/jwt_manager.d.ts} +11 -1
  68. package/dist/{auth-kit/jwt.js → auth/jwt_manager.js} +25 -11
  69. package/dist/{auth-kit/jwt.mjs → auth/jwt_manager.mjs} +22 -8
  70. package/dist/auth/kakao_auth.d.mts +27 -0
  71. package/dist/auth/kakao_auth.d.ts +27 -0
  72. package/dist/auth/kakao_auth.js +56 -0
  73. package/dist/auth/kakao_auth.mjs +31 -0
  74. package/dist/auth/password_recovery.d.mts +34 -0
  75. package/dist/auth/password_recovery.d.ts +34 -0
  76. package/dist/auth/password_recovery.js +169 -0
  77. package/dist/auth/password_recovery.mjs +134 -0
  78. package/dist/auth/thirdparty_auth.d.mts +41 -0
  79. package/dist/auth/thirdparty_auth.d.ts +41 -0
  80. package/dist/{auth-kit/kakao_auth.js → auth/thirdparty_auth.js} +31 -33
  81. package/dist/{auth-kit/kakao_auth.mjs → auth/thirdparty_auth.mjs} +26 -28
  82. package/dist/{auth-kit → auth}/with_auth.d.mts +5 -6
  83. package/dist/{auth-kit → auth}/with_auth.d.ts +5 -6
  84. package/dist/{auth-kit → auth}/with_auth.js +26 -10
  85. package/dist/auth/with_auth.mjs +63 -0
  86. package/dist/date.d.mts +2 -0
  87. package/dist/date.d.ts +2 -0
  88. package/dist/date.js +4 -2
  89. package/dist/date.mjs +2 -1
  90. package/dist/{file-kit → file}/cdn.js +1 -1
  91. package/dist/{file-kit → file}/cdn.mjs +1 -1
  92. package/dist/{file-kit → file}/client/drop_file_input.js +3 -3
  93. package/dist/{file-kit → file}/client/drop_file_input.mjs +3 -3
  94. package/dist/{file-kit → file}/client/file_upload_button.js +1 -1
  95. package/dist/{file-kit → file}/client/file_upload_button.mjs +1 -1
  96. package/dist/{file-kit → file}/client/file_uploader.js +3 -3
  97. package/dist/{file-kit → file}/client/file_uploader.mjs +2 -2
  98. package/dist/{file-kit → file}/client/format_size.js +1 -1
  99. package/dist/{file-kit → file}/client/format_size.mjs +1 -1
  100. package/dist/{file-kit → file}/client/metadata.js +1 -1
  101. package/dist/{file-kit → file}/client/metadata.mjs +1 -1
  102. package/dist/{file-kit/repository.d.mts → file/file_repository.d.mts} +4 -4
  103. package/dist/{file-kit/repository.d.ts → file/file_repository.d.ts} +4 -4
  104. package/dist/{auth-kit/repository.js → file/file_repository.js} +3 -3
  105. package/dist/file/file_service.d.mts +32 -0
  106. package/dist/file/file_service.d.ts +32 -0
  107. package/dist/{file-kit → file}/file_service.js +27 -21
  108. package/dist/file/file_service.mjs +41 -0
  109. package/dist/file/handlers/delete_file.d.mts +17 -0
  110. package/dist/file/handlers/delete_file.d.ts +17 -0
  111. package/dist/{route/api/files/[fileId]/route.js → file/handlers/delete_file.js} +15 -15
  112. package/dist/{route/api/files/[fileId]/route.mjs → file/handlers/delete_file.mjs} +10 -10
  113. package/dist/file/handlers/upload_file.d.mts +16 -0
  114. package/dist/file/handlers/upload_file.d.ts +16 -0
  115. package/dist/{route/api/files/route.js → file/handlers/upload_file.js} +13 -13
  116. package/dist/{route/api/files/route.mjs → file/handlers/upload_file.mjs} +8 -8
  117. package/dist/{file-kit → file}/object_storage.d.mts +3 -1
  118. package/dist/{file-kit → file}/object_storage.d.ts +3 -1
  119. package/dist/{file-kit → file}/object_storage.js +2 -2
  120. package/dist/{file-kit → file}/object_storage.mjs +2 -2
  121. package/dist/{file-kit → file}/responsive_image.d.mts +4 -4
  122. package/dist/{file-kit → file}/responsive_image.d.ts +4 -4
  123. package/dist/{file-kit → file}/responsive_image.js +18 -9
  124. package/dist/{file-kit → file}/responsive_image.mjs +18 -9
  125. package/dist/{http-kit → http}/index.js +5 -5
  126. package/dist/{http-kit → http}/index.mjs +1 -1
  127. package/dist/{http-kit → http}/response.js +1 -1
  128. package/dist/{http-kit → http}/response.mjs +1 -1
  129. package/dist/index.d.mts +1 -0
  130. package/dist/index.d.ts +1 -0
  131. package/dist/index.js +2 -0
  132. package/dist/index.mjs +1 -0
  133. package/dist/route/api.d.mts +17 -25
  134. package/dist/route/api.d.ts +17 -25
  135. package/dist/route/api.js +367 -178
  136. package/dist/route/api.mjs +356 -177
  137. package/dist/{seo-kit → seo}/seo.js +1 -1
  138. package/dist/{seo-kit → seo}/seo.mjs +1 -1
  139. package/package.json +76 -74
  140. package/dist/auth-kit/apple_auth.d.mts +0 -24
  141. package/dist/auth-kit/apple_auth.d.ts +0 -24
  142. package/dist/auth-kit/apple_auth.mjs +0 -50
  143. package/dist/auth-kit/client/google_login_button.d.mts +0 -9
  144. package/dist/auth-kit/client/google_login_button.d.ts +0 -9
  145. package/dist/auth-kit/client/google_login_button.mjs +0 -32
  146. package/dist/auth-kit/client/logout.d.mts +0 -3
  147. package/dist/auth-kit/client/logout.d.ts +0 -3
  148. package/dist/auth-kit/client/logout.js +0 -49
  149. package/dist/auth-kit/client/logout.mjs +0 -24
  150. package/dist/auth-kit/google_auth.d.mts +0 -27
  151. package/dist/auth-kit/google_auth.d.ts +0 -27
  152. package/dist/auth-kit/kakao_auth.d.mts +0 -24
  153. package/dist/auth-kit/kakao_auth.d.ts +0 -24
  154. package/dist/auth-kit/with_auth.mjs +0 -47
  155. package/dist/file-kit/file_service.d.mts +0 -26
  156. package/dist/file-kit/file_service.d.ts +0 -26
  157. package/dist/file-kit/file_service.mjs +0 -35
  158. package/dist/route/api/auth/login/_provider_/route.d.mts +0 -20
  159. package/dist/route/api/auth/login/_provider_/route.d.ts +0 -20
  160. package/dist/route/api/auth/login/route.d.mts +0 -14
  161. package/dist/route/api/auth/login/route.d.ts +0 -14
  162. package/dist/route/api/auth/logout/route.d.mts +0 -14
  163. package/dist/route/api/auth/logout/route.d.ts +0 -14
  164. package/dist/route/api/auth/refresh/route.d.mts +0 -13
  165. package/dist/route/api/auth/refresh/route.d.ts +0 -13
  166. package/dist/route/api/auth/route.d.mts +0 -13
  167. package/dist/route/api/auth/route.d.ts +0 -13
  168. package/dist/route/api/files/_fileId_/route.d.mts +0 -17
  169. package/dist/route/api/files/_fileId_/route.d.ts +0 -17
  170. package/dist/route/api/files/route.d.mts +0 -16
  171. package/dist/route/api/files/route.d.ts +0 -16
  172. package/dist/route/auth/callback/_provider_/route.d.mts +0 -20
  173. package/dist/route/auth/callback/_provider_/route.d.ts +0 -20
  174. /package/dist/{auth-kit/repository.mjs → auth/auth_repository.mjs} +0 -0
  175. /package/dist/{auth-kit → auth}/client/redirect_page.d.mts +0 -0
  176. /package/dist/{auth-kit → auth}/client/redirect_page.d.ts +0 -0
  177. /package/dist/{file-kit → file}/cdn.d.mts +0 -0
  178. /package/dist/{file-kit → file}/cdn.d.ts +0 -0
  179. /package/dist/{file-kit → file}/client/drop_file_input.d.mts +0 -0
  180. /package/dist/{file-kit → file}/client/drop_file_input.d.ts +0 -0
  181. /package/dist/{file-kit → file}/client/file_upload_button.d.mts +0 -0
  182. /package/dist/{file-kit → file}/client/file_upload_button.d.ts +0 -0
  183. /package/dist/{file-kit → file}/client/file_uploader.d.mts +0 -0
  184. /package/dist/{file-kit → file}/client/file_uploader.d.ts +0 -0
  185. /package/dist/{file-kit → file}/client/format_size.d.mts +0 -0
  186. /package/dist/{file-kit → file}/client/format_size.d.ts +0 -0
  187. /package/dist/{file-kit → file}/client/metadata.d.mts +0 -0
  188. /package/dist/{file-kit → file}/client/metadata.d.ts +0 -0
  189. /package/dist/{file-kit/repository.mjs → file/file_repository.mjs} +0 -0
  190. /package/dist/{http-kit → http}/index.d.mts +0 -0
  191. /package/dist/{http-kit → http}/index.d.ts +0 -0
  192. /package/dist/{http-kit → http}/response.d.mts +0 -0
  193. /package/dist/{http-kit → http}/response.d.ts +0 -0
  194. /package/dist/{seo-kit → seo}/seo.d.mts +0 -0
  195. /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: (cdn: (key: string | undefined, options?: {
12
- width?: number;
13
- }) => string | undefined) => React.FC<ResponsiveImageProps>;
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-kit/responsive_image.tsx
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 = (cdn) => {
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 = cdn(file?.key) || props.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
- const origin = process.env.NEXT_PUBLIC_CDN_ORIGIN || "";
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-kit/responsive_image.tsx
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 = (cdn) => {
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 = cdn(file?.key) || props.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
- const origin = process.env.NEXT_PUBLIC_CDN_ORIGIN || "";
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-kit/index.ts
21
- var http_kit_exports = {};
22
- __export(http_kit_exports, {
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(http_kit_exports);
41
+ module.exports = __toCommonJS(http_exports);
42
42
 
43
- // src/http-kit/response.ts
43
+ // src/http/response.ts
44
44
  var createJsonResponse = (status) => {
45
45
  return (data = {}, init) => {
46
46
  return Response.json(data, { status, ...init });
@@ -1,4 +1,4 @@
1
- // src/http-kit/response.ts
1
+ // src/http/response.ts
2
2
  var createJsonResponse = (status) => {
3
3
  return (data = {}, init) => {
4
4
  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-kit/response.ts
20
+ // src/http/response.ts
21
21
  var response_exports = {};
22
22
  __export(response_exports, {
23
23
  ACCEPTED: () => ACCEPTED,
@@ -1,4 +1,4 @@
1
- // src/http-kit/response.ts
1
+ // src/http/response.ts
2
2
  var createJsonResponse = (status) => {
3
3
  return (data = {}, init) => {
4
4
  return Response.json(data, { status, ...init });
package/dist/index.d.mts CHANGED
@@ -2,3 +2,4 @@ export { cn } from './cn.mjs';
2
2
  export { formatHumanDateTime } from './date.mjs';
3
3
  export { singleton } from './singleton.mjs';
4
4
  export { toSlug } from './slug.mjs';
5
+ export { default as moment } from 'moment-timezone';
package/dist/index.d.ts CHANGED
@@ -2,3 +2,4 @@ export { cn } from './cn.js';
2
2
  export { formatHumanDateTime } from './date.js';
3
3
  export { singleton } from './singleton.js';
4
4
  export { toSlug } from './slug.js';
5
+ export { default as moment } from 'moment-timezone';
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
@@ -46,6 +46,7 @@ var toSlug = (str) => {
46
46
  export {
47
47
  cn,
48
48
  formatHumanDateTime,
49
+ moment,
49
50
  singleton,
50
51
  toSlug
51
52
  };
@@ -1,29 +1,21 @@
1
- import { AuthService } from '../auth-kit/auth_service.mjs';
2
- import { GoogleAuth } from '../auth-kit/google_auth.mjs';
3
- import { AppleAuth } from '../auth-kit/apple_auth.mjs';
4
- import { FileRepository } from '../file-kit/repository.mjs';
5
- import { FileService } from '../file-kit/file_service.mjs';
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 'react-router';
11
- import '../file-kit/object_storage.mjs';
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 createAuthAPIHandler: <TFile>({ AUTH, GOOGLE_AUTH, APPLE_AUTH, KAKAO_AUTH, JWT_MANAGER, FILE_SERVICE, SITE_ORIGIN, authRepository, fileRepository, }: {
15
- SITE_ORIGIN: string;
16
- JWT_MANAGER: JWTManager;
17
- AUTH: AuthService;
18
- GOOGLE_AUTH: GoogleAuth;
19
- APPLE_AUTH: AppleAuth;
20
- KAKAO_AUTH: KakaoAuth;
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 { createAuthAPIHandler };
21
+ export { createAPIHandler };
@@ -1,29 +1,21 @@
1
- import { AuthService } from '../auth-kit/auth_service.js';
2
- import { GoogleAuth } from '../auth-kit/google_auth.js';
3
- import { AppleAuth } from '../auth-kit/apple_auth.js';
4
- import { FileRepository } from '../file-kit/repository.js';
5
- import { FileService } from '../file-kit/file_service.js';
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 'react-router';
11
- import '../file-kit/object_storage.js';
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 createAuthAPIHandler: <TFile>({ AUTH, GOOGLE_AUTH, APPLE_AUTH, KAKAO_AUTH, JWT_MANAGER, FILE_SERVICE, SITE_ORIGIN, authRepository, fileRepository, }: {
15
- SITE_ORIGIN: string;
16
- JWT_MANAGER: JWTManager;
17
- AUTH: AuthService;
18
- GOOGLE_AUTH: GoogleAuth;
19
- APPLE_AUTH: AppleAuth;
20
- KAKAO_AUTH: KakaoAuth;
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 { createAuthAPIHandler };
21
+ export { createAPIHandler };