@baseplate-dev/plugin-auth 0.1.3 → 1.0.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/core/node.d.ts.map +1 -1
- package/dist/auth/core/node.js +6 -3
- package/dist/auth/core/node.js.map +1 -1
- package/dist/auth/generators/fastify/auth-module/auth-module.generator.d.ts +13 -1
- package/dist/auth/generators/fastify/auth-module/auth-module.generator.d.ts.map +1 -1
- package/dist/auth/generators/fastify/auth-module/auth-module.generator.js +20 -8
- package/dist/auth/generators/fastify/auth-module/auth-module.generator.js.map +1 -1
- package/dist/auth/generators/fastify/auth-module/generated/index.d.ts +88 -0
- package/dist/auth/generators/fastify/auth-module/generated/index.d.ts.map +1 -0
- package/dist/auth/generators/fastify/auth-module/generated/index.js +9 -0
- package/dist/auth/generators/fastify/auth-module/generated/index.js.map +1 -0
- package/dist/auth/generators/fastify/auth-module/generated/template-paths.d.ts +16 -0
- package/dist/auth/generators/fastify/auth-module/generated/template-paths.d.ts.map +1 -0
- package/dist/auth/generators/fastify/auth-module/generated/template-paths.js +26 -0
- package/dist/auth/generators/fastify/auth-module/generated/template-paths.js.map +1 -0
- package/dist/auth/generators/fastify/auth-module/generated/ts-import-providers.d.ts +10 -0
- package/dist/auth/generators/fastify/auth-module/generated/ts-import-providers.d.ts.map +1 -0
- package/dist/auth/generators/fastify/auth-module/generated/ts-import-providers.js +23 -0
- package/dist/auth/generators/fastify/auth-module/generated/ts-import-providers.js.map +1 -0
- package/dist/auth/generators/fastify/auth-module/generated/{ts-templates.d.ts → typed-templates.d.ts} +26 -41
- package/dist/auth/generators/fastify/auth-module/generated/typed-templates.d.ts.map +1 -0
- package/dist/auth/generators/fastify/auth-module/generated/typed-templates.js +68 -0
- package/dist/auth/generators/fastify/auth-module/generated/typed-templates.js.map +1 -0
- package/dist/auth/generators/fastify/auth-module/index.d.ts +2 -0
- package/dist/auth/generators/fastify/auth-module/index.d.ts.map +1 -0
- package/dist/auth/generators/fastify/auth-module/index.js +2 -0
- package/dist/auth/generators/fastify/auth-module/index.js.map +1 -0
- package/dist/auth/generators/fastify/auth-module/templates/{utils → module/utils}/cookie-signer.ts +6 -0
- package/dist/auth/generators/fastify/index.d.ts +1 -1
- package/dist/auth/generators/fastify/index.d.ts.map +1 -1
- package/dist/auth/generators/fastify/index.js +1 -1
- package/dist/auth/generators/fastify/index.js.map +1 -1
- package/dist/auth0/generators/fastify/auth0-module/auth0-module.generator.d.ts +14 -6
- package/dist/auth0/generators/fastify/auth0-module/auth0-module.generator.d.ts.map +1 -1
- package/dist/auth0/generators/fastify/auth0-module/auth0-module.generator.js +11 -16
- package/dist/auth0/generators/fastify/auth0-module/auth0-module.generator.js.map +1 -1
- package/dist/auth0/generators/fastify/auth0-module/generated/index.d.ts +62 -0
- package/dist/auth0/generators/fastify/auth0-module/generated/index.d.ts.map +1 -0
- package/dist/auth0/generators/fastify/auth0-module/generated/index.js +9 -0
- package/dist/auth0/generators/fastify/auth0-module/generated/index.js.map +1 -0
- package/dist/auth0/generators/fastify/auth0-module/generated/template-paths.d.ts +13 -0
- package/dist/auth0/generators/fastify/auth0-module/generated/template-paths.d.ts.map +1 -0
- package/dist/auth0/generators/fastify/auth0-module/generated/template-paths.js +23 -0
- package/dist/auth0/generators/fastify/auth0-module/generated/template-paths.js.map +1 -0
- package/dist/auth0/generators/fastify/auth0-module/generated/ts-import-providers.d.ts +10 -0
- package/dist/auth0/generators/fastify/auth0-module/generated/ts-import-providers.d.ts.map +1 -0
- package/dist/auth0/generators/fastify/auth0-module/generated/ts-import-providers.js +23 -0
- package/dist/auth0/generators/fastify/auth0-module/generated/ts-import-providers.js.map +1 -0
- package/dist/auth0/generators/fastify/auth0-module/generated/{ts-templates.d.ts → typed-templates.d.ts} +2 -2
- package/dist/auth0/generators/fastify/auth0-module/generated/typed-templates.d.ts.map +1 -0
- package/dist/auth0/generators/fastify/auth0-module/generated/{ts-templates.js → typed-templates.js} +11 -8
- package/dist/auth0/generators/fastify/auth0-module/generated/typed-templates.js.map +1 -0
- package/dist/auth0/generators/fastify/auth0-module/index.d.ts +2 -0
- package/dist/auth0/generators/fastify/auth0-module/index.d.ts.map +1 -0
- package/dist/auth0/generators/fastify/auth0-module/index.js +2 -0
- package/dist/auth0/generators/fastify/auth0-module/index.js.map +1 -0
- package/dist/auth0/generators/fastify/index.d.ts +1 -1
- package/dist/auth0/generators/fastify/index.d.ts.map +1 -1
- package/dist/auth0/generators/fastify/index.js +1 -1
- package/dist/auth0/generators/fastify/index.js.map +1 -1
- package/dist/auth0/generators/react/auth0-apollo/index.d.ts +2 -0
- package/dist/auth0/generators/react/auth0-apollo/index.d.ts.map +1 -0
- package/dist/auth0/generators/react/auth0-apollo/index.js +2 -0
- package/dist/auth0/generators/react/auth0-apollo/index.js.map +1 -0
- package/dist/auth0/generators/react/auth0-callback/auth0-callback.generator.d.ts +101 -8
- package/dist/auth0/generators/react/auth0-callback/auth0-callback.generator.d.ts.map +1 -1
- package/dist/auth0/generators/react/auth0-callback/auth0-callback.generator.js +10 -11
- package/dist/auth0/generators/react/auth0-callback/auth0-callback.generator.js.map +1 -1
- package/dist/auth0/generators/react/auth0-callback/generated/index.d.ts +290 -0
- package/dist/auth0/generators/react/auth0-callback/generated/index.d.ts.map +1 -0
- package/dist/auth0/generators/react/auth0-callback/generated/index.js +7 -0
- package/dist/auth0/generators/react/auth0-callback/generated/index.js.map +1 -0
- package/dist/auth0/generators/react/auth0-callback/generated/template-paths.d.ts +13 -0
- package/dist/auth0/generators/react/auth0-callback/generated/template-paths.d.ts.map +1 -0
- package/dist/auth0/generators/react/auth0-callback/generated/template-paths.js +23 -0
- package/dist/auth0/generators/react/auth0-callback/generated/template-paths.js.map +1 -0
- package/dist/auth0/generators/react/auth0-callback/generated/typed-templates.d.ts +280 -0
- package/dist/auth0/generators/react/auth0-callback/generated/typed-templates.d.ts.map +1 -0
- package/dist/auth0/generators/react/auth0-callback/generated/{ts-templates.js → typed-templates.js} +11 -9
- package/dist/auth0/generators/react/auth0-callback/generated/typed-templates.js.map +1 -0
- package/dist/auth0/generators/react/auth0-callback/index.d.ts +2 -0
- package/dist/auth0/generators/react/auth0-callback/index.d.ts.map +1 -0
- package/dist/auth0/generators/react/auth0-callback/index.js +2 -0
- package/dist/auth0/generators/react/auth0-callback/index.js.map +1 -0
- package/dist/auth0/generators/react/auth0-callback/templates/{auth0-callback.page.tsx → routes/auth0-callback.page.tsx} +3 -3
- package/dist/auth0/generators/react/auth0-callback/templates/{signup.page.tsx → routes/signup.page.tsx} +3 -3
- package/dist/auth0/generators/react/auth0-components/auth0-components.generator.d.ts +106 -12
- package/dist/auth0/generators/react/auth0-components/auth0-components.generator.d.ts.map +1 -1
- package/dist/auth0/generators/react/auth0-components/auth0-components.generator.js +12 -16
- package/dist/auth0/generators/react/auth0-components/auth0-components.generator.js.map +1 -1
- package/dist/auth0/generators/react/auth0-components/generated/index.d.ts +151 -0
- package/dist/auth0/generators/react/auth0-components/generated/index.d.ts.map +1 -0
- package/dist/auth0/generators/react/auth0-components/generated/index.js +9 -0
- package/dist/auth0/generators/react/auth0-components/generated/index.js.map +1 -0
- package/dist/auth0/generators/react/auth0-components/generated/template-paths.d.ts +12 -0
- package/dist/auth0/generators/react/auth0-components/generated/template-paths.d.ts.map +1 -0
- package/dist/auth0/generators/react/auth0-components/generated/template-paths.js +22 -0
- package/dist/auth0/generators/react/auth0-components/generated/template-paths.js.map +1 -0
- package/dist/auth0/generators/react/auth0-components/generated/ts-import-providers.d.ts +10 -0
- package/dist/auth0/generators/react/auth0-components/generated/ts-import-providers.d.ts.map +1 -0
- package/dist/auth0/generators/react/auth0-components/generated/ts-import-providers.js +25 -0
- package/dist/auth0/generators/react/auth0-components/generated/ts-import-providers.js.map +1 -0
- package/dist/auth0/generators/react/auth0-components/generated/typed-templates.d.ts +132 -0
- package/dist/auth0/generators/react/auth0-components/generated/typed-templates.d.ts.map +1 -0
- package/dist/auth0/generators/react/auth0-components/generated/typed-templates.js +17 -0
- package/dist/auth0/generators/react/auth0-components/generated/typed-templates.js.map +1 -0
- package/dist/auth0/generators/react/auth0-components/index.d.ts +2 -0
- package/dist/auth0/generators/react/auth0-components/index.d.ts.map +1 -0
- package/dist/auth0/generators/react/auth0-components/index.js +2 -0
- package/dist/auth0/generators/react/auth0-components/index.js.map +1 -0
- package/dist/auth0/generators/react/auth0-components/templates/{RequireAuth.tsx → src/components/require-auth/require-auth.tsx} +4 -4
- package/dist/auth0/generators/react/auth0-hooks/auth0-hooks.generator.d.ts +10 -2
- package/dist/auth0/generators/react/auth0-hooks/auth0-hooks.generator.d.ts.map +1 -1
- package/dist/auth0/generators/react/auth0-hooks/auth0-hooks.generator.js +13 -24
- package/dist/auth0/generators/react/auth0-hooks/auth0-hooks.generator.js.map +1 -1
- package/dist/auth0/generators/react/auth0-hooks/generated/index.d.ts +51 -0
- package/dist/auth0/generators/react/auth0-hooks/generated/index.d.ts.map +1 -0
- package/dist/auth0/generators/react/auth0-hooks/generated/index.js +9 -0
- package/dist/auth0/generators/react/auth0-hooks/generated/index.js.map +1 -0
- package/dist/auth0/generators/react/auth0-hooks/generated/template-paths.d.ts +16 -0
- package/dist/auth0/generators/react/auth0-hooks/generated/template-paths.d.ts.map +1 -0
- package/dist/auth0/generators/react/auth0-hooks/generated/template-paths.js +26 -0
- package/dist/auth0/generators/react/auth0-hooks/generated/template-paths.js.map +1 -0
- package/dist/auth0/generators/react/auth0-hooks/generated/ts-import-providers.d.ts +16 -0
- package/dist/auth0/generators/react/auth0-hooks/generated/ts-import-providers.d.ts.map +1 -0
- package/dist/auth0/generators/react/auth0-hooks/generated/ts-import-providers.js +27 -0
- package/dist/auth0/generators/react/auth0-hooks/generated/ts-import-providers.js.map +1 -0
- package/dist/auth0/generators/react/auth0-hooks/generated/typed-templates.d.ts +44 -0
- package/dist/auth0/generators/react/auth0-hooks/generated/typed-templates.d.ts.map +1 -0
- package/dist/auth0/generators/react/auth0-hooks/generated/typed-templates.js +67 -0
- package/dist/auth0/generators/react/auth0-hooks/generated/typed-templates.js.map +1 -0
- package/dist/auth0/generators/react/auth0-hooks/index.d.ts +2 -0
- package/dist/auth0/generators/react/auth0-hooks/index.d.ts.map +1 -0
- package/dist/auth0/generators/react/auth0-hooks/index.js +2 -0
- package/dist/auth0/generators/react/auth0-hooks/index.js.map +1 -0
- package/dist/auth0/generators/react/index.d.ts +5 -5
- package/dist/auth0/generators/react/index.d.ts.map +1 -1
- package/dist/auth0/generators/react/index.js +5 -5
- package/dist/auth0/generators/react/index.js.map +1 -1
- package/dist/auth0/generators/react/react-auth0/index.d.ts +2 -0
- package/dist/auth0/generators/react/react-auth0/index.d.ts.map +1 -0
- package/dist/auth0/generators/react/react-auth0/index.js +2 -0
- package/dist/auth0/generators/react/react-auth0/index.js.map +1 -0
- package/dist/web/assets/{__federation_expose_auth0CoreCommon-DCwCR5dZ.js → __federation_expose_auth0CoreCommon-hOTVdirQ.js} +3 -3
- package/dist/web/assets/{__federation_expose_auth0CoreCommon-DCwCR5dZ.js.map → __federation_expose_auth0CoreCommon-hOTVdirQ.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_auth0CoreWeb-BlCwYpTq.js → __federation_expose_auth0CoreWeb-xV61eveJ.js} +7 -9
- package/dist/web/assets/__federation_expose_auth0CoreWeb-xV61eveJ.js.map +1 -0
- package/dist/web/assets/__federation_expose_authCoreCommon-CndjGc3R.js +36 -0
- package/dist/web/assets/__federation_expose_authCoreCommon-CndjGc3R.js.map +1 -0
- package/dist/web/assets/__federation_expose_authCoreWeb-CJ4-gYAU.js +442 -0
- package/dist/web/assets/__federation_expose_authCoreWeb-CJ4-gYAU.js.map +1 -0
- package/dist/web/assets/{__federation_fn_import-dzKjrTzS.js → __federation_fn_import-Drn1CtCD.js} +2 -2
- package/dist/web/assets/{__federation_fn_import-dzKjrTzS.js.map → __federation_fn_import-Drn1CtCD.js.map} +1 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/{web-BXHJHUXP.js → web-CcNXBRTZ.js} +5 -5
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/web-CcNXBRTZ.js.map +1 -0
- package/dist/web/assets/__federation_shared_@baseplate-dev/{project-builder-lib-GtzVuDsM.js → project-builder-lib-Tb9xtEo4.js} +150 -159
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib-Tb9xtEo4.js.map +1 -0
- package/dist/web/assets/__federation_shared_@baseplate-dev/{ui-components-ChoqtPkg.js → ui-components-0t9VhwId.js} +18156 -10210
- package/dist/web/assets/__federation_shared_@baseplate-dev/ui-components-0t9VhwId.js.map +1 -0
- package/dist/web/assets/{index-BxDOOHD-.js → index-CZqpaSlN.js} +10 -4
- package/dist/web/assets/{index-BxDOOHD-.js.map → index-CZqpaSlN.js.map} +1 -1
- package/dist/web/assets/{index.esm-BZEyAv4m.js → index.esm-SbEmZvZj.js} +3 -3
- package/dist/web/assets/{index.esm-BZEyAv4m.js.map → index.esm-SbEmZvZj.js.map} +1 -1
- package/dist/web/assets/{model-merger-CdV-7CWE.js → model-merger-BLh0ERqk.js} +30 -18
- package/dist/web/assets/model-merger-BLh0ERqk.js.map +1 -0
- package/dist/web/assets/plugin-definition-CNgM5Juv.js +34 -0
- package/dist/web/assets/plugin-definition-CNgM5Juv.js.map +1 -0
- package/dist/web/assets/plugin-definition-CQ2no5O3.js +22 -0
- package/dist/web/assets/plugin-definition-CQ2no5O3.js.map +1 -0
- package/dist/web/assets/{react-BfiX28GO.js → react-BiQIVSjI.js} +2 -2
- package/dist/web/assets/{react-BfiX28GO.js.map → react-BiQIVSjI.js.map} +1 -1
- package/dist/web/assets/remoteEntry.js +8 -2
- package/dist/web/assets/remoteEntry.js.map +1 -1
- package/dist/web/assets/{plugin-definition-C9Q-BrBQ.js → schema-CaLuKwEg.js} +16 -27
- package/dist/web/assets/schema-CaLuKwEg.js.map +1 -0
- package/dist/web/assets/styles-BPCQNyj6.js +8 -0
- package/dist/web/assets/styles-BPCQNyj6.js.map +1 -0
- package/manifest.json +1 -1
- package/package.json +18 -10
- package/dist/auth/generators/fastify/auth-module/generated/ts-templates.d.ts.map +0 -1
- package/dist/auth/generators/fastify/auth-module/generated/ts-templates.js +0 -94
- package/dist/auth/generators/fastify/auth-module/generated/ts-templates.js.map +0 -1
- package/dist/auth/generators/fastify/auth-module/templates/management.ts +0 -22
- package/dist/auth/generators/fastify/auth-module/templates/schema/user-session-payload.object-type.ts +0 -23
- package/dist/auth/generators/fastify/auth-module/templates/schema/user-session.mutations.ts +0 -22
- package/dist/auth/generators/fastify/auth-module/templates/schema/user-session.queries.ts +0 -20
- package/dist/auth/generators/fastify/auth-module/templates/user-session.service.ts +0 -101
- package/dist/auth0/generators/fastify/auth0-module/generated/ts-import-maps.d.ts +0 -3
- package/dist/auth0/generators/fastify/auth0-module/generated/ts-import-maps.d.ts.map +0 -1
- package/dist/auth0/generators/fastify/auth0-module/generated/ts-import-maps.js +0 -12
- package/dist/auth0/generators/fastify/auth0-module/generated/ts-import-maps.js.map +0 -1
- package/dist/auth0/generators/fastify/auth0-module/generated/ts-templates.d.ts.map +0 -1
- package/dist/auth0/generators/fastify/auth0-module/generated/ts-templates.js.map +0 -1
- package/dist/auth0/generators/react/auth0-callback/generated/ts-templates.d.ts +0 -106
- package/dist/auth0/generators/react/auth0-callback/generated/ts-templates.d.ts.map +0 -1
- package/dist/auth0/generators/react/auth0-callback/generated/ts-templates.js.map +0 -1
- package/dist/auth0/generators/react/auth0-components/generated/ts-import-maps.d.ts +0 -3
- package/dist/auth0/generators/react/auth0-components/generated/ts-import-maps.d.ts.map +0 -1
- package/dist/auth0/generators/react/auth0-components/generated/ts-import-maps.js +0 -12
- package/dist/auth0/generators/react/auth0-components/generated/ts-import-maps.js.map +0 -1
- package/dist/auth0/generators/react/auth0-components/generated/ts-templates.d.ts +0 -45
- package/dist/auth0/generators/react/auth0-components/generated/ts-templates.d.ts.map +0 -1
- package/dist/auth0/generators/react/auth0-components/generated/ts-templates.js +0 -13
- package/dist/auth0/generators/react/auth0-components/generated/ts-templates.js.map +0 -1
- package/dist/auth0/generators/react/auth0-hooks/generated/text-templates.d.ts +0 -8
- package/dist/auth0/generators/react/auth0-hooks/generated/text-templates.d.ts.map +0 -1
- package/dist/auth0/generators/react/auth0-hooks/generated/text-templates.js +0 -12
- package/dist/auth0/generators/react/auth0-hooks/generated/text-templates.js.map +0 -1
- package/dist/auth0/generators/react/auth0-hooks/generated/ts-import-maps.d.ts +0 -3
- package/dist/auth0/generators/react/auth0-hooks/generated/ts-import-maps.d.ts.map +0 -1
- package/dist/auth0/generators/react/auth0-hooks/generated/ts-import-maps.js +0 -16
- package/dist/auth0/generators/react/auth0-hooks/generated/ts-import-maps.js.map +0 -1
- package/dist/auth0/generators/react/auth0-hooks/generated/ts-templates.d.ts +0 -33
- package/dist/auth0/generators/react/auth0-hooks/generated/ts-templates.d.ts.map +0 -1
- package/dist/auth0/generators/react/auth0-hooks/generated/ts-templates.js +0 -50
- package/dist/auth0/generators/react/auth0-hooks/generated/ts-templates.js.map +0 -1
- package/dist/web/assets/__federation_expose_auth0CoreWeb-BlCwYpTq.js.map +0 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/web-BXHJHUXP.js.map +0 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib-GtzVuDsM.js.map +0 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/ui-components-ChoqtPkg.js.map +0 -1
- package/dist/web/assets/model-merger-CdV-7CWE.js.map +0 -1
- package/dist/web/assets/plugin-definition-C9Q-BrBQ.js.map +0 -1
- /package/dist/auth/generators/fastify/auth-module/templates/{user-session.constants.ts → module/constants/user-session.constants.ts} +0 -0
- /package/dist/auth/generators/fastify/auth-module/templates/{services → module/services}/user-session.service.ts +0 -0
- /package/dist/auth/generators/fastify/auth-module/templates/{utils → module/utils}/session-cookie.ts +0 -0
- /package/dist/auth/generators/fastify/auth-module/templates/{utils → module/utils}/verify-request-origin.ts +0 -0
- /package/dist/auth0/generators/fastify/auth0-module/templates/{management.ts → module/services/management.ts} +0 -0
- /package/dist/auth0/generators/fastify/auth0-module/templates/{user-session.service.ts → module/services/user-session.service.ts} +0 -0
- /package/dist/auth0/generators/react/auth0-hooks/templates/{useCurrentUser.gql → src/hooks/useCurrentUser.gql} +0 -0
- /package/dist/auth0/generators/react/auth0-hooks/templates/{useCurrentUser.ts → src/hooks/useCurrentUser.ts} +0 -0
- /package/dist/auth0/generators/react/auth0-hooks/templates/{useLogOut.ts → src/hooks/useLogOut.ts} +0 -0
- /package/dist/auth0/generators/react/auth0-hooks/templates/{useRequiredUserId.ts → src/hooks/useRequiredUserId.ts} +0 -0
- /package/dist/auth0/generators/react/auth0-hooks/templates/{useSession.ts → src/hooks/useSession.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../../src/auth/core/node.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../../src/auth/core/node.ts"],"names":[],"mappings":";;;AAwBA,wBAgEG"}
|
package/dist/auth/core/node.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { authContextGenerator, authPluginGenerator, authRolesGenerator,
|
|
1
|
+
import { authContextGenerator, authPluginGenerator, authRolesGenerator, pothosAuthGenerator, userSessionTypesGenerator, } from '@baseplate-dev/fastify-generators';
|
|
2
2
|
import { adminAppEntryType, appCompilerSpec, backendAppEntryType, createPlatformPluginExport, PluginUtils, webAppEntryType, } from '@baseplate-dev/project-builder-lib';
|
|
3
3
|
import { authIdentifyGenerator, placeholderAuthHooksGenerator, } from '@baseplate-dev/react-generators';
|
|
4
|
+
import { authModuleGenerator } from '../generators/index.js';
|
|
4
5
|
export default createPlatformPluginExport({
|
|
5
6
|
dependencies: {
|
|
6
7
|
appCompiler: appCompilerSpec,
|
|
@@ -11,7 +12,7 @@ export default createPlatformPluginExport({
|
|
|
11
12
|
appCompiler.registerAppCompiler({
|
|
12
13
|
pluginId,
|
|
13
14
|
appType: backendAppEntryType,
|
|
14
|
-
compile: ({ projectDefinition, appCompiler }) => {
|
|
15
|
+
compile: ({ projectDefinition, definitionContainer, appCompiler }) => {
|
|
15
16
|
const auth = PluginUtils.configByIdOrThrow(projectDefinition, pluginId);
|
|
16
17
|
appCompiler.addChildrenToFeature(auth.authFeatureRef, {
|
|
17
18
|
authContext: authContextGenerator({}),
|
|
@@ -24,7 +25,9 @@ export default createPlatformPluginExport({
|
|
|
24
25
|
})),
|
|
25
26
|
}),
|
|
26
27
|
userSessionTypes: userSessionTypesGenerator({}),
|
|
27
|
-
|
|
28
|
+
authModule: authModuleGenerator({
|
|
29
|
+
userSessionModelName: definitionContainer.nameFromId(auth.modelRefs.userSession),
|
|
30
|
+
}),
|
|
28
31
|
});
|
|
29
32
|
appCompiler.addRootChildren({
|
|
30
33
|
pothosAuth: pothosAuthGenerator({}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node.js","sourceRoot":"","sources":["../../../src/auth/core/node.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACnB,kBAAkB,EAClB
|
|
1
|
+
{"version":3,"file":"node.js","sourceRoot":"","sources":["../../../src/auth/core/node.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EACnB,yBAAyB,GAC1B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,0BAA0B,EAC1B,WAAW,EACX,eAAe,GAChB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,qBAAqB,EACrB,6BAA6B,GAC9B,MAAM,iCAAiC,CAAC;AAIzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAE7D,eAAe,0BAA0B,CAAC;IACxC,YAAY,EAAE;QACZ,WAAW,EAAE,eAAe;KAC7B;IACD,OAAO,EAAE,EAAE;IACX,UAAU,EAAE,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;QAC5C,4BAA4B;QAC5B,WAAW,CAAC,mBAAmB,CAAC;YAC9B,QAAQ;YACR,OAAO,EAAE,mBAAmB;YAC5B,OAAO,EAAE,CAAC,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,WAAW,EAAE,EAAE,EAAE;gBACnE,MAAM,IAAI,GAAG,WAAW,CAAC,iBAAiB,CACxC,iBAAiB,EACjB,QAAQ,CACe,CAAC;gBAE1B,WAAW,CAAC,oBAAoB,CAAC,IAAI,CAAC,cAAc,EAAE;oBACpD,WAAW,EAAE,oBAAoB,CAAC,EAAE,CAAC;oBACrC,UAAU,EAAE,mBAAmB,CAAC,EAAE,CAAC;oBACnC,SAAS,EAAE,kBAAkB,CAAC;wBAC5B,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;4BAC5B,IAAI,EAAE,CAAC,CAAC,IAAI;4BACZ,OAAO,EAAE,CAAC,CAAC,OAAO;4BAClB,OAAO,EAAE,CAAC,CAAC,OAAO;yBACnB,CAAC,CAAC;qBACJ,CAAC;oBACF,gBAAgB,EAAE,yBAAyB,CAAC,EAAE,CAAC;oBAC/C,UAAU,EAAE,mBAAmB,CAAC;wBAC9B,oBAAoB,EAAE,mBAAmB,CAAC,UAAU,CAClD,IAAI,CAAC,SAAS,CAAC,WAAW,CAC3B;qBACF,CAAC;iBACH,CAAC,CAAC;gBAEH,WAAW,CAAC,eAAe,CAAC;oBAC1B,UAAU,EAAE,mBAAmB,CAAC,EAAE,CAAC;iBACpC,CAAC,CAAC;YACL,CAAC;SACF,CAAC,CAAC;QAEH,wBAAwB;QACxB,WAAW,CAAC,mBAAmB,CAAC;YAC9B,QAAQ;YACR,OAAO,EAAE,eAAe;YACxB,OAAO,EAAE,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE;gBAC3B,WAAW,CAAC,eAAe,CAAC;oBAC1B,YAAY,EAAE,qBAAqB,CAAC,EAAE,CAAC;oBACvC,SAAS,EAAE,6BAA6B,CAAC,EAAE,CAAC;iBAC7C,CAAC,CAAC;YACL,CAAC;SACF,CAAC,CAAC;QACH,WAAW,CAAC,mBAAmB,CAAC;YAC9B,QAAQ;YACR,OAAO,EAAE,iBAAiB;YAC1B,OAAO,EAAE,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE;gBAC3B,WAAW,CAAC,eAAe,CAAC;oBAC1B,YAAY,EAAE,qBAAqB,CAAC,EAAE,CAAC;oBACvC,SAAS,EAAE,6BAA6B,CAAC,EAAE,CAAC;iBAC7C,CAAC,CAAC;YACL,CAAC;SACF,CAAC,CAAC;QAEH,OAAO,EAAE,CAAC;IACZ,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
export declare const authModuleGenerator: import("@baseplate-dev/sync").GeneratorBundleCreator<{
|
|
2
2
|
userSessionModelName: string;
|
|
3
3
|
}, {
|
|
4
|
+
paths: import("@baseplate-dev/sync").GeneratorTask<{
|
|
5
|
+
fastifyAuthModulePaths: import("@baseplate-dev/sync").ProviderExport<import("./generated/template-paths").FastifyAuthModulePaths>;
|
|
6
|
+
}, {
|
|
7
|
+
appModule: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/fastify-generators").AppModuleProvider>;
|
|
8
|
+
}, undefined>;
|
|
9
|
+
imports: import("@baseplate-dev/sync").GeneratorTask<{
|
|
10
|
+
userSessionServiceImports: import("@baseplate-dev/sync").ProviderExport<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
11
|
+
userSessionService: {};
|
|
12
|
+
}>>;
|
|
13
|
+
}, {
|
|
14
|
+
paths: import("@baseplate-dev/sync").ProviderType<import("./generated/template-paths").FastifyAuthModulePaths>;
|
|
15
|
+
}, undefined>;
|
|
4
16
|
config: import("@baseplate-dev/sync").GeneratorTask<undefined, {
|
|
5
17
|
provider: import("@baseplate-dev/sync").ProviderType<Omit<import("@baseplate-dev/utils").FieldMap<{
|
|
6
18
|
configFields: import("@baseplate-dev/utils").MapContainer<string, import("@baseplate-dev/fastify-generators").ConfigServiceField>;
|
|
@@ -18,7 +30,6 @@ export declare const authModuleGenerator: import("@baseplate-dev/sync").Generato
|
|
|
18
30
|
isTypeOnly: true;
|
|
19
31
|
};
|
|
20
32
|
}>>;
|
|
21
|
-
appModule: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/fastify-generators").AppModuleProvider>;
|
|
22
33
|
configServiceImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
23
34
|
config: {};
|
|
24
35
|
}>>;
|
|
@@ -60,6 +71,7 @@ export declare const authModuleGenerator: import("@baseplate-dev/sync").Generato
|
|
|
60
71
|
isTypeOnly: true;
|
|
61
72
|
};
|
|
62
73
|
}>>;
|
|
74
|
+
paths: import("@baseplate-dev/sync").ProviderType<import("./generated/template-paths").FastifyAuthModulePaths>;
|
|
63
75
|
}, any>;
|
|
64
76
|
}>;
|
|
65
77
|
//# sourceMappingURL=auth-module.generator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-module.generator.d.ts","sourceRoot":"","sources":["../../../../../src/auth/generators/fastify/auth-module/auth-module.generator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"auth-module.generator.d.ts","sourceRoot":"","sources":["../../../../../src/auth/generators/fastify/auth-module/auth-module.generator.ts"],"names":[],"mappings":"AA2BA,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;iCAGpB,sBACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiFZ,CAAC"}
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import { tsCodeFragment, typescriptFileProvider, } from '@baseplate-dev/core-generators';
|
|
2
|
-
import {
|
|
2
|
+
import { authContextImportsProvider, authRolesImportsProvider, configServiceImportsProvider, configServiceProvider, errorHandlerServiceImportsProvider, prismaOutputProvider, requestServiceContextImportsProvider, userSessionTypesImportsProvider, } from '@baseplate-dev/fastify-generators';
|
|
3
3
|
import { createGenerator, createGeneratorTask, createProviderTask, } from '@baseplate-dev/sync';
|
|
4
4
|
import { z } from 'zod';
|
|
5
|
-
import {
|
|
5
|
+
import { FASTIFY_AUTH_MODULE_GENERATED } from './generated';
|
|
6
6
|
const descriptorSchema = z.object({
|
|
7
7
|
userSessionModelName: z.string().min(1),
|
|
8
8
|
});
|
|
9
9
|
export const authModuleGenerator = createGenerator({
|
|
10
|
-
name: '
|
|
10
|
+
name: 'fastify/auth-module',
|
|
11
11
|
generatorFileUrl: import.meta.url,
|
|
12
12
|
descriptorSchema,
|
|
13
13
|
buildTasks: ({ userSessionModelName }) => ({
|
|
14
|
+
paths: FASTIFY_AUTH_MODULE_GENERATED.paths.task,
|
|
15
|
+
imports: FASTIFY_AUTH_MODULE_GENERATED.imports.task,
|
|
14
16
|
config: createProviderTask(configServiceProvider, (configService) => {
|
|
15
17
|
configService.configFields.set('AUTH_SECRET', {
|
|
16
18
|
validator: tsCodeFragment('z.string().regex(/^[a-zA-Z0-9-_+=/]{20,}$/)'),
|
|
@@ -23,24 +25,23 @@ export const authModuleGenerator = createGenerator({
|
|
|
23
25
|
dependencies: {
|
|
24
26
|
typescriptFile: typescriptFileProvider,
|
|
25
27
|
authRolesImports: authRolesImportsProvider,
|
|
26
|
-
appModule: appModuleProvider,
|
|
27
28
|
configServiceImports: configServiceImportsProvider,
|
|
28
29
|
prismaOutput: prismaOutputProvider,
|
|
29
30
|
userSessionTypesImports: userSessionTypesImportsProvider,
|
|
30
31
|
authContextImports: authContextImportsProvider,
|
|
31
32
|
errorHandlerServiceImports: errorHandlerServiceImportsProvider,
|
|
32
33
|
requestServiceContextImports: requestServiceContextImportsProvider,
|
|
34
|
+
paths: FASTIFY_AUTH_MODULE_GENERATED.paths.provider,
|
|
33
35
|
},
|
|
34
|
-
run({ typescriptFile, authRolesImports, prismaOutput, configServiceImports,
|
|
35
|
-
const userSessionServicePath = `${appModule.getModuleFolder()}/services/user-session.service.ts`;
|
|
36
|
+
run({ typescriptFile, authRolesImports, prismaOutput, configServiceImports, userSessionTypesImports, authContextImports, errorHandlerServiceImports, requestServiceContextImports, paths, }) {
|
|
36
37
|
return {
|
|
37
38
|
providers: {
|
|
38
39
|
authModule: {},
|
|
39
40
|
},
|
|
40
41
|
build: async (builder) => {
|
|
41
42
|
await builder.apply(typescriptFile.renderTemplateFile({
|
|
42
|
-
template:
|
|
43
|
-
destination:
|
|
43
|
+
template: FASTIFY_AUTH_MODULE_GENERATED.templates.userSessionService,
|
|
44
|
+
destination: paths.userSessionService,
|
|
44
45
|
variables: {
|
|
45
46
|
TPL_PRISMA_USER_SESSION: prismaOutput.getPrismaModelFragment(userSessionModelName),
|
|
46
47
|
},
|
|
@@ -53,6 +54,17 @@ export const authModuleGenerator = createGenerator({
|
|
|
53
54
|
requestServiceContextImports,
|
|
54
55
|
},
|
|
55
56
|
}));
|
|
57
|
+
await builder.apply(typescriptFile.renderTemplateGroup({
|
|
58
|
+
group: FASTIFY_AUTH_MODULE_GENERATED.templates.constantsGroup,
|
|
59
|
+
paths,
|
|
60
|
+
}));
|
|
61
|
+
await builder.apply(typescriptFile.renderTemplateGroup({
|
|
62
|
+
group: FASTIFY_AUTH_MODULE_GENERATED.templates.utilsGroup,
|
|
63
|
+
paths,
|
|
64
|
+
importMapProviders: {
|
|
65
|
+
configServiceImports,
|
|
66
|
+
},
|
|
67
|
+
}));
|
|
56
68
|
},
|
|
57
69
|
};
|
|
58
70
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-module.generator.js","sourceRoot":"","sources":["../../../../../src/auth/generators/fastify/auth-module/auth-module.generator.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,sBAAsB,GACvB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"auth-module.generator.js","sourceRoot":"","sources":["../../../../../src/auth/generators/fastify/auth-module/auth-module.generator.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,sBAAsB,GACvB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,0BAA0B,EAC1B,wBAAwB,EACxB,4BAA4B,EAC5B,qBAAqB,EACrB,kCAAkC,EAClC,oBAAoB,EACpB,oCAAoC,EACpC,+BAA+B,GAChC,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,6BAA6B,EAAE,MAAM,aAAa,CAAC;AAE5D,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChC,oBAAoB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CACxC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,mBAAmB,GAAG,eAAe,CAAC;IACjD,IAAI,EAAE,qBAAqB;IAC3B,gBAAgB,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG;IACjC,gBAAgB;IAChB,UAAU,EAAE,CAAC,EAAE,oBAAoB,EAAE,EAAE,EAAE,CAAC,CAAC;QACzC,KAAK,EAAE,6BAA6B,CAAC,KAAK,CAAC,IAAI;QAC/C,OAAO,EAAE,6BAA6B,CAAC,OAAO,CAAC,IAAI;QACnD,MAAM,EAAE,kBAAkB,CAAC,qBAAqB,EAAE,CAAC,aAAa,EAAE,EAAE;YAClE,aAAa,CAAC,YAAY,CAAC,GAAG,CAAC,aAAa,EAAE;gBAC5C,SAAS,EAAE,cAAc,CACvB,6CAA6C,CAC9C;gBACD,OAAO,EACL,0EAA0E;gBAC5E,SAAS,EAAE,yBAAyB;gBACpC,YAAY,EAAE,eAAe;aAC9B,CAAC,CAAC;QACL,CAAC,CAAC;QACF,IAAI,EAAE,mBAAmB,CAAC;YACxB,YAAY,EAAE;gBACZ,cAAc,EAAE,sBAAsB;gBACtC,gBAAgB,EAAE,wBAAwB;gBAC1C,oBAAoB,EAAE,4BAA4B;gBAClD,YAAY,EAAE,oBAAoB;gBAClC,uBAAuB,EAAE,+BAA+B;gBACxD,kBAAkB,EAAE,0BAA0B;gBAC9C,0BAA0B,EAAE,kCAAkC;gBAC9D,4BAA4B,EAAE,oCAAoC;gBAClE,KAAK,EAAE,6BAA6B,CAAC,KAAK,CAAC,QAAQ;aACpD;YACD,GAAG,CAAC,EACF,cAAc,EACd,gBAAgB,EAChB,YAAY,EACZ,oBAAoB,EACpB,uBAAuB,EACvB,kBAAkB,EAClB,0BAA0B,EAC1B,4BAA4B,EAC5B,KAAK,GACN;gBACC,OAAO;oBACL,SAAS,EAAE;wBACT,UAAU,EAAE,EAAE;qBACf;oBACD,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;wBACvB,MAAM,OAAO,CAAC,KAAK,CACjB,cAAc,CAAC,kBAAkB,CAAC;4BAChC,QAAQ,EACN,6BAA6B,CAAC,SAAS,CAAC,kBAAkB;4BAC5D,WAAW,EAAE,KAAK,CAAC,kBAAkB;4BACrC,SAAS,EAAE;gCACT,uBAAuB,EACrB,YAAY,CAAC,sBAAsB,CAAC,oBAAoB,CAAC;6BAC5D;4BACD,kBAAkB,EAAE;gCAClB,oBAAoB;gCACpB,kBAAkB;gCAClB,gBAAgB;gCAChB,uBAAuB;gCACvB,0BAA0B;gCAC1B,4BAA4B;6BAC7B;yBACF,CAAC,CACH,CAAC;wBACF,MAAM,OAAO,CAAC,KAAK,CACjB,cAAc,CAAC,mBAAmB,CAAC;4BACjC,KAAK,EAAE,6BAA6B,CAAC,SAAS,CAAC,cAAc;4BAC7D,KAAK;yBACN,CAAC,CACH,CAAC;wBACF,MAAM,OAAO,CAAC,KAAK,CACjB,cAAc,CAAC,mBAAmB,CAAC;4BACjC,KAAK,EAAE,6BAA6B,CAAC,SAAS,CAAC,UAAU;4BACzD,KAAK;4BACL,kBAAkB,EAAE;gCAClB,oBAAoB;6BACrB;yBACF,CAAC,CACH,CAAC;oBACJ,CAAC;iBACF,CAAC;YACJ,CAAC;SACF,CAAC;KACH,CAAC;CACH,CAAC,CAAC"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
export declare const FASTIFY_AUTH_MODULE_GENERATED: {
|
|
2
|
+
imports: {
|
|
3
|
+
task: import("@baseplate-dev/sync").GeneratorTask<{
|
|
4
|
+
userSessionServiceImports: import("@baseplate-dev/sync").ProviderExport<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
5
|
+
userSessionService: {};
|
|
6
|
+
}>>;
|
|
7
|
+
}, {
|
|
8
|
+
paths: import("@baseplate-dev/sync").ProviderType<import("./template-paths.js").FastifyAuthModulePaths>;
|
|
9
|
+
}, undefined>;
|
|
10
|
+
};
|
|
11
|
+
paths: {
|
|
12
|
+
provider: import("@baseplate-dev/sync").ProviderType<import("./template-paths.js").FastifyAuthModulePaths>;
|
|
13
|
+
task: import("@baseplate-dev/sync").GeneratorTask<{
|
|
14
|
+
fastifyAuthModulePaths: import("@baseplate-dev/sync").ProviderExport<import("./template-paths.js").FastifyAuthModulePaths>;
|
|
15
|
+
}, {
|
|
16
|
+
appModule: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/fastify-generators").AppModuleProvider>;
|
|
17
|
+
}, undefined>;
|
|
18
|
+
};
|
|
19
|
+
templates: {
|
|
20
|
+
constantsGroup: {
|
|
21
|
+
userSessionConstants: import("@baseplate-dev/core-generators").TsTemplateFile<{}, {}>;
|
|
22
|
+
};
|
|
23
|
+
utilsGroup: {
|
|
24
|
+
cookieSigner: import("@baseplate-dev/core-generators").TsTemplateFile<{}, {}>;
|
|
25
|
+
sessionCookie: import("@baseplate-dev/core-generators").TsTemplateFile<{}, {
|
|
26
|
+
configServiceImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
27
|
+
config: {};
|
|
28
|
+
}>>;
|
|
29
|
+
}>;
|
|
30
|
+
verifyRequestOrigin: import("@baseplate-dev/core-generators").TsTemplateFile<{}, {}>;
|
|
31
|
+
};
|
|
32
|
+
userSessionService: import("@baseplate-dev/core-generators").TsTemplateFile<{
|
|
33
|
+
TPL_PRISMA_USER_SESSION: {};
|
|
34
|
+
}, {
|
|
35
|
+
authContextImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
36
|
+
AuthContext: {
|
|
37
|
+
isTypeOnly: true;
|
|
38
|
+
};
|
|
39
|
+
AuthSessionInfo: {
|
|
40
|
+
isTypeOnly: true;
|
|
41
|
+
};
|
|
42
|
+
AuthUserSessionInfo: {
|
|
43
|
+
isTypeOnly: true;
|
|
44
|
+
};
|
|
45
|
+
createAuthContextFromSessionInfo: {};
|
|
46
|
+
InvalidSessionError: {};
|
|
47
|
+
}>>;
|
|
48
|
+
authRolesImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
49
|
+
AuthRole: {
|
|
50
|
+
isTypeOnly: true;
|
|
51
|
+
};
|
|
52
|
+
DEFAULT_PUBLIC_ROLES: {};
|
|
53
|
+
DEFAULT_USER_ROLES: {};
|
|
54
|
+
RoleConfig: {
|
|
55
|
+
isTypeOnly: true;
|
|
56
|
+
};
|
|
57
|
+
}>>;
|
|
58
|
+
configServiceImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
59
|
+
config: {};
|
|
60
|
+
}>>;
|
|
61
|
+
errorHandlerServiceImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
62
|
+
BadRequestError: {};
|
|
63
|
+
ForbiddenError: {};
|
|
64
|
+
handleZodRequestValidationError: {};
|
|
65
|
+
HttpError: {};
|
|
66
|
+
InternalServerError: {};
|
|
67
|
+
logError: {};
|
|
68
|
+
NotFoundError: {};
|
|
69
|
+
UnauthorizedError: {};
|
|
70
|
+
}>>;
|
|
71
|
+
requestServiceContextImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
72
|
+
createContextFromRequest: {};
|
|
73
|
+
RequestServiceContext: {
|
|
74
|
+
isTypeOnly: true;
|
|
75
|
+
};
|
|
76
|
+
}>>;
|
|
77
|
+
userSessionTypesImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
78
|
+
UserSessionPayload: {
|
|
79
|
+
isTypeOnly: true;
|
|
80
|
+
};
|
|
81
|
+
UserSessionService: {
|
|
82
|
+
isTypeOnly: true;
|
|
83
|
+
};
|
|
84
|
+
}>>;
|
|
85
|
+
}>;
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/auth/generators/fastify/auth-module/generated/index.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIzC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FASTIFY_AUTH_MODULE_PATHS } from './template-paths.js';
|
|
2
|
+
import { FASTIFY_AUTH_MODULE_IMPORTS } from './ts-import-providers.js';
|
|
3
|
+
import { FASTIFY_AUTH_MODULE_TEMPLATES } from './typed-templates.js';
|
|
4
|
+
export const FASTIFY_AUTH_MODULE_GENERATED = {
|
|
5
|
+
imports: FASTIFY_AUTH_MODULE_IMPORTS,
|
|
6
|
+
paths: FASTIFY_AUTH_MODULE_PATHS,
|
|
7
|
+
templates: FASTIFY_AUTH_MODULE_TEMPLATES,
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/auth/generators/fastify/auth-module/generated/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AACvE,OAAO,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AAErE,MAAM,CAAC,MAAM,6BAA6B,GAAG;IAC3C,OAAO,EAAE,2BAA2B;IACpC,KAAK,EAAE,yBAAyB;IAChC,SAAS,EAAE,6BAA6B;CACzC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface FastifyAuthModulePaths {
|
|
2
|
+
userSessionConstants: string;
|
|
3
|
+
userSessionService: string;
|
|
4
|
+
cookieSigner: string;
|
|
5
|
+
sessionCookie: string;
|
|
6
|
+
verifyRequestOrigin: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const FASTIFY_AUTH_MODULE_PATHS: {
|
|
9
|
+
provider: import("@baseplate-dev/sync").ProviderType<FastifyAuthModulePaths>;
|
|
10
|
+
task: import("@baseplate-dev/sync").GeneratorTask<{
|
|
11
|
+
fastifyAuthModulePaths: import("@baseplate-dev/sync").ProviderExport<FastifyAuthModulePaths>;
|
|
12
|
+
}, {
|
|
13
|
+
appModule: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/fastify-generators").AppModuleProvider>;
|
|
14
|
+
}, undefined>;
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=template-paths.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template-paths.d.ts","sourceRoot":"","sources":["../../../../../../src/auth/generators/fastify/auth-module/generated/template-paths.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,sBAAsB;IACrC,oBAAoB,EAAE,MAAM,CAAC;IAC7B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,mBAAmB,EAAE,MAAM,CAAC;CAC7B;AA0BD,eAAO,MAAM,yBAAyB;;;;;;;CAGrC,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { appModuleProvider } from '@baseplate-dev/fastify-generators';
|
|
2
|
+
import { createGeneratorTask, createProviderType } from '@baseplate-dev/sync';
|
|
3
|
+
const fastifyAuthModulePaths = createProviderType('fastify-auth-module-paths');
|
|
4
|
+
const fastifyAuthModulePathsTask = createGeneratorTask({
|
|
5
|
+
dependencies: { appModule: appModuleProvider },
|
|
6
|
+
exports: { fastifyAuthModulePaths: fastifyAuthModulePaths.export() },
|
|
7
|
+
run({ appModule }) {
|
|
8
|
+
const moduleRoot = appModule.getModuleFolder();
|
|
9
|
+
return {
|
|
10
|
+
providers: {
|
|
11
|
+
fastifyAuthModulePaths: {
|
|
12
|
+
cookieSigner: `${moduleRoot}/utils/cookie-signer.ts`,
|
|
13
|
+
sessionCookie: `${moduleRoot}/utils/session-cookie.ts`,
|
|
14
|
+
userSessionConstants: `${moduleRoot}/constants/user-session.constants.ts`,
|
|
15
|
+
userSessionService: `${moduleRoot}/services/user-session.service.ts`,
|
|
16
|
+
verifyRequestOrigin: `${moduleRoot}/utils/verify-request-origin.ts`,
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
export const FASTIFY_AUTH_MODULE_PATHS = {
|
|
23
|
+
provider: fastifyAuthModulePaths,
|
|
24
|
+
task: fastifyAuthModulePathsTask,
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=template-paths.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template-paths.js","sourceRoot":"","sources":["../../../../../../src/auth/generators/fastify/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;AAU9E,MAAM,sBAAsB,GAAG,kBAAkB,CAC/C,2BAA2B,CAC5B,CAAC;AAEF,MAAM,0BAA0B,GAAG,mBAAmB,CAAC;IACrD,YAAY,EAAE,EAAE,SAAS,EAAE,iBAAiB,EAAE;IAC9C,OAAO,EAAE,EAAE,sBAAsB,EAAE,sBAAsB,CAAC,MAAM,EAAE,EAAE;IACpE,GAAG,CAAC,EAAE,SAAS,EAAE;QACf,MAAM,UAAU,GAAG,SAAS,CAAC,eAAe,EAAE,CAAC;QAE/C,OAAO;YACL,SAAS,EAAE;gBACT,sBAAsB,EAAE;oBACtB,YAAY,EAAE,GAAG,UAAU,yBAAyB;oBACpD,aAAa,EAAE,GAAG,UAAU,0BAA0B;oBACtD,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,yBAAyB,GAAG;IACvC,QAAQ,EAAE,sBAAsB;IAChC,IAAI,EAAE,0BAA0B;CACjC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const FASTIFY_AUTH_MODULE_IMPORTS: {
|
|
2
|
+
task: import("@baseplate-dev/sync").GeneratorTask<{
|
|
3
|
+
userSessionServiceImports: import("@baseplate-dev/sync").ProviderExport<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
4
|
+
userSessionService: {};
|
|
5
|
+
}>>;
|
|
6
|
+
}, {
|
|
7
|
+
paths: import("@baseplate-dev/sync").ProviderType<import("./template-paths.js").FastifyAuthModulePaths>;
|
|
8
|
+
}, undefined>;
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=ts-import-providers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ts-import-providers.d.ts","sourceRoot":"","sources":["../../../../../../src/auth/generators/fastify/auth-module/generated/ts-import-providers.ts"],"names":[],"mappings":"AAgCA,eAAO,MAAM,2BAA2B;;;;;;;;CAEvC,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { createTsImportMap, packageScope, } from '@baseplate-dev/core-generators';
|
|
2
|
+
import { userSessionServiceImportsProvider, userSessionServiceImportsSchema, } from '@baseplate-dev/fastify-generators';
|
|
3
|
+
import { createGeneratorTask } from '@baseplate-dev/sync';
|
|
4
|
+
import { FASTIFY_AUTH_MODULE_PATHS } from './template-paths.js';
|
|
5
|
+
const fastifyAuthModuleImportsTask = createGeneratorTask({
|
|
6
|
+
dependencies: {
|
|
7
|
+
paths: FASTIFY_AUTH_MODULE_PATHS.provider,
|
|
8
|
+
},
|
|
9
|
+
exports: {
|
|
10
|
+
userSessionServiceImports: userSessionServiceImportsProvider.export(packageScope),
|
|
11
|
+
},
|
|
12
|
+
run({ paths }) {
|
|
13
|
+
return {
|
|
14
|
+
providers: {
|
|
15
|
+
userSessionServiceImports: createTsImportMap(userSessionServiceImportsSchema, { userSessionService: paths.userSessionService }),
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
export const FASTIFY_AUTH_MODULE_IMPORTS = {
|
|
21
|
+
task: fastifyAuthModuleImportsTask,
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=ts-import-providers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ts-import-providers.js","sourceRoot":"","sources":["../../../../../../src/auth/generators/fastify/auth-module/generated/ts-import-providers.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,YAAY,GACb,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,iCAAiC,EACjC,+BAA+B,GAChC,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE1D,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAEhE,MAAM,4BAA4B,GAAG,mBAAmB,CAAC;IACvD,YAAY,EAAE;QACZ,KAAK,EAAE,yBAAyB,CAAC,QAAQ;KAC1C;IACD,OAAO,EAAE;QACP,yBAAyB,EACvB,iCAAiC,CAAC,MAAM,CAAC,YAAY,CAAC;KACzD;IACD,GAAG,CAAC,EAAE,KAAK,EAAE;QACX,OAAO;YACL,SAAS,EAAE;gBACT,yBAAyB,EAAE,iBAAiB,CAC1C,+BAA+B,EAC/B,EAAE,kBAAkB,EAAE,KAAK,CAAC,kBAAkB,EAAE,CACjD;aACF;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACzC,IAAI,EAAE,4BAA4B;CACnC,CAAC"}
|
|
@@ -1,36 +1,29 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
};
|
|
11
|
-
schemaUserSessionQueries: {
|
|
12
|
-
destination: string;
|
|
13
|
-
template: import("@baseplate-dev/core-generators").TsTemplateFile<{
|
|
14
|
-
TPL_PRISMA_USER: {};
|
|
15
|
-
}, {
|
|
16
|
-
pothosImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
17
|
-
builder: {};
|
|
18
|
-
}>>;
|
|
19
|
-
}>;
|
|
20
|
-
};
|
|
21
|
-
userSessionPayloadObjectType: {
|
|
22
|
-
destination: string;
|
|
23
|
-
template: import("@baseplate-dev/core-generators").TsTemplateFile<{
|
|
24
|
-
TPL_PRISMA_USER: {};
|
|
25
|
-
TPL_USER_OBJECT_TYPE: {};
|
|
26
|
-
}, {
|
|
27
|
-
pothosImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
28
|
-
builder: {};
|
|
29
|
-
}>>;
|
|
30
|
-
}>;
|
|
31
|
-
};
|
|
1
|
+
export declare const constantsGroup: {
|
|
2
|
+
userSessionConstants: import("@baseplate-dev/core-generators").TsTemplateFile<{}, {}>;
|
|
3
|
+
};
|
|
4
|
+
export declare const utilsGroup: {
|
|
5
|
+
cookieSigner: import("@baseplate-dev/core-generators").TsTemplateFile<{}, {}>;
|
|
6
|
+
sessionCookie: import("@baseplate-dev/core-generators").TsTemplateFile<{}, {
|
|
7
|
+
configServiceImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
8
|
+
config: {};
|
|
9
|
+
}>>;
|
|
32
10
|
}>;
|
|
33
|
-
|
|
11
|
+
verifyRequestOrigin: import("@baseplate-dev/core-generators").TsTemplateFile<{}, {}>;
|
|
12
|
+
};
|
|
13
|
+
export declare const FASTIFY_AUTH_MODULE_TEMPLATES: {
|
|
14
|
+
constantsGroup: {
|
|
15
|
+
userSessionConstants: import("@baseplate-dev/core-generators").TsTemplateFile<{}, {}>;
|
|
16
|
+
};
|
|
17
|
+
utilsGroup: {
|
|
18
|
+
cookieSigner: import("@baseplate-dev/core-generators").TsTemplateFile<{}, {}>;
|
|
19
|
+
sessionCookie: import("@baseplate-dev/core-generators").TsTemplateFile<{}, {
|
|
20
|
+
configServiceImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
21
|
+
config: {};
|
|
22
|
+
}>>;
|
|
23
|
+
}>;
|
|
24
|
+
verifyRequestOrigin: import("@baseplate-dev/core-generators").TsTemplateFile<{}, {}>;
|
|
25
|
+
};
|
|
26
|
+
userSessionService: import("@baseplate-dev/core-generators").TsTemplateFile<{
|
|
34
27
|
TPL_PRISMA_USER_SESSION: {};
|
|
35
28
|
}, {
|
|
36
29
|
authContextImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
@@ -84,13 +77,5 @@ export declare const FASTIFY_AUTH_MODULE_TS_TEMPLATES: {
|
|
|
84
77
|
};
|
|
85
78
|
}>>;
|
|
86
79
|
}>;
|
|
87
|
-
userSessionConstants: import("@baseplate-dev/core-generators").TsTemplateFile<{}, Record<never, import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/sync").Provider>>>;
|
|
88
|
-
utilsCookieSigner: import("@baseplate-dev/core-generators").TsTemplateFile<{}, Record<never, import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/sync").Provider>>>;
|
|
89
|
-
utilsSessionCookie: import("@baseplate-dev/core-generators").TsTemplateFile<{}, {
|
|
90
|
-
configServiceImports: import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/core-generators").InferTsImportMapFromSchema<{
|
|
91
|
-
config: {};
|
|
92
|
-
}>>;
|
|
93
|
-
}>;
|
|
94
|
-
utilsVerifyRequestOrigin: import("@baseplate-dev/core-generators").TsTemplateFile<{}, Record<never, import("@baseplate-dev/sync").ProviderType<import("@baseplate-dev/sync").Provider>>>;
|
|
95
80
|
};
|
|
96
|
-
//# sourceMappingURL=
|
|
81
|
+
//# sourceMappingURL=typed-templates.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typed-templates.d.ts","sourceRoot":"","sources":["../../../../../../src/auth/generators/fastify/auth-module/generated/typed-templates.ts"],"names":[],"mappings":"AAyBA,eAAO,MAAM,cAAc;;CAA2B,CAAC;AAiEvD,eAAO,MAAM,UAAU;;;;;;;;CAAuD,CAAC;AAE/E,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIzC,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { createTsTemplateFile } from '@baseplate-dev/core-generators';
|
|
2
|
+
import { authContextImportsProvider, authRolesImportsProvider, configServiceImportsProvider, errorHandlerServiceImportsProvider, requestServiceContextImportsProvider, userSessionTypesImportsProvider, } from '@baseplate-dev/fastify-generators';
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
const userSessionConstants = createTsTemplateFile({
|
|
5
|
+
fileOptions: { kind: 'singleton' },
|
|
6
|
+
group: 'constants',
|
|
7
|
+
importMapProviders: {},
|
|
8
|
+
name: 'user-session-constants',
|
|
9
|
+
source: {
|
|
10
|
+
path: path.join(import.meta.dirname, '../templates/module/constants/user-session.constants.ts'),
|
|
11
|
+
},
|
|
12
|
+
variables: {},
|
|
13
|
+
});
|
|
14
|
+
export const constantsGroup = { userSessionConstants };
|
|
15
|
+
const userSessionService = createTsTemplateFile({
|
|
16
|
+
fileOptions: { kind: 'singleton' },
|
|
17
|
+
importMapProviders: {
|
|
18
|
+
authContextImports: authContextImportsProvider,
|
|
19
|
+
authRolesImports: authRolesImportsProvider,
|
|
20
|
+
configServiceImports: configServiceImportsProvider,
|
|
21
|
+
errorHandlerServiceImports: errorHandlerServiceImportsProvider,
|
|
22
|
+
requestServiceContextImports: requestServiceContextImportsProvider,
|
|
23
|
+
userSessionTypesImports: userSessionTypesImportsProvider,
|
|
24
|
+
},
|
|
25
|
+
name: 'user-session-service',
|
|
26
|
+
projectExports: { userSessionService: {} },
|
|
27
|
+
source: {
|
|
28
|
+
path: path.join(import.meta.dirname, '../templates/module/services/user-session.service.ts'),
|
|
29
|
+
},
|
|
30
|
+
variables: { TPL_PRISMA_USER_SESSION: {} },
|
|
31
|
+
});
|
|
32
|
+
const cookieSigner = createTsTemplateFile({
|
|
33
|
+
fileOptions: { kind: 'singleton' },
|
|
34
|
+
group: 'utils',
|
|
35
|
+
importMapProviders: {},
|
|
36
|
+
name: 'cookie-signer',
|
|
37
|
+
source: {
|
|
38
|
+
path: path.join(import.meta.dirname, '../templates/module/utils/cookie-signer.ts'),
|
|
39
|
+
},
|
|
40
|
+
variables: {},
|
|
41
|
+
});
|
|
42
|
+
const sessionCookie = createTsTemplateFile({
|
|
43
|
+
fileOptions: { kind: 'singleton' },
|
|
44
|
+
group: 'utils',
|
|
45
|
+
importMapProviders: { configServiceImports: configServiceImportsProvider },
|
|
46
|
+
name: 'session-cookie',
|
|
47
|
+
source: {
|
|
48
|
+
path: path.join(import.meta.dirname, '../templates/module/utils/session-cookie.ts'),
|
|
49
|
+
},
|
|
50
|
+
variables: {},
|
|
51
|
+
});
|
|
52
|
+
const verifyRequestOrigin = createTsTemplateFile({
|
|
53
|
+
fileOptions: { kind: 'singleton' },
|
|
54
|
+
group: 'utils',
|
|
55
|
+
importMapProviders: {},
|
|
56
|
+
name: 'verify-request-origin',
|
|
57
|
+
source: {
|
|
58
|
+
path: path.join(import.meta.dirname, '../templates/module/utils/verify-request-origin.ts'),
|
|
59
|
+
},
|
|
60
|
+
variables: {},
|
|
61
|
+
});
|
|
62
|
+
export const utilsGroup = { cookieSigner, sessionCookie, verifyRequestOrigin };
|
|
63
|
+
export const FASTIFY_AUTH_MODULE_TEMPLATES = {
|
|
64
|
+
constantsGroup,
|
|
65
|
+
utilsGroup,
|
|
66
|
+
userSessionService,
|
|
67
|
+
};
|
|
68
|
+
//# sourceMappingURL=typed-templates.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typed-templates.js","sourceRoot":"","sources":["../../../../../../src/auth/generators/fastify/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,oCAAoC,EACpC,+BAA+B,GAChC,MAAM,mCAAmC,CAAC;AAC3C,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,kBAAkB,GAAG,oBAAoB,CAAC;IAC9C,WAAW,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE;IAClC,kBAAkB,EAAE;QAClB,kBAAkB,EAAE,0BAA0B;QAC9C,gBAAgB,EAAE,wBAAwB;QAC1C,oBAAoB,EAAE,4BAA4B;QAClD,0BAA0B,EAAE,kCAAkC;QAC9D,4BAA4B,EAAE,oCAAoC;QAClE,uBAAuB,EAAE,+BAA+B;KACzD;IACD,IAAI,EAAE,sBAAsB;IAC5B,cAAc,EAAE,EAAE,kBAAkB,EAAE,EAAE,EAAE;IAC1C,MAAM,EAAE;QACN,IAAI,EAAE,IAAI,CAAC,IAAI,CACb,MAAM,CAAC,IAAI,CAAC,OAAO,EACnB,sDAAsD,CACvD;KACF;IACD,SAAS,EAAE,EAAE,uBAAuB,EAAE,EAAE,EAAE;CAC3C,CAAC,CAAC;AAEH,MAAM,YAAY,GAAG,oBAAoB,CAAC;IACxC,WAAW,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE;IAClC,KAAK,EAAE,OAAO;IACd,kBAAkB,EAAE,EAAE;IACtB,IAAI,EAAE,eAAe;IACrB,MAAM,EAAE;QACN,IAAI,EAAE,IAAI,CAAC,IAAI,CACb,MAAM,CAAC,IAAI,CAAC,OAAO,EACnB,4CAA4C,CAC7C;KACF;IACD,SAAS,EAAE,EAAE;CACd,CAAC,CAAC;AAEH,MAAM,aAAa,GAAG,oBAAoB,CAAC;IACzC,WAAW,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE;IAClC,KAAK,EAAE,OAAO;IACd,kBAAkB,EAAE,EAAE,oBAAoB,EAAE,4BAA4B,EAAE;IAC1E,IAAI,EAAE,gBAAgB;IACtB,MAAM,EAAE;QACN,IAAI,EAAE,IAAI,CAAC,IAAI,CACb,MAAM,CAAC,IAAI,CAAC,OAAO,EACnB,6CAA6C,CAC9C;KACF;IACD,SAAS,EAAE,EAAE;CACd,CAAC,CAAC;AAEH,MAAM,mBAAmB,GAAG,oBAAoB,CAAC;IAC/C,WAAW,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE;IAClC,KAAK,EAAE,OAAO;IACd,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,6BAA6B,GAAG;IAC3C,cAAc;IACd,UAAU;IACV,kBAAkB;CACnB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/auth/generators/fastify/auth-module/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/auth/generators/fastify/auth-module/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC"}
|
package/dist/auth/generators/fastify/auth-module/templates/{utils → module/utils}/cookie-signer.ts
RENAMED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
import * as crypto from 'node:crypto';
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* Cookie signing utilities
|
|
7
|
+
* Based on node-cookie-signature by TJ Holowaychuk
|
|
8
|
+
* Source: https://github.com/tj/node-cookie-signature
|
|
9
|
+
*/
|
|
10
|
+
|
|
5
11
|
/**
|
|
6
12
|
* Sign the given `val` with `secret` using HMAC-SHA256.
|
|
7
13
|
*
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './auth-module/
|
|
1
|
+
export * from './auth-module/index.js';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/auth/generators/fastify/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/auth/generators/fastify/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './auth-module/
|
|
1
|
+
export * from './auth-module/index.js';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/auth/generators/fastify/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/auth/generators/fastify/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC"}
|