dn-react-router-toolkit 0.1.12 → 0.2.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.
Files changed (183) 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} +6 -9
  6. package/dist/{auth-kit/repository.d.ts → auth/auth_repository.d.ts} +6 -9
  7. package/dist/{file-kit/repository.js → auth/auth_repository.js} +3 -3
  8. package/dist/{auth-kit → auth}/auth_service.d.mts +11 -22
  9. package/dist/{auth-kit → auth}/auth_service.d.ts +11 -22
  10. package/dist/{auth-kit → auth}/auth_service.js +23 -76
  11. package/dist/{auth-kit → auth}/auth_service.mjs +23 -76
  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 +23 -0
  17. package/dist/auth/client/provider.d.ts +23 -0
  18. package/dist/auth/client/provider.js +137 -0
  19. package/dist/auth/client/provider.mjs +101 -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/signup.d.mts +15 -0
  47. package/dist/auth/handlers/signup.d.ts +15 -0
  48. package/dist/auth/handlers/signup.js +135 -0
  49. package/dist/auth/handlers/signup.mjs +100 -0
  50. package/dist/auth/handlers/signup_with_thirdparty.d.mts +17 -0
  51. package/dist/auth/handlers/signup_with_thirdparty.d.ts +17 -0
  52. package/dist/auth/handlers/signup_with_thirdparty.js +123 -0
  53. package/dist/auth/handlers/signup_with_thirdparty.mjs +98 -0
  54. package/dist/auth/handlers/thirdparty_auth_callback.d.mts +16 -0
  55. package/dist/auth/handlers/thirdparty_auth_callback.d.ts +16 -0
  56. package/dist/{route/auth/callback/[provider]/route.js → auth/handlers/thirdparty_auth_callback.js} +54 -45
  57. package/dist/{route/auth/callback/[provider]/route.mjs → auth/handlers/thirdparty_auth_callback.mjs} +49 -40
  58. package/dist/{auth-kit/jwt.d.mts → auth/jwt_manager.d.mts} +11 -1
  59. package/dist/{auth-kit/jwt.d.ts → auth/jwt_manager.d.ts} +11 -1
  60. package/dist/{auth-kit/jwt.js → auth/jwt_manager.js} +25 -11
  61. package/dist/{auth-kit/jwt.mjs → auth/jwt_manager.mjs} +22 -8
  62. package/dist/auth/kakao_auth.d.mts +27 -0
  63. package/dist/auth/kakao_auth.d.ts +27 -0
  64. package/dist/auth/kakao_auth.js +56 -0
  65. package/dist/auth/kakao_auth.mjs +31 -0
  66. package/dist/auth/thirdparty_auth.d.mts +41 -0
  67. package/dist/auth/thirdparty_auth.d.ts +41 -0
  68. package/dist/{auth-kit/kakao_auth.js → auth/thirdparty_auth.js} +31 -33
  69. package/dist/{auth-kit/kakao_auth.mjs → auth/thirdparty_auth.mjs} +26 -28
  70. package/dist/{auth-kit → auth}/with_auth.d.mts +5 -6
  71. package/dist/{auth-kit → auth}/with_auth.d.ts +5 -6
  72. package/dist/{auth-kit → auth}/with_auth.js +26 -10
  73. package/dist/auth/with_auth.mjs +63 -0
  74. package/dist/date.d.mts +2 -0
  75. package/dist/date.d.ts +2 -0
  76. package/dist/date.js +4 -2
  77. package/dist/date.mjs +2 -1
  78. package/dist/{file-kit → file}/cdn.js +1 -1
  79. package/dist/{file-kit → file}/cdn.mjs +1 -1
  80. package/dist/{file-kit → file}/client/drop_file_input.js +3 -3
  81. package/dist/{file-kit → file}/client/drop_file_input.mjs +3 -3
  82. package/dist/{file-kit → file}/client/file_upload_button.js +1 -1
  83. package/dist/{file-kit → file}/client/file_upload_button.mjs +1 -1
  84. package/dist/{file-kit → file}/client/file_uploader.js +3 -3
  85. package/dist/{file-kit → file}/client/file_uploader.mjs +2 -2
  86. package/dist/{file-kit → file}/client/format_size.js +1 -1
  87. package/dist/{file-kit → file}/client/format_size.mjs +1 -1
  88. package/dist/{file-kit → file}/client/metadata.js +1 -1
  89. package/dist/{file-kit → file}/client/metadata.mjs +1 -1
  90. package/dist/{file-kit/repository.d.mts → file/file_repository.d.mts} +4 -4
  91. package/dist/{file-kit/repository.d.ts → file/file_repository.d.ts} +4 -4
  92. package/dist/{auth-kit/repository.js → file/file_repository.js} +3 -3
  93. package/dist/file/file_service.d.mts +32 -0
  94. package/dist/file/file_service.d.ts +32 -0
  95. package/dist/{file-kit → file}/file_service.js +27 -21
  96. package/dist/file/file_service.mjs +41 -0
  97. package/dist/file/handlers/delete_file.d.mts +17 -0
  98. package/dist/file/handlers/delete_file.d.ts +17 -0
  99. package/dist/{route/api/files/[fileId]/route.js → file/handlers/delete_file.js} +15 -15
  100. package/dist/{route/api/files/[fileId]/route.mjs → file/handlers/delete_file.mjs} +10 -10
  101. package/dist/file/handlers/upload_file.d.mts +16 -0
  102. package/dist/file/handlers/upload_file.d.ts +16 -0
  103. package/dist/{route/api/files/route.js → file/handlers/upload_file.js} +13 -13
  104. package/dist/{route/api/files/route.mjs → file/handlers/upload_file.mjs} +8 -8
  105. package/dist/{file-kit → file}/object_storage.d.mts +3 -1
  106. package/dist/{file-kit → file}/object_storage.d.ts +3 -1
  107. package/dist/{file-kit → file}/object_storage.js +2 -2
  108. package/dist/{file-kit → file}/object_storage.mjs +2 -2
  109. package/dist/{file-kit → file}/responsive_image.d.mts +4 -4
  110. package/dist/{file-kit → file}/responsive_image.d.ts +4 -4
  111. package/dist/{file-kit → file}/responsive_image.js +18 -9
  112. package/dist/{file-kit → file}/responsive_image.mjs +18 -9
  113. package/dist/{http-kit → http}/index.js +5 -5
  114. package/dist/{http-kit → http}/index.mjs +1 -1
  115. package/dist/{http-kit → http}/response.js +1 -1
  116. package/dist/{http-kit → http}/response.mjs +1 -1
  117. package/dist/index.d.mts +1 -0
  118. package/dist/index.d.ts +1 -0
  119. package/dist/index.js +2 -0
  120. package/dist/index.mjs +1 -0
  121. package/dist/route/api.d.mts +15 -25
  122. package/dist/route/api.d.ts +15 -25
  123. package/dist/route/api.js +325 -178
  124. package/dist/route/api.mjs +314 -177
  125. package/dist/{seo-kit → seo}/seo.js +1 -1
  126. package/dist/{seo-kit → seo}/seo.mjs +1 -1
  127. package/package.json +74 -74
  128. package/dist/auth-kit/apple_auth.d.mts +0 -24
  129. package/dist/auth-kit/apple_auth.d.ts +0 -24
  130. package/dist/auth-kit/apple_auth.mjs +0 -50
  131. package/dist/auth-kit/client/google_login_button.d.mts +0 -9
  132. package/dist/auth-kit/client/google_login_button.d.ts +0 -9
  133. package/dist/auth-kit/client/google_login_button.mjs +0 -32
  134. package/dist/auth-kit/client/logout.d.mts +0 -3
  135. package/dist/auth-kit/client/logout.d.ts +0 -3
  136. package/dist/auth-kit/client/logout.js +0 -49
  137. package/dist/auth-kit/client/logout.mjs +0 -24
  138. package/dist/auth-kit/google_auth.d.mts +0 -27
  139. package/dist/auth-kit/google_auth.d.ts +0 -27
  140. package/dist/auth-kit/kakao_auth.d.mts +0 -24
  141. package/dist/auth-kit/kakao_auth.d.ts +0 -24
  142. package/dist/auth-kit/with_auth.mjs +0 -47
  143. package/dist/file-kit/file_service.d.mts +0 -26
  144. package/dist/file-kit/file_service.d.ts +0 -26
  145. package/dist/file-kit/file_service.mjs +0 -35
  146. package/dist/route/api/auth/login/_provider_/route.d.mts +0 -20
  147. package/dist/route/api/auth/login/_provider_/route.d.ts +0 -20
  148. package/dist/route/api/auth/login/route.d.mts +0 -14
  149. package/dist/route/api/auth/login/route.d.ts +0 -14
  150. package/dist/route/api/auth/logout/route.d.mts +0 -14
  151. package/dist/route/api/auth/logout/route.d.ts +0 -14
  152. package/dist/route/api/auth/refresh/route.d.mts +0 -13
  153. package/dist/route/api/auth/refresh/route.d.ts +0 -13
  154. package/dist/route/api/auth/route.d.mts +0 -13
  155. package/dist/route/api/auth/route.d.ts +0 -13
  156. package/dist/route/api/files/_fileId_/route.d.mts +0 -17
  157. package/dist/route/api/files/_fileId_/route.d.ts +0 -17
  158. package/dist/route/api/files/route.d.mts +0 -16
  159. package/dist/route/api/files/route.d.ts +0 -16
  160. package/dist/route/auth/callback/_provider_/route.d.mts +0 -20
  161. package/dist/route/auth/callback/_provider_/route.d.ts +0 -20
  162. /package/dist/{auth-kit/repository.mjs → auth/auth_repository.mjs} +0 -0
  163. /package/dist/{auth-kit → auth}/client/redirect_page.d.mts +0 -0
  164. /package/dist/{auth-kit → auth}/client/redirect_page.d.ts +0 -0
  165. /package/dist/{file-kit → file}/cdn.d.mts +0 -0
  166. /package/dist/{file-kit → file}/cdn.d.ts +0 -0
  167. /package/dist/{file-kit → file}/client/drop_file_input.d.mts +0 -0
  168. /package/dist/{file-kit → file}/client/drop_file_input.d.ts +0 -0
  169. /package/dist/{file-kit → file}/client/file_upload_button.d.mts +0 -0
  170. /package/dist/{file-kit → file}/client/file_upload_button.d.ts +0 -0
  171. /package/dist/{file-kit → file}/client/file_uploader.d.mts +0 -0
  172. /package/dist/{file-kit → file}/client/file_uploader.d.ts +0 -0
  173. /package/dist/{file-kit → file}/client/format_size.d.mts +0 -0
  174. /package/dist/{file-kit → file}/client/format_size.d.ts +0 -0
  175. /package/dist/{file-kit → file}/client/metadata.d.mts +0 -0
  176. /package/dist/{file-kit → file}/client/metadata.d.ts +0 -0
  177. /package/dist/{file-kit/repository.mjs → file/file_repository.mjs} +0 -0
  178. /package/dist/{http-kit → http}/index.d.mts +0 -0
  179. /package/dist/{http-kit → http}/index.d.ts +0 -0
  180. /package/dist/{http-kit → http}/response.d.mts +0 -0
  181. /package/dist/{http-kit → http}/response.d.ts +0 -0
  182. /package/dist/{seo-kit → seo}/seo.d.mts +0 -0
  183. /package/dist/{seo-kit → seo}/seo.d.ts +0 -0
