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.
- 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} +6 -9
- package/dist/{auth-kit/repository.d.ts → auth/auth_repository.d.ts} +6 -9
- package/dist/{file-kit/repository.js → auth/auth_repository.js} +3 -3
- package/dist/{auth-kit → auth}/auth_service.d.mts +11 -22
- package/dist/{auth-kit → auth}/auth_service.d.ts +11 -22
- package/dist/{auth-kit → auth}/auth_service.js +23 -76
- package/dist/{auth-kit → auth}/auth_service.mjs +23 -76
- 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 +23 -0
- package/dist/auth/client/provider.d.ts +23 -0
- package/dist/auth/client/provider.js +137 -0
- package/dist/auth/client/provider.mjs +101 -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/signup.d.mts +15 -0
- package/dist/auth/handlers/signup.d.ts +15 -0
- package/dist/auth/handlers/signup.js +135 -0
- package/dist/auth/handlers/signup.mjs +100 -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/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 +15 -25
- package/dist/route/api.d.ts +15 -25
- package/dist/route/api.js +325 -178
- package/dist/route/api.mjs +314 -177
- package/dist/{seo-kit → seo}/seo.js +1 -1
- package/dist/{seo-kit → seo}/seo.mjs +1 -1
- package/package.json +74 -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
|
@@ -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,19 @@
|
|
|
1
|
-
import { AuthService } from '../auth
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
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 '
|
|
11
|
-
import '../file
|
|
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
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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 {
|
|
19
|
+
export { createAPIHandler };
|
package/dist/route/api.d.ts
CHANGED
|
@@ -1,29 +1,19 @@
|
|
|
1
|
-
import { AuthService } from '../auth
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
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 '
|
|
11
|
-
import '../file
|
|
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
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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 {
|
|
19
|
+
export { createAPIHandler };
|