@baseplate-dev/plugin-auth 4.0.2 → 4.0.3
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/CHANGELOG.md +24 -0
- package/dist/local-auth/core/generators/auth-email-password/auth-email-password.generator.d.ts +4 -0
- package/dist/local-auth/core/generators/auth-email-password/auth-email-password.generator.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/auth-email-password.generator.js +13 -3
- package/dist/local-auth/core/generators/auth-email-password/auth-email-password.generator.js.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/generated/index.d.ts +24 -14
- package/dist/local-auth/core/generators/auth-email-password/generated/index.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/generated/template-paths.d.ts +0 -1
- package/dist/local-auth/core/generators/auth-email-password/generated/template-paths.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/generated/template-paths.js +0 -1
- package/dist/local-auth/core/generators/auth-email-password/generated/template-paths.js.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/generated/template-renderers.d.ts +3 -3
- package/dist/local-auth/core/generators/auth-email-password/generated/template-renderers.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/generated/template-renderers.js +1 -11
- package/dist/local-auth/core/generators/auth-email-password/generated/template-renderers.js.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/generated/typed-templates.d.ts +34 -16
- package/dist/local-auth/core/generators/auth-email-password/generated/typed-templates.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/generated/typed-templates.js +6 -23
- package/dist/local-auth/core/generators/auth-email-password/generated/typed-templates.js.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/email-verification.service.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/email-verification.service.js +2 -3
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/email-verification.service.js.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/email-verification.service.ts +2 -3
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/password-reset.service.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/password-reset.service.js +3 -4
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/password-reset.service.js.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/password-reset.service.ts +3 -7
- package/dist/local-auth/core/generators/auth-module/auth-module.generator.d.ts +10 -0
- package/dist/local-auth/core/generators/auth-module/auth-module.generator.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-module/auth-module.generator.js +11 -1
- package/dist/local-auth/core/generators/auth-module/auth-module.generator.js.map +1 -1
- package/dist/local-auth/core/generators/auth-module/generated/index.d.ts +24 -0
- package/dist/local-auth/core/generators/auth-module/generated/index.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-module/generated/template-paths.d.ts +2 -0
- package/dist/local-auth/core/generators/auth-module/generated/template-paths.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-module/generated/template-paths.js +2 -0
- package/dist/local-auth/core/generators/auth-module/generated/template-paths.js.map +1 -1
- package/dist/local-auth/core/generators/auth-module/generated/template-renderers.d.ts +9 -0
- package/dist/local-auth/core/generators/auth-module/generated/template-renderers.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-module/generated/template-renderers.js +25 -1
- package/dist/local-auth/core/generators/auth-module/generated/template-renderers.js.map +1 -1
- package/dist/local-auth/core/generators/auth-module/generated/ts-import-providers.d.ts +9 -0
- package/dist/local-auth/core/generators/auth-module/generated/ts-import-providers.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-module/generated/ts-import-providers.js +6 -0
- package/dist/local-auth/core/generators/auth-module/generated/ts-import-providers.js.map +1 -1
- package/dist/local-auth/core/generators/auth-module/generated/typed-templates.d.ts +18 -0
- package/dist/local-auth/core/generators/auth-module/generated/typed-templates.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-module/generated/typed-templates.js +30 -0
- package/dist/local-auth/core/generators/auth-module/generated/typed-templates.js.map +1 -1
- package/dist/local-auth/core/generators/auth-module/templates/module/queues/cleanup-auth-verification.queue.d.ts +6 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/queues/cleanup-auth-verification.queue.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/queues/cleanup-auth-verification.queue.js +17 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/queues/cleanup-auth-verification.queue.js.map +1 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/queues/cleanup-auth-verification.queue.ts +21 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/services/auth-verification.service.d.ts.map +1 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/services/auth-verification.service.js.map +1 -0
- package/dist/web/assets/{__federation_expose_auth0CoreCommon-DKJVe6Rd.js → __federation_expose_auth0CoreCommon-e_GtBIIm.js} +3 -3
- package/dist/web/assets/{__federation_expose_auth0CoreCommon-DKJVe6Rd.js.map → __federation_expose_auth0CoreCommon-e_GtBIIm.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_auth0CoreWeb-CfhSWZsK.js → __federation_expose_auth0CoreWeb-CTfPylMw.js} +5 -5
- package/dist/web/assets/{__federation_expose_auth0CoreWeb-CfhSWZsK.js.map → __federation_expose_auth0CoreWeb-CTfPylMw.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_authCoreCommon-D3-Gk9mI.js → __federation_expose_authCoreCommon-Bg2mzE9K.js} +3 -3
- package/dist/web/assets/{__federation_expose_authCoreCommon-D3-Gk9mI.js.map → __federation_expose_authCoreCommon-Bg2mzE9K.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_authCoreWeb-DZoAij9e.js → __federation_expose_authCoreWeb-DrOVHmj4.js} +6 -6
- package/dist/web/assets/{__federation_expose_authCoreWeb-DZoAij9e.js.map → __federation_expose_authCoreWeb-DrOVHmj4.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_local-authAdminCommon-BRHnF0Hn.js → __federation_expose_local-authAdminCommon-Bzb0P17-.js} +2 -2
- package/dist/web/assets/{__federation_expose_local-authAdminCommon-BRHnF0Hn.js.map → __federation_expose_local-authAdminCommon-Bzb0P17-.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_local-authAdminWeb-dYAIxuqC.js → __federation_expose_local-authAdminWeb-D_LWcl7j.js} +2 -2
- package/dist/web/assets/{__federation_expose_local-authAdminWeb-dYAIxuqC.js.map → __federation_expose_local-authAdminWeb-D_LWcl7j.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_local-authCoreCommon-CIwvOx0d.js → __federation_expose_local-authCoreCommon-D6OG-Rz6.js} +3 -3
- package/dist/web/assets/{__federation_expose_local-authCoreCommon-CIwvOx0d.js.map → __federation_expose_local-authCoreCommon-D6OG-Rz6.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_local-authCoreWeb-Bwooi2qZ.js → __federation_expose_local-authCoreWeb-CaR8fx1f.js} +5 -5
- package/dist/web/assets/{__federation_expose_local-authCoreWeb-Bwooi2qZ.js.map → __federation_expose_local-authCoreWeb-CaR8fx1f.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_placeholder-authCoreCommon-gFDSzGjB.js → __federation_expose_placeholder-authCoreCommon-D7b3GEPP.js} +3 -3
- package/dist/web/assets/{__federation_expose_placeholder-authCoreCommon-gFDSzGjB.js.map → __federation_expose_placeholder-authCoreCommon-D7b3GEPP.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_placeholder-authCoreWeb-BZLwIkLk.js → __federation_expose_placeholder-authCoreWeb-VZzvid5j.js} +5 -5
- package/dist/web/assets/{__federation_expose_placeholder-authCoreWeb-BZLwIkLk.js.map → __federation_expose_placeholder-authCoreWeb-VZzvid5j.js.map} +1 -1
- package/dist/web/assets/{__federation_fn_import-pxYUpmb_.js → __federation_fn_import-DfNliZHH.js} +2 -2
- package/dist/web/assets/{__federation_fn_import-pxYUpmb_.js.map → __federation_fn_import-DfNliZHH.js.map} +1 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/{web-BXi2UCP-.js → web-BqJ1vSYx.js} +6 -6
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/{web-BXi2UCP-.js.map → web-BqJ1vSYx.js.map} +1 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/{project-builder-lib-O0clDXMb.js → project-builder-lib-qf98MMJC.js} +4 -4
- package/dist/web/assets/__federation_shared_@baseplate-dev/{project-builder-lib-O0clDXMb.js.map → project-builder-lib-qf98MMJC.js.map} +1 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/{ui-components-BpuFQk6s.js → ui-components-DFkMnXmX.js} +14 -14
- package/dist/web/assets/__federation_shared_@baseplate-dev/{ui-components-BpuFQk6s.js.map → ui-components-DFkMnXmX.js.map} +1 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/{utils-UiZ-8JBg.js → utils-CApJheqk.js} +2 -2
- package/dist/web/assets/__federation_shared_@baseplate-dev/{utils-UiZ-8JBg.js.map → utils-CApJheqk.js.map} +1 -1
- package/dist/web/assets/__federation_shared_@tanstack/{react-router-BPEAtEJI.js → react-router-YQslfDyE.js} +2 -2
- package/dist/web/assets/__federation_shared_@tanstack/{react-router-BPEAtEJI.js.map → react-router-YQslfDyE.js.map} +1 -1
- package/dist/web/assets/{get-auth-plugin-definition-DPsrvQbo.js → get-auth-plugin-definition-CVuj_mvy.js} +2 -2
- package/dist/web/assets/{get-auth-plugin-definition-DPsrvQbo.js.map → get-auth-plugin-definition-CVuj_mvy.js.map} +1 -1
- package/dist/web/assets/{index-CSfs0UAV.js → index-B00D4irM.js} +2 -2
- package/dist/web/assets/{index-CSfs0UAV.js.map → index-B00D4irM.js.map} +1 -1
- package/dist/web/assets/{index.esm-BoRQu8mM.js → index.esm-1qBxxnfu.js} +2 -2
- package/dist/web/assets/{index.esm-BoRQu8mM.js.map → index.esm-1qBxxnfu.js.map} +1 -1
- package/dist/web/assets/{model-merger-CdjliK9v.js → model-merger-59HLmy_J.js} +2 -2
- package/dist/web/assets/{model-merger-CdjliK9v.js.map → model-merger-59HLmy_J.js.map} +1 -1
- package/dist/web/assets/{plugin-definition-j1nJ0FFI.js → plugin-definition-BKCeZ0Ni.js} +2 -2
- package/dist/web/assets/{plugin-definition-j1nJ0FFI.js.map → plugin-definition-BKCeZ0Ni.js.map} +1 -1
- package/dist/web/assets/{plugin-definition-BMYDEj3f.js → plugin-definition-B_hlyPlm.js} +2 -2
- package/dist/web/assets/{plugin-definition-BMYDEj3f.js.map → plugin-definition-B_hlyPlm.js.map} +1 -1
- package/dist/web/assets/{plugin-definition-BG6tu7Hh.js → plugin-definition-Bkx-a_wA.js} +2 -2
- package/dist/web/assets/{plugin-definition-BG6tu7Hh.js.map → plugin-definition-Bkx-a_wA.js.map} +1 -1
- package/dist/web/assets/{plugin-definition-DRhTuQas.js → plugin-definition-CcdhC0td.js} +2 -2
- package/dist/web/assets/{plugin-definition-DRhTuQas.js.map → plugin-definition-CcdhC0td.js.map} +1 -1
- package/dist/web/assets/{react-CBhSWxr_.js → react-Df9ccuow.js} +2 -2
- package/dist/web/assets/{react-CBhSWxr_.js.map → react-Df9ccuow.js.map} +1 -1
- package/dist/web/assets/remoteEntry.js +10 -10
- package/dist/web/assets/{styles-BbHyE-2h.js → styles-CbPVroCT.js} +3 -3
- package/dist/web/assets/{styles-BbHyE-2h.js.map → styles-CbPVroCT.js.map} +1 -1
- package/package.json +14 -13
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/auth-verification.service.d.ts.map +0 -1
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/auth-verification.service.js.map +0 -1
- /package/dist/local-auth/core/generators/{auth-email-password → auth-module}/templates/module/services/auth-verification.service.d.ts +0 -0
- /package/dist/local-auth/core/generators/{auth-email-password → auth-module}/templates/module/services/auth-verification.service.js +0 -0
- /package/dist/local-auth/core/generators/{auth-email-password → auth-module}/templates/module/services/auth-verification.service.ts +0 -0
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
import { PASSWORD_MAX_LENGTH, PASSWORD_MIN_LENGTH, PASSWORD_RESET_TOKEN_EXPIRY_SEC, } from '$constantsPassword';
|
|
3
|
-
import { createAuthVerification, validateAuthVerification, } from '
|
|
3
|
+
import { createAuthVerification, validateAuthVerification, } from '%authModuleImports';
|
|
4
4
|
import { config } from '%configServiceImports';
|
|
5
5
|
import { sendEmail } from '%emailModuleImports';
|
|
6
6
|
import { BadRequestError, handleZodRequestValidationError, } from '%errorHandlerServiceImports';
|
|
7
7
|
import { createPasswordHash } from '%passwordHasherServiceImports';
|
|
8
8
|
import { prisma } from '%prismaImports';
|
|
9
9
|
import { memoizeRateLimiter } from '%rateLimitImports';
|
|
10
|
-
import { PasswordChangedEmail, PasswordResetEmail, } from '@blog-with-auth/transactional';
|
|
11
10
|
import z from 'zod';
|
|
12
11
|
const PROVIDER_ID = 'email-password';
|
|
13
12
|
const PASSWORD_RESET_TYPE = 'password-reset';
|
|
@@ -61,7 +60,7 @@ export async function requestPasswordReset({ email: rawEmail, context, }) {
|
|
|
61
60
|
// Construct reset URL using configured domain
|
|
62
61
|
const resetLink = `${config.AUTH_FRONTEND_URL}/auth/reset-password?token=${encodeURIComponent(token)}`;
|
|
63
62
|
// Send email asynchronously (queue-based)
|
|
64
|
-
await sendEmail(
|
|
63
|
+
await sendEmail(TPL_PASSWORD_RESET_EMAIL, {
|
|
65
64
|
to: user.email,
|
|
66
65
|
data: { resetLink },
|
|
67
66
|
});
|
|
@@ -148,7 +147,7 @@ export async function completePasswordReset({ token: rawToken, newPassword: rawN
|
|
|
148
147
|
}),
|
|
149
148
|
]);
|
|
150
149
|
// Send password changed confirmation email
|
|
151
|
-
await sendEmail(
|
|
150
|
+
await sendEmail(TPL_PASSWORD_CHANGED_EMAIL, {
|
|
152
151
|
to: user.email,
|
|
153
152
|
data: {},
|
|
154
153
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"password-reset.service.js","sourceRoot":"","sources":["../../../../../../../../src/local-auth/core/generators/auth-email-password/templates/module/services/password-reset.service.ts"],"names":[],"mappings":"AAAA,cAAc;AAId,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,+BAA+B,GAChC,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,sBAAsB,EACtB,wBAAwB,GACzB,MAAM,
|
|
1
|
+
{"version":3,"file":"password-reset.service.js","sourceRoot":"","sources":["../../../../../../../../src/local-auth/core/generators/auth-email-password/templates/module/services/password-reset.service.ts"],"names":[],"mappings":"AAAA,cAAc;AAId,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,+BAA+B,GAChC,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,sBAAsB,EACtB,wBAAwB,GACzB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EACL,eAAe,EACf,+BAA+B,GAChC,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,MAAM,WAAW,GAAG,gBAAgB,CAAC;AACrC,MAAM,mBAAmB,GAAG,gBAAgB,CAAC;AAE7C;;GAEG;AAEH,wCAAwC;AACxC,MAAM,4BAA4B,GAAG,kBAAkB,CACrD,sBAAsB,EACtB;IACE,MAAM,EAAE,CAAC;IACT,QAAQ,EAAE,EAAE,GAAG,EAAE,EAAE,SAAS;CAC7B,CACF,CAAC;AAEF,gEAAgE;AAChE,MAAM,yBAAyB,GAAG,kBAAkB,CAAC,mBAAmB,EAAE;IACxE,MAAM,EAAE,EAAE;IACV,QAAQ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,MAAM,EAAE,IAAI,CAAC,EAAE,EAAE;SACtD,CAAC;QACF,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC;YACxB,KAAK,EAAE;gBACL,oBAAoB,EAAE;oBACpB,SAAS,EAAE,IAAI,CAAC,KAAK;oBACrB,UAAU,EAAE,WAAW;iBACxB;aACF;YACD,MAAM,EAAE;gBACN,MAAM,EAAE,IAAI,CAAC,EAAE;gBACf,SAAS,EAAE,IAAI,CAAC,KAAK;gBACrB,UAAU,EAAE,WAAW;gBACvB,QAAQ,EAAE,YAAY;aACvB;YACD,MAAM,EAAE;gBACN,QAAQ,EAAE,YAAY;aACvB;SACF,CAAC;QACF,MAAM,CAAC,WAAW,CAAC,UAAU,CAAC;YAC5B,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,EAAE;SAC3B,CAAC;KACH,CAAC,CAAC;IAEH,2CAA2C;IAC3C,MAAM,SAAS,CAAC,0BAA0B,EAAE;QAC1C,EAAE,EAAE,IAAI,CAAC,KAAK;QACd,IAAI,EAAE,EAAE;KACT,CAAC,CAAC;IAEH,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAC3B,CAAC"}
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
import {
|
|
11
11
|
createAuthVerification,
|
|
12
12
|
validateAuthVerification,
|
|
13
|
-
} from '
|
|
13
|
+
} from '%authModuleImports';
|
|
14
14
|
import { config } from '%configServiceImports';
|
|
15
15
|
import { sendEmail } from '%emailModuleImports';
|
|
16
16
|
import {
|
|
@@ -20,10 +20,6 @@ import {
|
|
|
20
20
|
import { createPasswordHash } from '%passwordHasherServiceImports';
|
|
21
21
|
import { prisma } from '%prismaImports';
|
|
22
22
|
import { memoizeRateLimiter } from '%rateLimitImports';
|
|
23
|
-
import {
|
|
24
|
-
PasswordChangedEmail,
|
|
25
|
-
PasswordResetEmail,
|
|
26
|
-
} from '@blog-with-auth/transactional';
|
|
27
23
|
import z from 'zod';
|
|
28
24
|
|
|
29
25
|
const PROVIDER_ID = 'email-password';
|
|
@@ -113,7 +109,7 @@ export async function requestPasswordReset({
|
|
|
113
109
|
const resetLink = `${config.AUTH_FRONTEND_URL}/auth/reset-password?token=${encodeURIComponent(token)}`;
|
|
114
110
|
|
|
115
111
|
// Send email asynchronously (queue-based)
|
|
116
|
-
await sendEmail(
|
|
112
|
+
await sendEmail(TPL_PASSWORD_RESET_EMAIL, {
|
|
117
113
|
to: user.email,
|
|
118
114
|
data: { resetLink },
|
|
119
115
|
});
|
|
@@ -224,7 +220,7 @@ export async function completePasswordReset({
|
|
|
224
220
|
]);
|
|
225
221
|
|
|
226
222
|
// Send password changed confirmation email
|
|
227
|
-
await sendEmail(
|
|
223
|
+
await sendEmail(TPL_PASSWORD_CHANGED_EMAIL, {
|
|
228
224
|
to: user.email,
|
|
229
225
|
data: {},
|
|
230
226
|
});
|
|
@@ -8,7 +8,10 @@ export declare const authModuleGenerator: import("@baseplate-dev/sync").Generato
|
|
|
8
8
|
}, undefined>;
|
|
9
9
|
imports: import("@baseplate-dev/sync").GeneratorTask<{
|
|
10
10
|
authModuleImports: import("@baseplate-dev/sync").ProviderExport<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
11
|
+
cleanupExpiredAuthVerifications: {};
|
|
12
|
+
createAuthVerification: {};
|
|
11
13
|
userSessionPayload: {};
|
|
14
|
+
validateAuthVerification: {};
|
|
12
15
|
}>>;
|
|
13
16
|
userSessionServiceImports: import("@baseplate-dev/sync").ProviderExport<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
14
17
|
userSessionService: {};
|
|
@@ -72,6 +75,9 @@ export declare const authModuleGenerator: import("@baseplate-dev/sync").Generato
|
|
|
72
75
|
prismaImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
73
76
|
prisma: {};
|
|
74
77
|
}>>;
|
|
78
|
+
queueServiceImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
79
|
+
createQueue: {};
|
|
80
|
+
}>>;
|
|
75
81
|
requestServiceContextImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
76
82
|
createContextFromRequest: {};
|
|
77
83
|
RequestServiceContext: {
|
|
@@ -101,6 +107,10 @@ export declare const authModuleGenerator: import("@baseplate-dev/sync").Generato
|
|
|
101
107
|
prismaOutput: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/fastify-generators").PrismaOutputProvider>;
|
|
102
108
|
renderers: import("@baseplate-dev/sync").ProviderType<import("./generated/template-renderers.js").LocalAuthCoreAuthModuleRenderers>;
|
|
103
109
|
userObjectType: import("@baseplate-dev/sync").ProviderDependency<import("@baseplate-dev/fastify-generators").PothosTypeOutputProvider>;
|
|
110
|
+
queueConfig: import("@baseplate-dev/sync").ProviderDependency<Omit<import("@baseplate-dev/utils").FieldMap<{
|
|
111
|
+
queues: import("@baseplate-dev/utils").MapContainer<string, import("@baseplate-dev/core-generators").TsCodeFragment>;
|
|
112
|
+
}>, "getValues"> | undefined>;
|
|
113
|
+
paths: import("@baseplate-dev/sync").ProviderType<import("./generated/template-paths.js").LocalAuthCoreAuthModulePaths>;
|
|
104
114
|
}, any>;
|
|
105
115
|
}>;
|
|
106
116
|
//# sourceMappingURL=auth-module.generator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-module.generator.d.ts","sourceRoot":"","sources":["../../../../../src/local-auth/core/generators/auth-module/auth-module.generator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"auth-module.generator.d.ts","sourceRoot":"","sources":["../../../../../src/local-auth/core/generators/auth-module/auth-module.generator.ts"],"names":[],"mappings":"AAyBA,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmH9B,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { tsCodeFragment, TsCodeUtils } from '@baseplate-dev/core-generators';
|
|
2
2
|
import { appModuleProvider, configServiceProvider, createPothosPrismaObjectTypeOutputName, pothosTypeOutputProvider, prismaOutputProvider, } from '@baseplate-dev/fastify-generators';
|
|
3
|
+
import { queueConfigProvider } from '@baseplate-dev/plugin-queue';
|
|
3
4
|
import { createGenerator, createGeneratorTask, createProviderTask, } from '@baseplate-dev/sync';
|
|
4
5
|
import { quot } from '@baseplate-dev/utils';
|
|
5
6
|
import { z } from 'zod';
|
|
@@ -44,8 +45,10 @@ export const authModuleGenerator = createGenerator({
|
|
|
44
45
|
userObjectType: pothosTypeOutputProvider
|
|
45
46
|
.dependency()
|
|
46
47
|
.reference(createPothosPrismaObjectTypeOutputName(LOCAL_AUTH_MODELS.user)),
|
|
48
|
+
queueConfig: queueConfigProvider.dependency().optional(),
|
|
49
|
+
paths: GENERATED_TEMPLATES.paths.provider,
|
|
47
50
|
},
|
|
48
|
-
run({ prismaOutput, renderers, userObjectType }) {
|
|
51
|
+
run({ prismaOutput, renderers, userObjectType, queueConfig, paths }) {
|
|
49
52
|
return {
|
|
50
53
|
providers: {
|
|
51
54
|
authModule: {},
|
|
@@ -56,6 +59,7 @@ export const authModuleGenerator = createGenerator({
|
|
|
56
59
|
TPL_PRISMA_USER_SESSION: prismaOutput.getPrismaModelFragment(LOCAL_AUTH_MODELS.userSession),
|
|
57
60
|
},
|
|
58
61
|
}));
|
|
62
|
+
await builder.apply(renderers.servicesAuthVerification.render({}));
|
|
59
63
|
await builder.apply(renderers.constantsGroup.render({}));
|
|
60
64
|
await builder.apply(renderers.utilsGroup.render({}));
|
|
61
65
|
await builder.apply(renderers.moduleGroup.render({
|
|
@@ -73,6 +77,12 @@ export const authModuleGenerator = createGenerator({
|
|
|
73
77
|
},
|
|
74
78
|
},
|
|
75
79
|
}));
|
|
80
|
+
// Render queue only if queue plugin is available
|
|
81
|
+
if (queueConfig) {
|
|
82
|
+
await builder.apply(renderers.queuesCleanupAuthVerification.render({}));
|
|
83
|
+
// Register with` queue system
|
|
84
|
+
queueConfig.queues.set('cleanup-auth-verification', TsCodeUtils.importFragment('cleanupAuthVerificationQueue', paths.queuesCleanupAuthVerification));
|
|
85
|
+
}
|
|
76
86
|
},
|
|
77
87
|
};
|
|
78
88
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-module.generator.js","sourceRoot":"","sources":["../../../../../src/local-auth/core/generators/auth-module/auth-module.generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7E,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,sCAAsC,EACtC,wBAAwB,EACxB,oBAAoB,GACrB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAC;AAE7E,OAAO,EAAE,qCAAqC,IAAI,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAEpG,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChC,cAAc,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;CAChD,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,mBAAmB,GAAG,eAAe,CAAC;IACjD,IAAI,EAAE,6BAA6B;IACnC,gBAAgB,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG;IACjC,gBAAgB;IAChB,UAAU,EAAE,CAAC,EAAE,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CAAC,IAAI,CAAC,CAC/D;
|
|
1
|
+
{"version":3,"file":"auth-module.generator.js","sourceRoot":"","sources":["../../../../../src/local-auth/core/generators/auth-module/auth-module.generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7E,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,sCAAsC,EACtC,wBAAwB,EACxB,oBAAoB,GACrB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAC;AAE7E,OAAO,EAAE,qCAAqC,IAAI,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAEpG,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChC,cAAc,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;CAChD,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,mBAAmB,GAAG,eAAe,CAAC;IACjD,IAAI,EAAE,6BAA6B;IACnC,gBAAgB,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG;IACjC,gBAAgB;IAChB,UAAU,EAAE,CAAC,EAAE,cAAc,EAAE,EAAE,EAAE,CAAC,CAAC;QACnC,KAAK,EAAE,mBAAmB,CAAC,KAAK,CAAC,IAAI;QACrC,OAAO,EAAE,mBAAmB,CAAC,OAAO,CAAC,IAAI;QACzC,SAAS,EAAE,mBAAmB,CAAC,SAAS,CAAC,IAAI;QAC7C,MAAM,EAAE,kBAAkB,CAAC,qBAAqB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AM,OAAO,CAAC,KAAK,CACjB,SAAS,CAAC,6BAA6B,CAAC,MAAM,CAAC,EAAE,CAAC,CACnD,CAAC;4BAEF,8BAA8B;4BAC9B,WAAW,CAAC,MAAM,CAAC,GAAG,CACpB,2BAA2B,EAC3B,WAAW,CAAC,cAAc,CACxB,8BAA8B,EAC9B,KAAK,CAAC,6BAA6B,CACpC,CACF,CAAC;wBACJ,CAAC;oBACH,CAAC;iBACF,CAAC;YACJ,CAAC;SACF,CAAC;KACH,CAAC;CACH,CAAC,CAAC"}
|
|
@@ -2,7 +2,10 @@ export declare const LOCAL_AUTH_CORE_AUTH_MODULE_GENERATED: {
|
|
|
2
2
|
imports: {
|
|
3
3
|
task: import("@baseplate-dev/sync").GeneratorTask<{
|
|
4
4
|
authModuleImports: import("@baseplate-dev/sync").ProviderExport<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
5
|
+
cleanupExpiredAuthVerifications: {};
|
|
6
|
+
createAuthVerification: {};
|
|
5
7
|
userSessionPayload: {};
|
|
8
|
+
validateAuthVerification: {};
|
|
6
9
|
}>>;
|
|
7
10
|
userSessionServiceImports: import("@baseplate-dev/sync").ProviderExport<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
8
11
|
userSessionService: {};
|
|
@@ -77,6 +80,9 @@ export declare const LOCAL_AUTH_CORE_AUTH_MODULE_GENERATED: {
|
|
|
77
80
|
prismaImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
78
81
|
prisma: {};
|
|
79
82
|
}>>;
|
|
83
|
+
queueServiceImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
84
|
+
createQueue: {};
|
|
85
|
+
}>>;
|
|
80
86
|
requestServiceContextImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
81
87
|
createContextFromRequest: {};
|
|
82
88
|
RequestServiceContext: {
|
|
@@ -177,6 +183,24 @@ export declare const LOCAL_AUTH_CORE_AUTH_MODULE_GENERATED: {
|
|
|
177
183
|
}>>;
|
|
178
184
|
}, Record<never, Record<never, never>>>;
|
|
179
185
|
};
|
|
186
|
+
queuesCleanupAuthVerification: import("@baseplate-dev/core-generators").TsTemplateFile<{}, {
|
|
187
|
+
queueServiceImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
188
|
+
createQueue: {};
|
|
189
|
+
}>>;
|
|
190
|
+
}, {
|
|
191
|
+
servicesAuthVerification: {};
|
|
192
|
+
}>;
|
|
193
|
+
servicesAuthVerification: import("@baseplate-dev/core-generators").TsTemplateFile<{}, {
|
|
194
|
+
prismaGeneratedImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
195
|
+
PrismaClient: {};
|
|
196
|
+
Prisma: {};
|
|
197
|
+
'*': {};
|
|
198
|
+
$Enums: {};
|
|
199
|
+
}>>;
|
|
200
|
+
prismaImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
201
|
+
prisma: {};
|
|
202
|
+
}>>;
|
|
203
|
+
}, Record<never, Record<never, never>>>;
|
|
180
204
|
userSessionService: import("@baseplate-dev/core-generators").TsTemplateFile<{
|
|
181
205
|
TPL_PRISMA_USER_SESSION: {};
|
|
182
206
|
}, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/local-auth/core/generators/auth-module/generated/index.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,qCAAqC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/local-auth/core/generators/auth-module/generated/index.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,qCAAqC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKjD,CAAC"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
export interface LocalAuthCoreAuthModulePaths {
|
|
2
2
|
authRoleEnum: string;
|
|
3
3
|
cookieSigner: string;
|
|
4
|
+
queuesCleanupAuthVerification: string;
|
|
4
5
|
schemaUserSessionMutations: string;
|
|
5
6
|
schemaUserSessionPayloadObjectType: string;
|
|
6
7
|
schemaUserSessionQueries: string;
|
|
8
|
+
servicesAuthVerification: string;
|
|
7
9
|
sessionCookie: string;
|
|
8
10
|
userRolesMutations: string;
|
|
9
11
|
userRolesService: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"template-paths.d.ts","sourceRoot":"","sources":["../../../../../../src/local-auth/core/generators/auth-module/generated/template-paths.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,4BAA4B;IAC3C,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,0BAA0B,EAAE,MAAM,CAAC;IACnC,kCAAkC,EAAE,MAAM,CAAC;IAC3C,wBAAwB,EAAE,MAAM,CAAC;IACjC,aAAa,EAAE,MAAM,CAAC;IACtB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,gBAAgB,EAAE,MAAM,CAAC;IACzB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,mBAAmB,EAAE,MAAM,CAAC;CAC7B;
|
|
1
|
+
{"version":3,"file":"template-paths.d.ts","sourceRoot":"","sources":["../../../../../../src/local-auth/core/generators/auth-module/generated/template-paths.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,4BAA4B;IAC3C,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,6BAA6B,EAAE,MAAM,CAAC;IACtC,0BAA0B,EAAE,MAAM,CAAC;IACnC,kCAAkC,EAAE,MAAM,CAAC;IAC3C,wBAAwB,EAAE,MAAM,CAAC;IACjC,wBAAwB,EAAE,MAAM,CAAC;IACjC,aAAa,EAAE,MAAM,CAAC;IACtB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,gBAAgB,EAAE,MAAM,CAAC;IACzB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,mBAAmB,EAAE,MAAM,CAAC;CAC7B;AAqCD,eAAO,MAAM,iCAAiC;;;;;;;CAG7C,CAAC"}
|
|
@@ -13,9 +13,11 @@ const localAuthCoreAuthModulePathsTask = createGeneratorTask({
|
|
|
13
13
|
localAuthCoreAuthModulePaths: {
|
|
14
14
|
authRoleEnum: `${moduleRoot}/schema/auth-role.enum.ts`,
|
|
15
15
|
cookieSigner: `${moduleRoot}/utils/cookie-signer.ts`,
|
|
16
|
+
queuesCleanupAuthVerification: `${moduleRoot}/queues/cleanup-auth-verification.queue.ts`,
|
|
16
17
|
schemaUserSessionMutations: `${moduleRoot}/schema/user-session.mutations.ts`,
|
|
17
18
|
schemaUserSessionPayloadObjectType: `${moduleRoot}/schema/user-session-payload.object-type.ts`,
|
|
18
19
|
schemaUserSessionQueries: `${moduleRoot}/schema/user-session.queries.ts`,
|
|
20
|
+
servicesAuthVerification: `${moduleRoot}/services/auth-verification.service.ts`,
|
|
19
21
|
sessionCookie: `${moduleRoot}/utils/session-cookie.ts`,
|
|
20
22
|
userRolesMutations: `${moduleRoot}/schema/user-roles.mutations.ts`,
|
|
21
23
|
userRolesService: `${moduleRoot}/services/user-roles.service.ts`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"template-paths.js","sourceRoot":"","sources":["../../../../../../src/local-auth/core/generators/auth-module/generated/template-paths.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"template-paths.js","sourceRoot":"","sources":["../../../../../../src/local-auth/core/generators/auth-module/generated/template-paths.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAkB9E,MAAM,4BAA4B,GAChC,kBAAkB,CAChB,mCAAmC,CACpC,CAAC;AAEJ,MAAM,gCAAgC,GAAG,mBAAmB,CAAC;IAC3D,YAAY,EAAE,EAAE,SAAS,EAAE,iBAAiB,EAAE;IAC9C,OAAO,EAAE;QACP,4BAA4B,EAAE,4BAA4B,CAAC,MAAM,EAAE;KACpE;IACD,GAAG,CAAC,EAAE,SAAS,EAAE;QACf,MAAM,UAAU,GAAG,SAAS,CAAC,eAAe,EAAE,CAAC;QAE/C,OAAO;YACL,SAAS,EAAE;gBACT,4BAA4B,EAAE;oBAC5B,YAAY,EAAE,GAAG,UAAU,2BAA2B;oBACtD,YAAY,EAAE,GAAG,UAAU,yBAAyB;oBACpD,6BAA6B,EAAE,GAAG,UAAU,4CAA4C;oBACxF,0BAA0B,EAAE,GAAG,UAAU,mCAAmC;oBAC5E,kCAAkC,EAAE,GAAG,UAAU,6CAA6C;oBAC9F,wBAAwB,EAAE,GAAG,UAAU,iCAAiC;oBACxE,wBAAwB,EAAE,GAAG,UAAU,wCAAwC;oBAC/E,aAAa,EAAE,GAAG,UAAU,0BAA0B;oBACtD,kBAAkB,EAAE,GAAG,UAAU,iCAAiC;oBAClE,gBAAgB,EAAE,GAAG,UAAU,iCAAiC;oBAChE,oBAAoB,EAAE,GAAG,UAAU,sCAAsC;oBACzE,kBAAkB,EAAE,GAAG,UAAU,mCAAmC;oBACpE,mBAAmB,EAAE,GAAG,UAAU,iCAAiC;iBACpE;aACF;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,iCAAiC,GAAG;IAC/C,QAAQ,EAAE,4BAA4B;IACtC,IAAI,EAAE,gCAAgC;CACvC,CAAC"}
|
|
@@ -8,6 +8,12 @@ export interface LocalAuthCoreAuthModuleRenderers {
|
|
|
8
8
|
moduleGroup: {
|
|
9
9
|
render: (options: Omit<RenderTsTemplateGroupActionInput<typeof LOCAL_AUTH_CORE_AUTH_MODULE_TEMPLATES.moduleGroup>, 'importMapProviders' | 'group' | 'paths' | 'generatorPaths'>) => BuilderAction;
|
|
10
10
|
};
|
|
11
|
+
queuesCleanupAuthVerification: {
|
|
12
|
+
render: (options: Omit<RenderTsTemplateFileActionInput<typeof LOCAL_AUTH_CORE_AUTH_MODULE_TEMPLATES.queuesCleanupAuthVerification>, 'destination' | 'importMapProviders' | 'template' | 'generatorPaths'>) => BuilderAction;
|
|
13
|
+
};
|
|
14
|
+
servicesAuthVerification: {
|
|
15
|
+
render: (options: Omit<RenderTsTemplateFileActionInput<typeof LOCAL_AUTH_CORE_AUTH_MODULE_TEMPLATES.servicesAuthVerification>, 'destination' | 'importMapProviders' | 'template' | 'generatorPaths'>) => BuilderAction;
|
|
16
|
+
};
|
|
11
17
|
userSessionService: {
|
|
12
18
|
render: (options: Omit<RenderTsTemplateFileActionInput<typeof LOCAL_AUTH_CORE_AUTH_MODULE_TEMPLATES.userSessionService>, 'destination' | 'importMapProviders' | 'template' | 'generatorPaths'>) => BuilderAction;
|
|
13
19
|
};
|
|
@@ -73,6 +79,9 @@ export declare const LOCAL_AUTH_CORE_AUTH_MODULE_RENDERERS: {
|
|
|
73
79
|
prismaImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
74
80
|
prisma: {};
|
|
75
81
|
}>>;
|
|
82
|
+
queueServiceImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
83
|
+
createQueue: {};
|
|
84
|
+
}>>;
|
|
76
85
|
requestServiceContextImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
77
86
|
createContextFromRequest: {};
|
|
78
87
|
RequestServiceContext: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"template-renderers.d.ts","sourceRoot":"","sources":["../../../../../../src/local-auth/core/generators/auth-module/generated/template-renderers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,+BAA+B,EAC/B,gCAAgC,EACjC,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"template-renderers.d.ts","sourceRoot":"","sources":["../../../../../../src/local-auth/core/generators/auth-module/generated/template-renderers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,+BAA+B,EAC/B,gCAAgC,EACjC,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAkBzD,OAAO,EAAE,qCAAqC,EAAE,MAAM,sBAAsB,CAAC;AAE7E,MAAM,WAAW,gCAAgC;IAC/C,cAAc,EAAE;QACd,MAAM,EAAE,CACN,OAAO,EAAE,IAAI,CACX,gCAAgC,CAC9B,OAAO,qCAAqC,CAAC,cAAc,CAC5D,EACD,oBAAoB,GAAG,OAAO,GAAG,OAAO,GAAG,gBAAgB,CAC5D,KACE,aAAa,CAAC;KACpB,CAAC;IACF,WAAW,EAAE;QACX,MAAM,EAAE,CACN,OAAO,EAAE,IAAI,CACX,gCAAgC,CAC9B,OAAO,qCAAqC,CAAC,WAAW,CACzD,EACD,oBAAoB,GAAG,OAAO,GAAG,OAAO,GAAG,gBAAgB,CAC5D,KACE,aAAa,CAAC;KACpB,CAAC;IACF,6BAA6B,EAAE;QAC7B,MAAM,EAAE,CACN,OAAO,EAAE,IAAI,CACX,+BAA+B,CAC7B,OAAO,qCAAqC,CAAC,6BAA6B,CAC3E,EACD,aAAa,GAAG,oBAAoB,GAAG,UAAU,GAAG,gBAAgB,CACrE,KACE,aAAa,CAAC;KACpB,CAAC;IACF,wBAAwB,EAAE;QACxB,MAAM,EAAE,CACN,OAAO,EAAE,IAAI,CACX,+BAA+B,CAC7B,OAAO,qCAAqC,CAAC,wBAAwB,CACtE,EACD,aAAa,GAAG,oBAAoB,GAAG,UAAU,GAAG,gBAAgB,CACrE,KACE,aAAa,CAAC;KACpB,CAAC;IACF,kBAAkB,EAAE;QAClB,MAAM,EAAE,CACN,OAAO,EAAE,IAAI,CACX,+BAA+B,CAC7B,OAAO,qCAAqC,CAAC,kBAAkB,CAChE,EACD,aAAa,GAAG,oBAAoB,GAAG,UAAU,GAAG,gBAAgB,CACrE,KACE,aAAa,CAAC;KACpB,CAAC;IACF,UAAU,EAAE;QACV,MAAM,EAAE,CACN,OAAO,EAAE,IAAI,CACX,gCAAgC,CAC9B,OAAO,qCAAqC,CAAC,UAAU,CACxD,EACD,oBAAoB,GAAG,OAAO,GAAG,OAAO,GAAG,gBAAgB,CAC5D,KACE,aAAa,CAAC;KACpB,CAAC;CACH;AA+HD,eAAO,MAAM,qCAAqC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGjD,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { typescriptFileProvider } from '@baseplate-dev/core-generators';
|
|
2
2
|
import { authContextImportsProvider, authRolesImportsProvider, configServiceImportsProvider, errorHandlerServiceImportsProvider, pothosImportsProvider, prismaGeneratedImportsProvider, prismaImportsProvider, requestServiceContextImportsProvider, userSessionTypesImportsProvider, } from '@baseplate-dev/fastify-generators';
|
|
3
|
+
import { queueServiceImportsProvider } from '@baseplate-dev/plugin-queue';
|
|
3
4
|
import { createGeneratorTask, createProviderType } from '@baseplate-dev/sync';
|
|
4
5
|
import { LOCAL_AUTH_CORE_AUTH_MODULE_PATHS } from './template-paths.js';
|
|
5
6
|
import { LOCAL_AUTH_CORE_AUTH_MODULE_TEMPLATES } from './typed-templates.js';
|
|
@@ -14,6 +15,7 @@ const localAuthCoreAuthModuleRenderersTask = createGeneratorTask({
|
|
|
14
15
|
pothosImports: pothosImportsProvider,
|
|
15
16
|
prismaGeneratedImports: prismaGeneratedImportsProvider,
|
|
16
17
|
prismaImports: prismaImportsProvider,
|
|
18
|
+
queueServiceImports: queueServiceImportsProvider,
|
|
17
19
|
requestServiceContextImports: requestServiceContextImportsProvider,
|
|
18
20
|
typescriptFile: typescriptFileProvider,
|
|
19
21
|
userSessionTypesImports: userSessionTypesImportsProvider,
|
|
@@ -21,7 +23,7 @@ const localAuthCoreAuthModuleRenderersTask = createGeneratorTask({
|
|
|
21
23
|
exports: {
|
|
22
24
|
localAuthCoreAuthModuleRenderers: localAuthCoreAuthModuleRenderers.export(),
|
|
23
25
|
},
|
|
24
|
-
run({ authContextImports, authRolesImports, configServiceImports, errorHandlerServiceImports, paths, pothosImports, prismaGeneratedImports, prismaImports, requestServiceContextImports, typescriptFile, userSessionTypesImports, }) {
|
|
26
|
+
run({ authContextImports, authRolesImports, configServiceImports, errorHandlerServiceImports, paths, pothosImports, prismaGeneratedImports, prismaImports, queueServiceImports, requestServiceContextImports, typescriptFile, userSessionTypesImports, }) {
|
|
25
27
|
return {
|
|
26
28
|
providers: {
|
|
27
29
|
localAuthCoreAuthModuleRenderers: {
|
|
@@ -46,6 +48,28 @@ const localAuthCoreAuthModuleRenderersTask = createGeneratorTask({
|
|
|
46
48
|
...options,
|
|
47
49
|
}),
|
|
48
50
|
},
|
|
51
|
+
queuesCleanupAuthVerification: {
|
|
52
|
+
render: (options) => typescriptFile.renderTemplateFile({
|
|
53
|
+
template: LOCAL_AUTH_CORE_AUTH_MODULE_TEMPLATES.queuesCleanupAuthVerification,
|
|
54
|
+
destination: paths.queuesCleanupAuthVerification,
|
|
55
|
+
importMapProviders: {
|
|
56
|
+
queueServiceImports,
|
|
57
|
+
},
|
|
58
|
+
generatorPaths: paths,
|
|
59
|
+
...options,
|
|
60
|
+
}),
|
|
61
|
+
},
|
|
62
|
+
servicesAuthVerification: {
|
|
63
|
+
render: (options) => typescriptFile.renderTemplateFile({
|
|
64
|
+
template: LOCAL_AUTH_CORE_AUTH_MODULE_TEMPLATES.servicesAuthVerification,
|
|
65
|
+
destination: paths.servicesAuthVerification,
|
|
66
|
+
importMapProviders: {
|
|
67
|
+
prismaGeneratedImports,
|
|
68
|
+
prismaImports,
|
|
69
|
+
},
|
|
70
|
+
...options,
|
|
71
|
+
}),
|
|
72
|
+
},
|
|
49
73
|
userSessionService: {
|
|
50
74
|
render: (options) => typescriptFile.renderTemplateFile({
|
|
51
75
|
template: LOCAL_AUTH_CORE_AUTH_MODULE_TEMPLATES.userSessionService,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"template-renderers.js","sourceRoot":"","sources":["../../../../../../src/local-auth/core/generators/auth-module/generated/template-renderers.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,EACL,0BAA0B,EAC1B,wBAAwB,EACxB,4BAA4B,EAC5B,kCAAkC,EAClC,qBAAqB,EACrB,8BAA8B,EAC9B,qBAAqB,EACrB,oCAAoC,EACpC,+BAA+B,GAChC,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAE9E,OAAO,EAAE,iCAAiC,EAAE,MAAM,qBAAqB,CAAC;AACxE,OAAO,EAAE,qCAAqC,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"template-renderers.js","sourceRoot":"","sources":["../../../../../../src/local-auth/core/generators/auth-module/generated/template-renderers.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,EACL,0BAA0B,EAC1B,wBAAwB,EACxB,4BAA4B,EAC5B,kCAAkC,EAClC,qBAAqB,EACrB,8BAA8B,EAC9B,qBAAqB,EACrB,oCAAoC,EACpC,+BAA+B,GAChC,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAC1E,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAE9E,OAAO,EAAE,iCAAiC,EAAE,MAAM,qBAAqB,CAAC;AACxE,OAAO,EAAE,qCAAqC,EAAE,MAAM,sBAAsB,CAAC;AAiE7E,MAAM,gCAAgC,GACpC,kBAAkB,CAChB,uCAAuC,CACxC,CAAC;AAEJ,MAAM,oCAAoC,GAAG,mBAAmB,CAAC;IAC/D,YAAY,EAAE;QACZ,kBAAkB,EAAE,0BAA0B;QAC9C,gBAAgB,EAAE,wBAAwB;QAC1C,oBAAoB,EAAE,4BAA4B;QAClD,0BAA0B,EAAE,kCAAkC;QAC9D,KAAK,EAAE,iCAAiC,CAAC,QAAQ;QACjD,aAAa,EAAE,qBAAqB;QACpC,sBAAsB,EAAE,8BAA8B;QACtD,aAAa,EAAE,qBAAqB;QACpC,mBAAmB,EAAE,2BAA2B;QAChD,4BAA4B,EAAE,oCAAoC;QAClE,cAAc,EAAE,sBAAsB;QACtC,uBAAuB,EAAE,+BAA+B;KACzD;IACD,OAAO,EAAE;QACP,gCAAgC,EAAE,gCAAgC,CAAC,MAAM,EAAE;KAC5E;IACD,GAAG,CAAC,EACF,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB,EACpB,0BAA0B,EAC1B,KAAK,EACL,aAAa,EACb,sBAAsB,EACtB,aAAa,EACb,mBAAmB,EACnB,4BAA4B,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qC,CAAC,kBAAkB;4BAC1D,WAAW,EAAE,KAAK,CAAC,kBAAkB;4BACrC,kBAAkB,EAAE;gCAClB,kBAAkB;gCAClB,gBAAgB;gCAChB,oBAAoB;gCACpB,0BAA0B;gCAC1B,aAAa;gCACb,4BAA4B;gCAC5B,uBAAuB;6BACxB;4BACD,cAAc,EAAE,KAAK;4BACrB,GAAG,OAAO;yBACX,CAAC;qBACL;oBACD,UAAU,EAAE;wBACV,MAAM,EAAE,CAAC,OAAO,EAAE,EAAE,CAClB,cAAc,CAAC,mBAAmB,CAAC;4BACjC,KAAK,EAAE,qCAAqC,CAAC,UAAU;4BACvD,KAAK;4BACL,kBAAkB,EAAE;gCAClB,oBAAoB;6BACrB;4BACD,GAAG,OAAO;yBACX,CAAC;qBACL;iBACF;aACF;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,qCAAqC,GAAG;IACnD,QAAQ,EAAE,gCAAgC;IAC1C,IAAI,EAAE,oCAAoC;CAC3C,CAAC"}
|
|
@@ -1,15 +1,24 @@
|
|
|
1
1
|
import type { TsImportMapProviderFromSchema } from '@baseplate-dev/core-generators';
|
|
2
2
|
export declare const authModuleImportsSchema: {
|
|
3
|
+
cleanupExpiredAuthVerifications: {};
|
|
4
|
+
createAuthVerification: {};
|
|
3
5
|
userSessionPayload: {};
|
|
6
|
+
validateAuthVerification: {};
|
|
4
7
|
};
|
|
5
8
|
export type AuthModuleImportsProvider = TsImportMapProviderFromSchema<typeof authModuleImportsSchema>;
|
|
6
9
|
export declare const authModuleImportsProvider: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
10
|
+
cleanupExpiredAuthVerifications: {};
|
|
11
|
+
createAuthVerification: {};
|
|
7
12
|
userSessionPayload: {};
|
|
13
|
+
validateAuthVerification: {};
|
|
8
14
|
}>>;
|
|
9
15
|
export declare const LOCAL_AUTH_CORE_AUTH_MODULE_IMPORTS: {
|
|
10
16
|
task: import("@baseplate-dev/sync").GeneratorTask<{
|
|
11
17
|
authModuleImports: import("@baseplate-dev/sync").ProviderExport<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
18
|
+
cleanupExpiredAuthVerifications: {};
|
|
19
|
+
createAuthVerification: {};
|
|
12
20
|
userSessionPayload: {};
|
|
21
|
+
validateAuthVerification: {};
|
|
13
22
|
}>>;
|
|
14
23
|
userSessionServiceImports: import("@baseplate-dev/sync").ProviderExport<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
15
24
|
userSessionService: {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ts-import-providers.d.ts","sourceRoot":"","sources":["../../../../../../src/local-auth/core/generators/auth-module/generated/ts-import-providers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,gCAAgC,CAAC;AAkBpF,eAAO,MAAM,uBAAuB
|
|
1
|
+
{"version":3,"file":"ts-import-providers.d.ts","sourceRoot":"","sources":["../../../../../../src/local-auth/core/generators/auth-module/generated/ts-import-providers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,gCAAgC,CAAC;AAkBpF,eAAO,MAAM,uBAAuB;;;;;CAKlC,CAAC;AAEH,MAAM,MAAM,yBAAyB,GAAG,6BAA6B,CACnE,OAAO,uBAAuB,CAC/B,CAAC;AAEF,eAAO,MAAM,yBAAyB;;;;;GACwC,CAAC;AA6B/E,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;CAE/C,CAAC"}
|
|
@@ -3,7 +3,10 @@ import { userSessionServiceImportsProvider, userSessionServiceImportsSchema, } f
|
|
|
3
3
|
import { createGeneratorTask, createReadOnlyProviderType, } from '@baseplate-dev/sync';
|
|
4
4
|
import { LOCAL_AUTH_CORE_AUTH_MODULE_PATHS } from './template-paths.js';
|
|
5
5
|
export const authModuleImportsSchema = createTsImportMapSchema({
|
|
6
|
+
cleanupExpiredAuthVerifications: {},
|
|
7
|
+
createAuthVerification: {},
|
|
6
8
|
userSessionPayload: {},
|
|
9
|
+
validateAuthVerification: {},
|
|
7
10
|
});
|
|
8
11
|
export const authModuleImportsProvider = createReadOnlyProviderType('auth-module-imports');
|
|
9
12
|
const localAuthCoreAuthModuleImportsTask = createGeneratorTask({
|
|
@@ -18,7 +21,10 @@ const localAuthCoreAuthModuleImportsTask = createGeneratorTask({
|
|
|
18
21
|
return {
|
|
19
22
|
providers: {
|
|
20
23
|
authModuleImports: createTsImportMap(authModuleImportsSchema, {
|
|
24
|
+
cleanupExpiredAuthVerifications: paths.servicesAuthVerification,
|
|
25
|
+
createAuthVerification: paths.servicesAuthVerification,
|
|
21
26
|
userSessionPayload: paths.schemaUserSessionPayloadObjectType,
|
|
27
|
+
validateAuthVerification: paths.servicesAuthVerification,
|
|
22
28
|
}),
|
|
23
29
|
userSessionServiceImports: createTsImportMap(userSessionServiceImportsSchema, { userSessionService: paths.userSessionService }),
|
|
24
30
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ts-import-providers.js","sourceRoot":"","sources":["../../../../../../src/local-auth/core/generators/auth-module/generated/ts-import-providers.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,iBAAiB,EACjB,uBAAuB,EACvB,YAAY,GACb,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,iCAAiC,EACjC,+BAA+B,GAChC,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,mBAAmB,EACnB,0BAA0B,GAC3B,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,iCAAiC,EAAE,MAAM,qBAAqB,CAAC;AAExE,MAAM,CAAC,MAAM,uBAAuB,GAAG,uBAAuB,CAAC;IAC7D,kBAAkB,EAAE,EAAE;
|
|
1
|
+
{"version":3,"file":"ts-import-providers.js","sourceRoot":"","sources":["../../../../../../src/local-auth/core/generators/auth-module/generated/ts-import-providers.ts"],"names":[],"mappings":"AAEA,OAAO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mC,GAAG;IACjD,IAAI,EAAE,kCAAkC;CACzC,CAAC"}
|
|
@@ -172,6 +172,24 @@ export declare const LOCAL_AUTH_CORE_AUTH_MODULE_TEMPLATES: {
|
|
|
172
172
|
}>>;
|
|
173
173
|
}, Record<never, Record<never, never>>>;
|
|
174
174
|
};
|
|
175
|
+
queuesCleanupAuthVerification: import("@baseplate-dev/core-generators").TsTemplateFile<{}, {
|
|
176
|
+
queueServiceImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
177
|
+
createQueue: {};
|
|
178
|
+
}>>;
|
|
179
|
+
}, {
|
|
180
|
+
servicesAuthVerification: {};
|
|
181
|
+
}>;
|
|
182
|
+
servicesAuthVerification: import("@baseplate-dev/core-generators").TsTemplateFile<{}, {
|
|
183
|
+
prismaGeneratedImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
184
|
+
PrismaClient: {};
|
|
185
|
+
Prisma: {};
|
|
186
|
+
'*': {};
|
|
187
|
+
$Enums: {};
|
|
188
|
+
}>>;
|
|
189
|
+
prismaImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
190
|
+
prisma: {};
|
|
191
|
+
}>>;
|
|
192
|
+
}, Record<never, Record<never, never>>>;
|
|
175
193
|
userSessionService: import("@baseplate-dev/core-generators").TsTemplateFile<{
|
|
176
194
|
TPL_PRISMA_USER_SESSION: {};
|
|
177
195
|
}, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typed-templates.d.ts","sourceRoot":"","sources":["../../../../../../src/local-auth/core/generators/auth-module/generated/typed-templates.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"typed-templates.d.ts","sourceRoot":"","sources":["../../../../../../src/local-auth/core/generators/auth-module/generated/typed-templates.ts"],"names":[],"mappings":"AA6BA,eAAO,MAAM,cAAc;;CAA2B,CAAC;AAwGvD,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOvB,CAAC;AA2GF,eAAO,MAAM,UAAU;;;;;;;;CAAuD,CAAC;AAE/E,eAAO,MAAM,qCAAqC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOjD,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { createTsTemplateFile } from '@baseplate-dev/core-generators';
|
|
2
2
|
import { authContextImportsProvider, authRolesImportsProvider, configServiceImportsProvider, errorHandlerServiceImportsProvider, pothosImportsProvider, prismaGeneratedImportsProvider, prismaImportsProvider, requestServiceContextImportsProvider, userSessionTypesImportsProvider, } from '@baseplate-dev/fastify-generators';
|
|
3
|
+
import { queueServiceImportsProvider } from '@baseplate-dev/plugin-queue';
|
|
3
4
|
import path from 'node:path';
|
|
4
5
|
const userSessionConstants = createTsTemplateFile({
|
|
5
6
|
fileOptions: { kind: 'singleton' },
|
|
@@ -98,6 +99,33 @@ export const moduleGroup = {
|
|
|
98
99
|
userRolesMutations,
|
|
99
100
|
userRolesService,
|
|
100
101
|
};
|
|
102
|
+
const queuesCleanupAuthVerification = createTsTemplateFile({
|
|
103
|
+
fileOptions: { kind: 'singleton' },
|
|
104
|
+
importMapProviders: { queueServiceImports: queueServiceImportsProvider },
|
|
105
|
+
name: 'queues-cleanup-auth-verification',
|
|
106
|
+
referencedGeneratorTemplates: { servicesAuthVerification: {} },
|
|
107
|
+
source: {
|
|
108
|
+
path: path.join(import.meta.dirname, '../templates/module/queues/cleanup-auth-verification.queue.ts'),
|
|
109
|
+
},
|
|
110
|
+
variables: {},
|
|
111
|
+
});
|
|
112
|
+
const servicesAuthVerification = createTsTemplateFile({
|
|
113
|
+
fileOptions: { kind: 'singleton' },
|
|
114
|
+
importMapProviders: {
|
|
115
|
+
prismaGeneratedImports: prismaGeneratedImportsProvider,
|
|
116
|
+
prismaImports: prismaImportsProvider,
|
|
117
|
+
},
|
|
118
|
+
name: 'services-auth-verification',
|
|
119
|
+
projectExports: {
|
|
120
|
+
cleanupExpiredAuthVerifications: { isTypeOnly: false },
|
|
121
|
+
createAuthVerification: { isTypeOnly: false },
|
|
122
|
+
validateAuthVerification: { isTypeOnly: false },
|
|
123
|
+
},
|
|
124
|
+
source: {
|
|
125
|
+
path: path.join(import.meta.dirname, '../templates/module/services/auth-verification.service.ts'),
|
|
126
|
+
},
|
|
127
|
+
variables: {},
|
|
128
|
+
});
|
|
101
129
|
const userSessionService = createTsTemplateFile({
|
|
102
130
|
fileOptions: { kind: 'singleton' },
|
|
103
131
|
importMapProviders: {
|
|
@@ -156,6 +184,8 @@ export const utilsGroup = { cookieSigner, sessionCookie, verifyRequestOrigin };
|
|
|
156
184
|
export const LOCAL_AUTH_CORE_AUTH_MODULE_TEMPLATES = {
|
|
157
185
|
constantsGroup,
|
|
158
186
|
moduleGroup,
|
|
187
|
+
queuesCleanupAuthVerification,
|
|
188
|
+
servicesAuthVerification,
|
|
159
189
|
userSessionService,
|
|
160
190
|
utilsGroup,
|
|
161
191
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typed-templates.js","sourceRoot":"","sources":["../../../../../../src/local-auth/core/generators/auth-module/generated/typed-templates.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EACL,0BAA0B,EAC1B,wBAAwB,EACxB,4BAA4B,EAC5B,kCAAkC,EAClC,qBAAqB,EACrB,8BAA8B,EAC9B,qBAAqB,EACrB,oCAAoC,EACpC,+BAA+B,GAChC,MAAM,mCAAmC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C,MAAM,UAAU,GAAG,EAAE,YAAY,EAAE,aAAa,EAAE,mBAAmB,EAAE,CAAC;AAE/E,MAAM,CAAC,MAAM,qCAAqC,GAAG;IACnD,cAAc;IACd,WAAW;IACX,kBAAkB;IAClB,UAAU;CACX,CAAC"}
|
|
1
|
+
{"version":3,"file":"typed-templates.js","sourceRoot":"","sources":["../../../../../../src/local-auth/core/generators/auth-module/generated/typed-templates.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EACL,0BAA0B,EAC1B,wBAAwB,EACxB,4BAA4B,EAC5B,kCAAkC,EAClC,qBAAqB,EACrB,8BAA8B,EAC9B,qBAAqB,EACrB,oCAAoC,EACpC,+BAA+B,GAChC,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAC1E,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,MAAM,oBAAoB,GAAG,oBAAoB,CAAC;IAChD,WAAW,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE;IAClC,KAAK,EAAE,WAAW;IAClB,kBAAkB,EAAE,EAAE;IACtB,IAAI,EAAE,wBAAwB;IAC9B,MAAM,EAAE;QACN,IAAI,EAAE,IAAI,CAAC,IAAI,CACb,MAAM,CAAC,IAAI,CAAC,OAAO,EACnB,yDAAyD,CAC1D;KACF;IACD,SAAS,EAAE,EAAE;CACd,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,cAAc,GAAG,EAAE,oBAAoB,EAAE,CAAC;AAEvD,MAAM,YAAY,GAAG,oBAAoB,CAAC;IACxC,WAAW,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE;IAClC,KAAK,EAAE,QAAQ;IACf,kBAAkB,EAAE;QAClB,gBAAgB,EAAE,wBAAwB;QAC1C,aAAa,EAAE,qBAAqB;KACrC;IACD,IAAI,EAAE,gBAAgB;IACtB,cAAc,EAAE,EAAE;IAClB,MAA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d,kBAAkB,EAAE,EAAE;IACtB,IAAI,EAAE,uBAAuB;IAC7B,MAAM,EAAE;QACN,IAAI,EAAE,IAAI,CAAC,IAAI,CACb,MAAM,CAAC,IAAI,CAAC,OAAO,EACnB,oDAAoD,CACrD;KACF;IACD,SAAS,EAAE,EAAE;CACd,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,UAAU,GAAG,EAAE,YAAY,EAAE,aAAa,EAAE,mBAAmB,EAAE,CAAC;AAE/E,MAAM,CAAC,MAAM,qCAAqC,GAAG;IACnD,cAAc;IACd,WAAW;IACX,6BAA6B;IAC7B,wBAAwB;IACxB,kBAAkB;IAClB,UAAU;CACX,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cleanup-auth-verification.queue.d.ts","sourceRoot":"","sources":["../../../../../../../../src/local-auth/core/generators/auth-module/templates/module/queues/cleanup-auth-verification.queue.ts"],"names":[],"mappings":"AAKA;;;GAGG;AACH,eAAO,MAAM,4BAA4B,KAWxC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import { cleanupExpiredAuthVerifications } from '$servicesAuthVerification';
|
|
3
|
+
import { createQueue } from '%queueServiceImports';
|
|
4
|
+
/**
|
|
5
|
+
* Periodic queue to clean up expired auth verification tokens.
|
|
6
|
+
* Runs hourly to maintain database hygiene.
|
|
7
|
+
*/
|
|
8
|
+
export const cleanupAuthVerificationQueue = createQueue('cleanup-auth-verification', {
|
|
9
|
+
handler: async () => {
|
|
10
|
+
const result = await cleanupExpiredAuthVerifications();
|
|
11
|
+
return { deletedCount: result.deletedCount };
|
|
12
|
+
},
|
|
13
|
+
repeatable: {
|
|
14
|
+
pattern: '15 * * * *', // Every hour at minute 15
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
//# sourceMappingURL=cleanup-auth-verification.queue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cleanup-auth-verification.queue.js","sourceRoot":"","sources":["../../../../../../../../src/local-auth/core/generators/auth-module/templates/module/queues/cleanup-auth-verification.queue.ts"],"names":[],"mappings":"AAAA,cAAc;AAEd,OAAO,EAAE,+BAA+B,EAAE,MAAM,2BAA2B,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD;;;GAGG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,WAAW,CACrD,2BAA2B,EAC3B;IACE,OAAO,EAAE,KAAK,IAAI,EAAE;QAClB,MAAM,MAAM,GAAG,MAAM,+BAA+B,EAAE,CAAC;QACvD,OAAO,EAAE,YAAY,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC;IAC/C,CAAC;IACD,UAAU,EAAE;QACV,OAAO,EAAE,YAAY,EAAE,0BAA0B;KAClD;CACF,CACF,CAAC"}
|