@@ -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,19 @@
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';
9
5
  import 'jose';
10
- import 'react-router';
11
- import '../file-kit/object_storage.mjs';
6
+ import '../auth/jwt_manager.mjs';
7
+ import '../file/object_storage.mjs';
12
8
  import '@aws-sdk/client-s3';
9
+ import '../auth/auth_repository.mjs';
10
+ import '../file/file_repository.mjs';
13
11
 
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>;
12
+ declare const createAPIHandler: <TFile>({ authService, fileService, getThirdPartyAuth, signupTokenSecret, }: {
13
+ authService: AuthService<TFile>;
14
+ fileService: FileService<TFile>;
15
+ getThirdPartyAuth: (provider: string) => ThirdpartyAuth;
16
+ signupTokenSecret: string;
17
+ }) => ({ request, params }: LoaderFunctionArgs | ActionFunctionArgs) => Promise<Response>;
28
18
 
29
- export { createAuthAPIHandler };
19
+ export { createAPIHandler };
@@ -1,29 +1,19 @@
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';
9
5
  import 'jose';
10
- import 'react-router';
11
- import '../file-kit/object_storage.js';
6
+ import '../auth/jwt_manager.js';
7
+ import '../file/object_storage.js';
12
8
  import '@aws-sdk/client-s3';
9
+ import '../auth/auth_repository.js';
10
+ import '../file/file_repository.js';
13
11
 
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>;
12
+ declare const createAPIHandler: <TFile>({ authService, fileService, getThirdPartyAuth, signupTokenSecret, }: {
13
+ authService: AuthService<TFile>;
14
+ fileService: FileService<TFile>;
15
+ getThirdPartyAuth: (provider: string) => ThirdpartyAuth;
16
+ signupTokenSecret: string;
17
+ }) => ({ request, params }: LoaderFunctionArgs | ActionFunctionArgs) => Promise<Response>;
28
18
 
29
- export { createAuthAPIHandler };
19
+ export { createAPIHandler };