@wasp.sh/wasp-cli-darwin-x64-unknown 0.20.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/data/Cli/starters/README.md +22 -0
- package/data/Cli/starters/basic/README.md +35 -0
- package/data/Cli/starters/basic/eslint.config.js +24 -0
- package/data/Cli/starters/basic/main.wasp +100 -0
- package/data/Cli/starters/basic/package.json +29 -0
- package/data/Cli/starters/basic/postcss.config.js +6 -0
- package/data/Cli/starters/basic/schema.prisma +42 -0
- package/data/Cli/starters/basic/src/App.css +13 -0
- package/data/Cli/starters/basic/src/App.tsx +12 -0
- package/data/Cli/starters/basic/src/assets/logo.svg +1 -0
- package/data/Cli/starters/basic/src/auth/AuthLayout.tsx +10 -0
- package/data/Cli/starters/basic/src/auth/email/EmailVerificationPage.tsx +19 -0
- package/data/Cli/starters/basic/src/auth/email/LoginPage.tsx +27 -0
- package/data/Cli/starters/basic/src/auth/email/PasswordResetPage.tsx +19 -0
- package/data/Cli/starters/basic/src/auth/email/RequestPasswordResetPage.tsx +10 -0
- package/data/Cli/starters/basic/src/auth/email/SignupPage.tsx +34 -0
- package/data/Cli/starters/basic/src/auth/email/userSignupFields.ts +13 -0
- package/data/Cli/starters/basic/src/shared/components/Button.tsx +90 -0
- package/data/Cli/starters/basic/src/shared/components/Dialog.tsx +85 -0
- package/data/Cli/starters/basic/src/shared/components/Header.tsx +39 -0
- package/data/Cli/starters/basic/src/shared/components/Input.tsx +36 -0
- package/data/Cli/starters/basic/src/shared/components/Portal.tsx +26 -0
- package/data/Cli/starters/basic/src/tags/actions.ts +23 -0
- package/data/Cli/starters/basic/src/tags/components/ColorRadioButton.tsx +44 -0
- package/data/Cli/starters/basic/src/tags/components/ColorRadioButtons.tsx +59 -0
- package/data/Cli/starters/basic/src/tags/components/CreateTagDialog.tsx +50 -0
- package/data/Cli/starters/basic/src/tags/components/CreateTagForm.tsx +100 -0
- package/data/Cli/starters/basic/src/tags/components/TagLabel.tsx +55 -0
- package/data/Cli/starters/basic/src/tags/components/colors.ts +8 -0
- package/data/Cli/starters/basic/src/tags/queries.ts +14 -0
- package/data/Cli/starters/basic/src/tasks/TasksPage.tsx +19 -0
- package/data/Cli/starters/basic/src/tasks/actions.ts +71 -0
- package/data/Cli/starters/basic/src/tasks/components/CreateTaskForm.tsx +103 -0
- package/data/Cli/starters/basic/src/tasks/components/TaskList.tsx +68 -0
- package/data/Cli/starters/basic/src/tasks/components/TaskListItem.tsx +56 -0
- package/data/Cli/starters/basic/src/tasks/queries.ts +21 -0
- package/data/Cli/starters/basic/tailwind.config.js +30 -0
- package/data/Cli/starters/basic/vite.config.ts +7 -0
- package/data/Cli/starters/minimal/main.wasp +14 -0
- package/data/Cli/starters/minimal/package.json +18 -0
- package/data/Cli/starters/minimal/schema.prisma +10 -0
- package/data/Cli/starters/minimal/src/Main.css +103 -0
- package/data/Cli/starters/minimal/src/MainPage.tsx +37 -0
- package/data/Cli/starters/minimal/src/assets/logo.svg +1 -0
- package/data/Cli/starters/minimal/vite.config.ts +7 -0
- package/data/Cli/starters/skeleton/public/favicon.ico +0 -0
- package/data/Cli/starters/skeleton/src/vite-env.d.ts +7 -0
- package/data/Cli/starters/skeleton/tsconfig.json +28 -0
- package/data/Generator/templates/Dockerfile +78 -0
- package/data/Generator/templates/db/schema.prisma +24 -0
- package/data/Generator/templates/dockerignore +2 -0
- package/data/Generator/templates/react-app/README.md +21 -0
- package/data/Generator/templates/react-app/gitignore +23 -0
- package/data/Generator/templates/react-app/index.html +22 -0
- package/data/Generator/templates/react-app/netlify.toml +8 -0
- package/data/Generator/templates/react-app/npmrc +1 -0
- package/data/Generator/templates/react-app/package.json +31 -0
- package/data/Generator/templates/react-app/public/manifest.json +15 -0
- package/data/Generator/templates/react-app/src/auth/pages/OAuthCallback.tsx +93 -0
- package/data/Generator/templates/react-app/src/auth/pages/createAuthRequiredPage.jsx +40 -0
- package/data/Generator/templates/react-app/src/components/DefaultRootErrorBoundary.tsx +16 -0
- package/data/Generator/templates/react-app/src/components/FullPageWrapper.tsx +21 -0
- package/data/Generator/templates/react-app/src/components/Loader.module.css +37 -0
- package/data/Generator/templates/react-app/src/components/Loader.tsx +12 -0
- package/data/Generator/templates/react-app/src/components/Message.tsx +86 -0
- package/data/Generator/templates/react-app/src/index.tsx +47 -0
- package/data/Generator/templates/react-app/src/logo.png +0 -0
- package/data/Generator/templates/react-app/src/router.tsx +59 -0
- package/data/Generator/templates/react-app/src/test/vitest/setup.ts +8 -0
- package/data/Generator/templates/react-app/src/utils.js +3 -0
- package/data/Generator/templates/react-app/src/vite-env.d.ts +1 -0
- package/data/Generator/templates/react-app/tsconfig.app.json +28 -0
- package/data/Generator/templates/react-app/tsconfig.json +11 -0
- package/data/Generator/templates/react-app/tsconfig.vite.json +16 -0
- package/data/Generator/templates/react-app/vite/detectServerImports.ts +53 -0
- package/data/Generator/templates/react-app/vite/validateEnv.ts +45 -0
- package/data/Generator/templates/react-app/vite.config.ts +74 -0
- package/data/Generator/templates/sdk/wasp/api/events.ts +11 -0
- package/data/Generator/templates/sdk/wasp/api/index.ts +136 -0
- package/data/Generator/templates/sdk/wasp/auth/email/actions/login.ts +13 -0
- package/data/Generator/templates/sdk/wasp/auth/email/actions/passwordReset.ts +22 -0
- package/data/Generator/templates/sdk/wasp/auth/email/actions/signup.ts +20 -0
- package/data/Generator/templates/sdk/wasp/auth/email/actions/verifyEmail.ts +14 -0
- package/data/Generator/templates/sdk/wasp/auth/email/index.ts +5 -0
- package/data/Generator/templates/sdk/wasp/auth/forms/Auth.module.css +16 -0
- package/data/Generator/templates/sdk/wasp/auth/forms/Auth.tsx +94 -0
- package/data/Generator/templates/sdk/wasp/auth/forms/ForgotPassword.tsx +18 -0
- package/data/Generator/templates/sdk/wasp/auth/forms/Login.tsx +18 -0
- package/data/Generator/templates/sdk/wasp/auth/forms/ResetPassword.tsx +18 -0
- package/data/Generator/templates/sdk/wasp/auth/forms/Signup.tsx +24 -0
- package/data/Generator/templates/sdk/wasp/auth/forms/VerifyEmail.tsx +18 -0
- package/data/Generator/templates/sdk/wasp/auth/forms/internal/Form.module.css +99 -0
- package/data/Generator/templates/sdk/wasp/auth/forms/internal/Form.tsx +74 -0
- package/data/Generator/templates/sdk/wasp/auth/forms/internal/Message.module.css +22 -0
- package/data/Generator/templates/sdk/wasp/auth/forms/internal/Message.tsx +34 -0
- package/data/Generator/templates/sdk/wasp/auth/forms/internal/auth-styles.css +30 -0
- package/data/Generator/templates/sdk/wasp/auth/forms/internal/common/LoginSignupForm.module.css +55 -0
- package/data/Generator/templates/sdk/wasp/auth/forms/internal/common/LoginSignupForm.tsx +291 -0
- package/data/Generator/templates/sdk/wasp/auth/forms/internal/email/ForgotPasswordForm.tsx +52 -0
- package/data/Generator/templates/sdk/wasp/auth/forms/internal/email/ResetPasswordForm.tsx +82 -0
- package/data/Generator/templates/sdk/wasp/auth/forms/internal/email/VerifyEmailForm.tsx +43 -0
- package/data/Generator/templates/sdk/wasp/auth/forms/internal/email/useEmail.ts +33 -0
- package/data/Generator/templates/sdk/wasp/auth/forms/internal/social/SocialButton.module.css +33 -0
- package/data/Generator/templates/sdk/wasp/auth/forms/internal/social/SocialButton.tsx +14 -0
- package/data/Generator/templates/sdk/wasp/auth/forms/internal/social/SocialIcons.module.css +4 -0
- package/data/Generator/templates/sdk/wasp/auth/forms/internal/social/SocialIcons.tsx +74 -0
- package/data/Generator/templates/sdk/wasp/auth/forms/internal/usernameAndPassword/useUsernameAndPassword.ts +29 -0
- package/data/Generator/templates/sdk/wasp/auth/forms/internal/util.ts +16 -0
- package/data/Generator/templates/sdk/wasp/auth/forms/types.ts +77 -0
- package/data/Generator/templates/sdk/wasp/auth/helpers/_Provider.tsx +17 -0
- package/data/Generator/templates/sdk/wasp/auth/helpers/user.ts +15 -0
- package/data/Generator/templates/sdk/wasp/auth/index.ts +9 -0
- package/data/Generator/templates/sdk/wasp/auth/jwt.ts +22 -0
- package/data/Generator/templates/sdk/wasp/auth/logout.ts +18 -0
- package/data/Generator/templates/sdk/wasp/auth/lucia.ts +53 -0
- package/data/Generator/templates/sdk/wasp/auth/password.ts +36 -0
- package/data/Generator/templates/sdk/wasp/auth/providers/index.ts +9 -0
- package/data/Generator/templates/sdk/wasp/auth/providers/types.ts +68 -0
- package/data/Generator/templates/sdk/wasp/auth/session.ts +78 -0
- package/data/Generator/templates/sdk/wasp/auth/types.ts +2 -0
- package/data/Generator/templates/sdk/wasp/auth/useAuth.ts +37 -0
- package/data/Generator/templates/sdk/wasp/auth/user.ts +63 -0
- package/data/Generator/templates/sdk/wasp/auth/username/actions/login.ts +13 -0
- package/data/Generator/templates/sdk/wasp/auth/username/actions/signup.ts +20 -0
- package/data/Generator/templates/sdk/wasp/auth/username/index.ts +2 -0
- package/data/Generator/templates/sdk/wasp/auth/utils.ts +369 -0
- package/data/Generator/templates/sdk/wasp/auth/validation.ts +83 -0
- package/data/Generator/templates/sdk/wasp/client/auth/discord.ts +2 -0
- package/data/Generator/templates/sdk/wasp/client/auth/email.ts +5 -0
- package/data/Generator/templates/sdk/wasp/client/auth/github.ts +2 -0
- package/data/Generator/templates/sdk/wasp/client/auth/google.ts +2 -0
- package/data/Generator/templates/sdk/wasp/client/auth/index.ts +29 -0
- package/data/Generator/templates/sdk/wasp/client/auth/keycloak.ts +2 -0
- package/data/Generator/templates/sdk/wasp/client/auth/slack.ts +2 -0
- package/data/Generator/templates/sdk/wasp/client/auth/ui.ts +32 -0
- package/data/Generator/templates/sdk/wasp/client/auth/username.ts +2 -0
- package/data/Generator/templates/sdk/wasp/client/config.ts +15 -0
- package/data/Generator/templates/sdk/wasp/client/crud/_crud.ts +89 -0
- package/data/Generator/templates/sdk/wasp/client/crud/index.ts +4 -0
- package/data/Generator/templates/sdk/wasp/client/crud/operationsHelpers.ts +21 -0
- package/data/Generator/templates/sdk/wasp/client/env/schema.ts +22 -0
- package/data/Generator/templates/sdk/wasp/client/env.ts +5 -0
- package/data/Generator/templates/sdk/wasp/client/hooks.ts +19 -0
- package/data/Generator/templates/sdk/wasp/client/index.ts +17 -0
- package/data/Generator/templates/sdk/wasp/client/operations/actions/core.ts +49 -0
- package/data/Generator/templates/sdk/wasp/client/operations/actions/index.ts +13 -0
- package/data/Generator/templates/sdk/wasp/client/operations/hooks.ts +347 -0
- package/data/Generator/templates/sdk/wasp/client/operations/index.ts +22 -0
- package/data/Generator/templates/sdk/wasp/client/operations/internal/index.ts +22 -0
- package/data/Generator/templates/sdk/wasp/client/operations/internal/resources.js +83 -0
- package/data/Generator/templates/sdk/wasp/client/operations/internal/updateHandlersMap.js +37 -0
- package/data/Generator/templates/sdk/wasp/client/operations/queries/core.ts +91 -0
- package/data/Generator/templates/sdk/wasp/client/operations/queries/index.ts +16 -0
- package/data/Generator/templates/sdk/wasp/client/operations/queryClient.ts +34 -0
- package/data/Generator/templates/sdk/wasp/client/operations/rpc.ts +96 -0
- package/data/Generator/templates/sdk/wasp/client/router/Link.tsx +21 -0
- package/data/Generator/templates/sdk/wasp/client/router/index.ts +53 -0
- package/data/Generator/templates/sdk/wasp/client/router/linkHelpers.ts +48 -0
- package/data/Generator/templates/sdk/wasp/client/router/types.ts +98 -0
- package/data/Generator/templates/sdk/wasp/client/test/index.ts +1 -0
- package/data/Generator/templates/sdk/wasp/client/test/vitest/helpers.tsx +95 -0
- package/data/Generator/templates/sdk/wasp/client/webSocket/WebSocketProvider.tsx +77 -0
- package/data/Generator/templates/sdk/wasp/client/webSocket/index.ts +39 -0
- package/data/Generator/templates/sdk/wasp/core/auth.ts +40 -0
- package/data/Generator/templates/sdk/wasp/core/serialization/custom-register.ts +21 -0
- package/data/Generator/templates/sdk/wasp/core/serialization/index.ts +56 -0
- package/data/Generator/templates/sdk/wasp/core/serialization/prisma.ts +54 -0
- package/data/Generator/templates/sdk/wasp/core/storage.ts +50 -0
- package/data/Generator/templates/sdk/wasp/dev/index.ts +19 -0
- package/data/Generator/templates/sdk/wasp/entities/index.ts +28 -0
- package/data/Generator/templates/sdk/wasp/env/index.ts +9 -0
- package/data/Generator/templates/sdk/wasp/env/validation.ts +38 -0
- package/data/Generator/templates/sdk/wasp/package.json +152 -0
- package/data/Generator/templates/sdk/wasp/prisma-runtime-library.d.ts +17 -0
- package/data/Generator/templates/sdk/wasp/scripts/copy-assets.js +14 -0
- package/data/Generator/templates/sdk/wasp/server/HttpError.ts +30 -0
- package/data/Generator/templates/sdk/wasp/server/_types/index.ts +105 -0
- package/data/Generator/templates/sdk/wasp/server/_types/taggedEntities.ts +26 -0
- package/data/Generator/templates/sdk/wasp/server/api/index.ts +44 -0
- package/data/Generator/templates/sdk/wasp/server/auth/email/index.ts +20 -0
- package/data/Generator/templates/sdk/wasp/server/auth/email/utils.ts +104 -0
- package/data/Generator/templates/sdk/wasp/server/auth/hooks.ts +188 -0
- package/data/Generator/templates/sdk/wasp/server/auth/index.ts +49 -0
- package/data/Generator/templates/sdk/wasp/server/auth/oauth/index.ts +38 -0
- package/data/Generator/templates/sdk/wasp/server/auth/oauth/oneTimeCode.ts +50 -0
- package/data/Generator/templates/sdk/wasp/server/auth/oauth/provider.ts +20 -0
- package/data/Generator/templates/sdk/wasp/server/auth/oauth/providers/discord.ts +22 -0
- package/data/Generator/templates/sdk/wasp/server/auth/oauth/providers/github.ts +20 -0
- package/data/Generator/templates/sdk/wasp/server/auth/oauth/providers/google.ts +22 -0
- package/data/Generator/templates/sdk/wasp/server/auth/oauth/providers/keycloak.ts +23 -0
- package/data/Generator/templates/sdk/wasp/server/auth/oauth/providers/slack.ts +22 -0
- package/data/Generator/templates/sdk/wasp/server/auth/oauth/redirect.ts +43 -0
- package/data/Generator/templates/sdk/wasp/server/auth/user.ts +148 -0
- package/data/Generator/templates/sdk/wasp/server/auth/username.ts +1 -0
- package/data/Generator/templates/sdk/wasp/server/config.ts +47 -0
- package/data/Generator/templates/sdk/wasp/server/crud/_operationTypes.ts +134 -0
- package/data/Generator/templates/sdk/wasp/server/crud/index.ts +5 -0
- package/data/Generator/templates/sdk/wasp/server/dbClient.ts +35 -0
- package/data/Generator/templates/sdk/wasp/server/email/core/helpers.ts +40 -0
- package/data/Generator/templates/sdk/wasp/server/email/core/index.ts +17 -0
- package/data/Generator/templates/sdk/wasp/server/email/core/providers/dummy.ts +34 -0
- package/data/Generator/templates/sdk/wasp/server/email/core/providers/mailgun.ts +31 -0
- package/data/Generator/templates/sdk/wasp/server/email/core/providers/sendgrid.ts +44 -0
- package/data/Generator/templates/sdk/wasp/server/email/core/providers/smtp.ts +29 -0
- package/data/Generator/templates/sdk/wasp/server/email/core/types.ts +59 -0
- package/data/Generator/templates/sdk/wasp/server/email/index.ts +39 -0
- package/data/Generator/templates/sdk/wasp/server/env.ts +173 -0
- package/data/Generator/templates/sdk/wasp/server/index.ts +17 -0
- package/data/Generator/templates/sdk/wasp/server/jobs/_job.ts +39 -0
- package/data/Generator/templates/sdk/wasp/server/jobs/core/job.ts +28 -0
- package/data/Generator/templates/sdk/wasp/server/jobs/core/pgBoss/index.ts +3 -0
- package/data/Generator/templates/sdk/wasp/server/jobs/core/pgBoss/pgBoss.ts +76 -0
- package/data/Generator/templates/sdk/wasp/server/jobs/core/pgBoss/pgBossJob.ts +230 -0
- package/data/Generator/templates/sdk/wasp/server/jobs/core/pgBoss/types.ts +9 -0
- package/data/Generator/templates/sdk/wasp/server/jobs/index.ts +5 -0
- package/data/Generator/templates/sdk/wasp/server/middleware/globalMiddleware.ts +8 -0
- package/data/Generator/templates/sdk/wasp/server/middleware/index.ts +1 -0
- package/data/Generator/templates/sdk/wasp/server/operations/actions/index.ts +41 -0
- package/data/Generator/templates/sdk/wasp/server/operations/actions/types.ts +35 -0
- package/data/Generator/templates/sdk/wasp/server/operations/index.ts +13 -0
- package/data/Generator/templates/sdk/wasp/server/operations/queries/index.ts +42 -0
- package/data/Generator/templates/sdk/wasp/server/operations/queries/types.ts +36 -0
- package/data/Generator/templates/sdk/wasp/server/operations/wrappers.ts +242 -0
- package/data/Generator/templates/sdk/wasp/server/types/index.ts +11 -0
- package/data/Generator/templates/sdk/wasp/server/utils.ts +38 -0
- package/data/Generator/templates/sdk/wasp/server/webSocket/index.ts +57 -0
- package/data/Generator/templates/sdk/wasp/tsconfig.json +102 -0
- package/data/Generator/templates/sdk/wasp/universal/ansiColors.ts +14 -0
- package/data/Generator/templates/sdk/wasp/universal/predicates.ts +3 -0
- package/data/Generator/templates/sdk/wasp/universal/types.ts +74 -0
- package/data/Generator/templates/sdk/wasp/universal/url.ts +9 -0
- package/data/Generator/templates/sdk/wasp/universal/validators.ts +21 -0
- package/data/Generator/templates/sdk/wasp/vite-env.d.ts +1 -0
- package/data/Generator/templates/server/README.md +1 -0
- package/data/Generator/templates/server/gitignore +6 -0
- package/data/Generator/templates/server/nodemon.json +13 -0
- package/data/Generator/templates/server/npmrc +1 -0
- package/data/Generator/templates/server/package.json +27 -0
- package/data/Generator/templates/server/rollup.config.js +44 -0
- package/data/Generator/templates/server/src/actions/_action.ts +18 -0
- package/data/Generator/templates/server/src/app.js +36 -0
- package/data/Generator/templates/server/src/auth/hooks.ts +135 -0
- package/data/Generator/templates/server/src/auth/providers/config/discord.ts +69 -0
- package/data/Generator/templates/server/src/auth/providers/config/email.ts +96 -0
- package/data/Generator/templates/server/src/auth/providers/config/github.ts +78 -0
- package/data/Generator/templates/server/src/auth/providers/config/google.ts +65 -0
- package/data/Generator/templates/server/src/auth/providers/config/keycloak.ts +67 -0
- package/data/Generator/templates/server/src/auth/providers/config/slack.ts +65 -0
- package/data/Generator/templates/server/src/auth/providers/config/username.ts +33 -0
- package/data/Generator/templates/server/src/auth/providers/email/login.ts +66 -0
- package/data/Generator/templates/server/src/auth/providers/email/requestPasswordReset.ts +74 -0
- package/data/Generator/templates/server/src/auth/providers/email/resetPassword.ts +48 -0
- package/data/Generator/templates/server/src/auth/providers/email/signup.ts +165 -0
- package/data/Generator/templates/server/src/auth/providers/email/verifyEmail.ts +42 -0
- package/data/Generator/templates/server/src/auth/providers/index.ts +32 -0
- package/data/Generator/templates/server/src/auth/providers/oauth/config.ts +19 -0
- package/data/Generator/templates/server/src/auth/providers/oauth/cookies.ts +35 -0
- package/data/Generator/templates/server/src/auth/providers/oauth/handler.ts +130 -0
- package/data/Generator/templates/server/src/auth/providers/oauth/oneTimeCode.ts +39 -0
- package/data/Generator/templates/server/src/auth/providers/oauth/state.ts +144 -0
- package/data/Generator/templates/server/src/auth/providers/oauth/types.ts +7 -0
- package/data/Generator/templates/server/src/auth/providers/oauth/user.ts +139 -0
- package/data/Generator/templates/server/src/auth/providers/username/login.ts +64 -0
- package/data/Generator/templates/server/src/auth/providers/username/signup.ts +59 -0
- package/data/Generator/templates/server/src/crud/_operations.ts +184 -0
- package/data/Generator/templates/server/src/dbSeed.ts +37 -0
- package/data/Generator/templates/server/src/jobs/_job.ts +9 -0
- package/data/Generator/templates/server/src/jobs/core/allJobs.ts +8 -0
- package/data/Generator/templates/server/src/middleware/globalMiddleware.ts +45 -0
- package/data/Generator/templates/server/src/middleware/index.ts +1 -0
- package/data/Generator/templates/server/src/middleware/operations.ts +28 -0
- package/data/Generator/templates/server/src/queries/_query.ts +18 -0
- package/data/Generator/templates/server/src/routes/apis/index.ts +67 -0
- package/data/Generator/templates/server/src/routes/auth/index.js +16 -0
- package/data/Generator/templates/server/src/routes/auth/logout.ts +12 -0
- package/data/Generator/templates/server/src/routes/auth/me.ts +10 -0
- package/data/Generator/templates/server/src/routes/crud/_crud.ts +46 -0
- package/data/Generator/templates/server/src/routes/crud/index.ts +12 -0
- package/data/Generator/templates/server/src/routes/index.js +55 -0
- package/data/Generator/templates/server/src/routes/operations/_action.js +5 -0
- package/data/Generator/templates/server/src/routes/operations/_query.js +5 -0
- package/data/Generator/templates/server/src/routes/operations/index.js +18 -0
- package/data/Generator/templates/server/src/server.ts +76 -0
- package/data/Generator/templates/server/src/views/wrong-port.ts +123 -0
- package/data/Generator/templates/server/src/webSocket/initialization.ts +59 -0
- package/data/Generator/templates/server/tsconfig.json +41 -0
- package/data/Lsp/templates/ts/action.fn.ts +12 -0
- package/data/Lsp/templates/ts/operation.fn.js +7 -0
- package/data/Lsp/templates/ts/page.component.jsx +9 -0
- package/data/Lsp/templates/ts/query.fn.ts +12 -0
- package/data/packages/deploy/dist/common/brandedTypes.js +2 -0
- package/data/packages/deploy/dist/common/clientApp.js +26 -0
- package/data/packages/deploy/dist/common/commander.js +8 -0
- package/data/packages/deploy/dist/common/random.js +5 -0
- package/data/packages/deploy/dist/common/terminal.js +24 -0
- package/data/packages/deploy/dist/common/typeUtils.js +2 -0
- package/data/packages/deploy/dist/common/validation.js +14 -0
- package/data/packages/deploy/dist/common/waspBuild.js +21 -0
- package/data/packages/deploy/dist/common/waspProject.js +43 -0
- package/data/packages/deploy/dist/common/zx.js +10 -0
- package/data/packages/deploy/dist/index.js +30 -0
- package/data/packages/deploy/dist/providers/fly/CommonCmdOptions.js +2 -0
- package/data/packages/deploy/dist/providers/fly/CommonOps.js +36 -0
- package/data/packages/deploy/dist/providers/fly/DeploymentInstructions.js +12 -0
- package/data/packages/deploy/dist/providers/fly/commands/cmd/CmdCmdOptions.js +2 -0
- package/data/packages/deploy/dist/providers/fly/commands/cmd/cmd.js +29 -0
- package/data/packages/deploy/dist/providers/fly/commands/createDb/CreateDbCmdOptions.js +2 -0
- package/data/packages/deploy/dist/providers/fly/commands/createDb/createDb.js +55 -0
- package/data/packages/deploy/dist/providers/fly/commands/deploy/DeployCmdOptions.js +2 -0
- package/data/packages/deploy/dist/providers/fly/commands/deploy/deploy.js +88 -0
- package/data/packages/deploy/dist/providers/fly/commands/launch/LaunchCmdOptions.js +2 -0
- package/data/packages/deploy/dist/providers/fly/commands/launch/launch.js +17 -0
- package/data/packages/deploy/dist/providers/fly/commands/setup/SetupCmdOptions.js +2 -0
- package/data/packages/deploy/dist/providers/fly/commands/setup/setup.js +141 -0
- package/data/packages/deploy/dist/providers/fly/flyAppUrl.js +4 -0
- package/data/packages/deploy/dist/providers/fly/flyCli.js +74 -0
- package/data/packages/deploy/dist/providers/fly/index.js +121 -0
- package/data/packages/deploy/dist/providers/fly/jsonOutputSchemas.js +37 -0
- package/data/packages/deploy/dist/providers/fly/tomlFile.js +65 -0
- package/data/packages/deploy/dist/providers/railway/DeploymentInstructions.js +11 -0
- package/data/packages/deploy/dist/providers/railway/brandedTypes.js +2 -0
- package/data/packages/deploy/dist/providers/railway/commands/deploy/DeployCmdOptions.js +2 -0
- package/data/packages/deploy/dist/providers/railway/commands/deploy/client.js +22 -0
- package/data/packages/deploy/dist/providers/railway/commands/deploy/common.js +40 -0
- package/data/packages/deploy/dist/providers/railway/commands/deploy/index.js +57 -0
- package/data/packages/deploy/dist/providers/railway/commands/deploy/server.js +17 -0
- package/data/packages/deploy/dist/providers/railway/commands/launch/LaunchCmdOptions.js +2 -0
- package/data/packages/deploy/dist/providers/railway/commands/launch/launch.js +9 -0
- package/data/packages/deploy/dist/providers/railway/commands/setup/SetupCmdOptions.js +2 -0
- package/data/packages/deploy/dist/providers/railway/commands/setup/setup.js +146 -0
- package/data/packages/deploy/dist/providers/railway/index.js +83 -0
- package/data/packages/deploy/dist/providers/railway/jsonOutputSchemas.js +19 -0
- package/data/packages/deploy/dist/providers/railway/ports.js +6 -0
- package/data/packages/deploy/dist/providers/railway/railwayCli.js +85 -0
- package/data/packages/deploy/dist/providers/railway/railwayProject/RailwayProject.js +14 -0
- package/data/packages/deploy/dist/providers/railway/railwayProject/cli.js +80 -0
- package/data/packages/deploy/dist/providers/railway/railwayProject/index.js +48 -0
- package/data/packages/deploy/dist/providers/railway/railwayService/nameGenerator.js +24 -0
- package/data/packages/deploy/dist/providers/railway/railwayService/url.js +32 -0
- package/data/packages/deploy/package-lock.json +3536 -0
- package/data/packages/deploy/package.json +29 -0
- package/data/packages/prisma/dist/format.js +35 -0
- package/data/packages/prisma/dist/index.js +33 -0
- package/data/packages/prisma/package-lock.json +5101 -0
- package/data/packages/prisma/package.json +30 -0
- package/data/packages/studio/dist/index.js +48 -0
- package/data/packages/studio/dist/public/assets/Flow-b5112d3d.js +26 -0
- package/data/packages/studio/dist/public/assets/index-17ce6ed4.css +1 -0
- package/data/packages/studio/dist/public/assets/index-62a9d21a.js +120 -0
- package/data/packages/studio/dist/public/index.html +14 -0
- package/data/packages/studio/package-lock.json +1866 -0
- package/data/packages/studio/package.json +33 -0
- package/data/packages/ts-inspect/dist/exports.js +82 -0
- package/data/packages/ts-inspect/dist/index.js +28 -0
- package/data/packages/ts-inspect/package-lock.json +4947 -0
- package/data/packages/ts-inspect/package.json +31 -0
- package/data/packages/wasp-config/dist/__tests__/appAnalyzer.unit.test.d.ts +2 -0
- package/data/packages/wasp-config/dist/__tests__/appAnalyzer.unit.test.d.ts.map +1 -0
- package/data/packages/wasp-config/dist/__tests__/appAnalyzer.unit.test.js +59 -0
- package/data/packages/wasp-config/dist/__tests__/cli.unit.test.d.ts +2 -0
- package/data/packages/wasp-config/dist/__tests__/cli.unit.test.d.ts.map +1 -0
- package/data/packages/wasp-config/dist/__tests__/cli.unit.test.js +65 -0
- package/data/packages/wasp-config/dist/__tests__/mapTsAppSpecToAppSpecDecls.integration.test.d.ts +2 -0
- package/data/packages/wasp-config/dist/__tests__/mapTsAppSpecToAppSpecDecls.integration.test.d.ts.map +1 -0
- package/data/packages/wasp-config/dist/__tests__/mapTsAppSpecToAppSpecDecls.integration.test.js +126 -0
- package/data/packages/wasp-config/dist/__tests__/mapTsAppSpecToAppSpecDecls.unit.test.d.ts +2 -0
- package/data/packages/wasp-config/dist/__tests__/mapTsAppSpecToAppSpecDecls.unit.test.d.ts.map +1 -0
- package/data/packages/wasp-config/dist/__tests__/mapTsAppSpecToAppSpecDecls.unit.test.js +743 -0
- package/data/packages/wasp-config/dist/__tests__/testFixtures.d.ts +224 -0
- package/data/packages/wasp-config/dist/__tests__/testFixtures.d.ts.map +1 -0
- package/data/packages/wasp-config/dist/__tests__/testFixtures.js +656 -0
- package/data/packages/wasp-config/dist/__tests__/testFixtures.test-d.d.ts +2 -0
- package/data/packages/wasp-config/dist/__tests__/testFixtures.test-d.d.ts.map +1 -0
- package/data/packages/wasp-config/dist/__tests__/testFixtures.test-d.js +57 -0
- package/data/packages/wasp-config/dist/src/_private.d.ts +2 -0
- package/data/packages/wasp-config/dist/src/_private.d.ts.map +1 -0
- package/data/packages/wasp-config/dist/src/_private.js +1 -0
- package/data/packages/wasp-config/dist/src/appAnalyzer.d.ts +16 -0
- package/data/packages/wasp-config/dist/src/appAnalyzer.d.ts.map +1 -0
- package/data/packages/wasp-config/dist/src/appAnalyzer.js +34 -0
- package/data/packages/wasp-config/dist/src/appSpec.d.ts +223 -0
- package/data/packages/wasp-config/dist/src/appSpec.d.ts.map +1 -0
- package/data/packages/wasp-config/dist/src/appSpec.js +6 -0
- package/data/packages/wasp-config/dist/src/branded.d.ts +7 -0
- package/data/packages/wasp-config/dist/src/branded.d.ts.map +1 -0
- package/data/packages/wasp-config/dist/src/branded.js +1 -0
- package/data/packages/wasp-config/dist/src/cli.d.ts +6 -0
- package/data/packages/wasp-config/dist/src/cli.d.ts.map +1 -0
- package/data/packages/wasp-config/dist/src/cli.js +24 -0
- package/data/packages/wasp-config/dist/src/index.d.ts +8 -0
- package/data/packages/wasp-config/dist/src/index.d.ts.map +1 -0
- package/data/packages/wasp-config/dist/src/index.js +1 -0
- package/data/packages/wasp-config/dist/src/mapTsAppSpecToAppSpecDecls.d.ts +38 -0
- package/data/packages/wasp-config/dist/src/mapTsAppSpecToAppSpecDecls.d.ts.map +1 -0
- package/data/packages/wasp-config/dist/src/mapTsAppSpecToAppSpecDecls.js +294 -0
- package/data/packages/wasp-config/dist/src/publicApi/App.d.ts +24 -0
- package/data/packages/wasp-config/dist/src/publicApi/App.d.ts.map +1 -0
- package/data/packages/wasp-config/dist/src/publicApi/App.js +75 -0
- package/data/packages/wasp-config/dist/src/publicApi/tsAppSpec.d.ts +171 -0
- package/data/packages/wasp-config/dist/src/publicApi/tsAppSpec.d.ts.map +1 -0
- package/data/packages/wasp-config/dist/src/publicApi/tsAppSpec.js +1 -0
- package/data/packages/wasp-config/dist/src/run.d.ts +3 -0
- package/data/packages/wasp-config/dist/src/run.d.ts.map +1 -0
- package/data/packages/wasp-config/dist/src/run.js +18 -0
- package/data/packages/wasp-config/package-lock.json +3992 -0
- package/data/packages/wasp-config/package.json +39 -0
- package/main.js +9 -0
- package/package.json +1 -0
- package/readme.md +3 -0
- package/wasp-bin +0 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{{={= =}=}}
|
|
2
|
+
import { config, HttpError } from '../../index.js'
|
|
3
|
+
|
|
4
|
+
// PRIVATE API (server)
|
|
5
|
+
export const loginPath = '{= serverOAuthLoginHandlerPath =}'
|
|
6
|
+
|
|
7
|
+
// PRIVATE API (server)
|
|
8
|
+
export const exchangeCodeForTokenPath = '{= serverExchangeCodeForTokenHandlerPath =}'
|
|
9
|
+
|
|
10
|
+
// PRIVATE API (server)
|
|
11
|
+
export const callbackPath = '{= serverOAuthCallbackHandlerPath =}'
|
|
12
|
+
|
|
13
|
+
const clientOAuthCallbackPath = '{= clientOAuthCallbackPath =}'
|
|
14
|
+
|
|
15
|
+
// PRIVATE API (server)
|
|
16
|
+
export function getRedirectUriForOneTimeCode(oneTimeCode: string): URL {
|
|
17
|
+
return new URL(`${config.frontendUrl}${clientOAuthCallbackPath}#${oneTimeCode}`);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// PRIVATE API (server)
|
|
21
|
+
export function handleOAuthErrorAndGetRedirectUri(error: unknown): URL {
|
|
22
|
+
if (error instanceof HttpError) {
|
|
23
|
+
const errorMessage = isHttpErrorWithExtraMessage(error)
|
|
24
|
+
? `${error.message}: ${error.data.message}`
|
|
25
|
+
: error.message;
|
|
26
|
+
return getRedirectUriForError(errorMessage)
|
|
27
|
+
}
|
|
28
|
+
console.error("Unknown OAuth error:", error);
|
|
29
|
+
return getRedirectUriForError("An unknown error occurred while trying to log in with the OAuth provider.");
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// PRIVATE API (SDK)
|
|
33
|
+
export function getRedirectUriForCallback(providerName: string): URL {
|
|
34
|
+
return new URL(`${config.serverUrl}/auth/${providerName}/${callbackPath}`);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function getRedirectUriForError(error: string): URL {
|
|
38
|
+
return new URL(`${config.frontendUrl}${clientOAuthCallbackPath}?error=${error}`);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function isHttpErrorWithExtraMessage(error: HttpError): error is HttpError & { data: { message: string } } {
|
|
42
|
+
return !!error.data && typeof (error.data as any).message === 'string';
|
|
43
|
+
}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
{{={= =}=}}
|
|
2
|
+
import {
|
|
3
|
+
type {= userEntityName =},
|
|
4
|
+
type {= authEntityName =},
|
|
5
|
+
type {= authIdentityEntityName =},
|
|
6
|
+
} from '../../entities/index.js'
|
|
7
|
+
import {
|
|
8
|
+
type PossibleProviderData,
|
|
9
|
+
getProviderData,
|
|
10
|
+
} from '../../auth/utils.js'
|
|
11
|
+
import { type ProviderName } from '../_types/index.js'
|
|
12
|
+
import { Expand } from '../../universal/types.js'
|
|
13
|
+
|
|
14
|
+
// PUBLIC API
|
|
15
|
+
export type AuthUser = AuthUserData & {
|
|
16
|
+
getFirstProviderUserId: () => string | null,
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// PRIVATE API
|
|
20
|
+
/*
|
|
21
|
+
* Ideally, we'd do something like this:
|
|
22
|
+
* ```
|
|
23
|
+
* export type AuthUserData = ReturnType<typeof createAuthUserData>
|
|
24
|
+
* ```
|
|
25
|
+
* to get the benefits of the createAuthUser and the AuthUserData type being in sync.
|
|
26
|
+
*
|
|
27
|
+
* But since we are not using strict mode, the inferred return type of createAuthUser
|
|
28
|
+
* is not correct. So we have to define the AuthUserData type manually.
|
|
29
|
+
*
|
|
30
|
+
* TODO: Change this once/if we switch to strict mode. https://github.com/wasp-lang/wasp/issues/1938
|
|
31
|
+
*/
|
|
32
|
+
export type AuthUserData = Omit<CompleteUserEntityWithAuth, '{= authFieldOnUserEntityName =}'> & {
|
|
33
|
+
identities: {
|
|
34
|
+
{=# enabledProviders.isEmailAuthEnabled =}
|
|
35
|
+
email: Expand<UserFacingProviderData<'email'>> | null
|
|
36
|
+
{=/ enabledProviders.isEmailAuthEnabled =}
|
|
37
|
+
{=# enabledProviders.isUsernameAndPasswordAuthEnabled =}
|
|
38
|
+
username: Expand<UserFacingProviderData<'username'>> | null
|
|
39
|
+
{=/ enabledProviders.isUsernameAndPasswordAuthEnabled =}
|
|
40
|
+
{=# enabledProviders.isSlackAuthEnabled =}
|
|
41
|
+
slack: Expand<UserFacingProviderData<'slack'>> | null
|
|
42
|
+
{=/ enabledProviders.isSlackAuthEnabled =}
|
|
43
|
+
{=# enabledProviders.isDiscordAuthEnabled =}
|
|
44
|
+
discord: Expand<UserFacingProviderData<'discord'>> | null
|
|
45
|
+
{=/ enabledProviders.isDiscordAuthEnabled =}
|
|
46
|
+
{=# enabledProviders.isGoogleAuthEnabled =}
|
|
47
|
+
google: Expand<UserFacingProviderData<'google'>> | null
|
|
48
|
+
{=/ enabledProviders.isGoogleAuthEnabled =}
|
|
49
|
+
{=# enabledProviders.isKeycloakAuthEnabled =}
|
|
50
|
+
keycloak: Expand<UserFacingProviderData<'keycloak'>> | null
|
|
51
|
+
{=/ enabledProviders.isKeycloakAuthEnabled =}
|
|
52
|
+
{=# enabledProviders.isGitHubAuthEnabled =}
|
|
53
|
+
github: Expand<UserFacingProviderData<'github'>> | null
|
|
54
|
+
{=/ enabledProviders.isGitHubAuthEnabled =}
|
|
55
|
+
},
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
type UserFacingProviderData<PN extends ProviderName> = {
|
|
59
|
+
id: string
|
|
60
|
+
} & Omit<PossibleProviderData[PN], 'hashedPassword'>
|
|
61
|
+
|
|
62
|
+
// PRIVATE API
|
|
63
|
+
export type CompleteUserEntityWithAuth =
|
|
64
|
+
MakeUserEntityWithAuth<CompleteAuthEntityWithIdentities>
|
|
65
|
+
|
|
66
|
+
// PRIVATE API
|
|
67
|
+
export type CompleteAuthEntityWithIdentities =
|
|
68
|
+
MakeAuthEntityWithIdentities<{= authIdentityEntityName =}>
|
|
69
|
+
|
|
70
|
+
// PRIVATE API
|
|
71
|
+
/**
|
|
72
|
+
* User entity with all of the auth related data that's needed for the user facing
|
|
73
|
+
* helper functions like `getUsername` and `getEmail`.
|
|
74
|
+
*/
|
|
75
|
+
export type UserEntityWithAuth = MakeUserEntityWithAuth<
|
|
76
|
+
MakeAuthEntityWithIdentities<
|
|
77
|
+
// It's constructed like the Complete* types, but only with the fields needed
|
|
78
|
+
// for the user facing functions.
|
|
79
|
+
Pick<{= authIdentityEntityName =}, 'providerName' | 'providerUserId'>
|
|
80
|
+
>
|
|
81
|
+
>
|
|
82
|
+
|
|
83
|
+
type MakeUserEntityWithAuth<AuthType> = {= userEntityName =} & {
|
|
84
|
+
{= authFieldOnUserEntityName =}: AuthType | null
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
type MakeAuthEntityWithIdentities<IdentityType> = {= authEntityName =} & {
|
|
88
|
+
{= identitiesFieldOnAuthEntityName =}: IdentityType[]
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// PRIVATE API
|
|
92
|
+
export function createAuthUserData(user: CompleteUserEntityWithAuth): AuthUserData {
|
|
93
|
+
const { {= authFieldOnUserEntityName =}, ...rest } = user
|
|
94
|
+
if (!{= authFieldOnUserEntityName =}) {
|
|
95
|
+
throw new Error(`🐝 Error: trying to create a user without auth data.
|
|
96
|
+
This should never happen, but it did which means there is a bug in the code.`)
|
|
97
|
+
}
|
|
98
|
+
const identities = {
|
|
99
|
+
{=# enabledProviders.isEmailAuthEnabled =}
|
|
100
|
+
email: getProviderInfo<'email'>({= authFieldOnUserEntityName =}, 'email'),
|
|
101
|
+
{=/ enabledProviders.isEmailAuthEnabled =}
|
|
102
|
+
{=# enabledProviders.isUsernameAndPasswordAuthEnabled =}
|
|
103
|
+
username: getProviderInfo<'username'>({= authFieldOnUserEntityName =}, 'username'),
|
|
104
|
+
{=/ enabledProviders.isUsernameAndPasswordAuthEnabled =}
|
|
105
|
+
{=# enabledProviders.isSlackAuthEnabled =}
|
|
106
|
+
slack: getProviderInfo<'slack'>({= authFieldOnUserEntityName =}, 'slack'),
|
|
107
|
+
{=/ enabledProviders.isSlackAuthEnabled =}
|
|
108
|
+
{=# enabledProviders.isDiscordAuthEnabled =}
|
|
109
|
+
discord: getProviderInfo<'discord'>({= authFieldOnUserEntityName =}, 'discord'),
|
|
110
|
+
{=/ enabledProviders.isDiscordAuthEnabled =}
|
|
111
|
+
{=# enabledProviders.isGoogleAuthEnabled =}
|
|
112
|
+
google: getProviderInfo<'google'>({= authFieldOnUserEntityName =}, 'google'),
|
|
113
|
+
{=/ enabledProviders.isGoogleAuthEnabled =}
|
|
114
|
+
{=# enabledProviders.isKeycloakAuthEnabled =}
|
|
115
|
+
keycloak: getProviderInfo<'keycloak'>({= authFieldOnUserEntityName =}, 'keycloak'),
|
|
116
|
+
{=/ enabledProviders.isKeycloakAuthEnabled =}
|
|
117
|
+
{=# enabledProviders.isGitHubAuthEnabled =}
|
|
118
|
+
github: getProviderInfo<'github'>({= authFieldOnUserEntityName =}, 'github'),
|
|
119
|
+
{=/ enabledProviders.isGitHubAuthEnabled =}
|
|
120
|
+
}
|
|
121
|
+
return {
|
|
122
|
+
...rest,
|
|
123
|
+
identities,
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
function getProviderInfo<PN extends ProviderName>(
|
|
128
|
+
auth: CompleteAuthEntityWithIdentities,
|
|
129
|
+
providerName: PN
|
|
130
|
+
):
|
|
131
|
+
| UserFacingProviderData<PN>
|
|
132
|
+
| null {
|
|
133
|
+
const identity = getIdentity(auth, providerName)
|
|
134
|
+
if (!identity) {
|
|
135
|
+
return null
|
|
136
|
+
}
|
|
137
|
+
return {
|
|
138
|
+
...getProviderData<PN>(identity.providerData),
|
|
139
|
+
id: identity.providerUserId,
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
function getIdentity(
|
|
144
|
+
auth: CompleteAuthEntityWithIdentities,
|
|
145
|
+
providerName: ProviderName
|
|
146
|
+
): {= authIdentityEntityName =} | null {
|
|
147
|
+
return auth.{= identitiesFieldOnAuthEntityName =}.find((i) => i.providerName === providerName) ?? null
|
|
148
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ensureValidUsername } from '../../auth/validation.js'
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{{={= =}=}}
|
|
2
|
+
import { env } from './env.js'
|
|
3
|
+
import { stripTrailingSlash, getOrigin } from '../universal/url.js'
|
|
4
|
+
|
|
5
|
+
type NodeEnv = typeof env.NODE_ENV
|
|
6
|
+
|
|
7
|
+
type Config = {
|
|
8
|
+
env: NodeEnv;
|
|
9
|
+
isDevelopment: boolean;
|
|
10
|
+
port: number;
|
|
11
|
+
databaseUrl: string;
|
|
12
|
+
frontendUrl: string;
|
|
13
|
+
serverUrl: string;
|
|
14
|
+
allowedCORSOrigins: (string | RegExp)[];
|
|
15
|
+
{=# isAuthEnabled =}
|
|
16
|
+
auth: {
|
|
17
|
+
jwtSecret: string;
|
|
18
|
+
}
|
|
19
|
+
{=/ isAuthEnabled =}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const frontendUrl = stripTrailingSlash(env['{= clientUrlEnvVarName =}'])
|
|
23
|
+
const serverUrl = stripTrailingSlash(env['{= serverUrlEnvVarName =}'])
|
|
24
|
+
|
|
25
|
+
const allowedCORSOriginsPerEnv: Record<NodeEnv, Config['allowedCORSOrigins']> = {
|
|
26
|
+
development: [/.*/],
|
|
27
|
+
production: [getOrigin(frontendUrl)]
|
|
28
|
+
}
|
|
29
|
+
const allowedCORSOrigins = allowedCORSOriginsPerEnv[env.NODE_ENV]
|
|
30
|
+
|
|
31
|
+
const config: Config = {
|
|
32
|
+
frontendUrl,
|
|
33
|
+
serverUrl,
|
|
34
|
+
allowedCORSOrigins,
|
|
35
|
+
env: env.NODE_ENV,
|
|
36
|
+
isDevelopment: env.NODE_ENV === 'development',
|
|
37
|
+
port: env.PORT,
|
|
38
|
+
databaseUrl: env.{= databaseUrlEnvVarName =},
|
|
39
|
+
{=# isAuthEnabled =}
|
|
40
|
+
auth: {
|
|
41
|
+
jwtSecret: env["{= jwtSecretEnvVarName =}"]
|
|
42
|
+
}
|
|
43
|
+
{=/ isAuthEnabled =}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// PUBLIC API
|
|
47
|
+
export default config
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
{{={= =}=}}
|
|
2
|
+
import type {
|
|
3
|
+
{=# isAuthEnabled =}
|
|
4
|
+
AuthenticatedActionDefinition,
|
|
5
|
+
AuthenticatedQueryDefinition,
|
|
6
|
+
{=/ isAuthEnabled =}
|
|
7
|
+
{=^ isAuthEnabled =}
|
|
8
|
+
UnauthenticatedActionDefinition,
|
|
9
|
+
UnauthenticatedQueryDefinition,
|
|
10
|
+
{=/ isAuthEnabled =}
|
|
11
|
+
_{= crud.entityUpper =},
|
|
12
|
+
} from "../_types";
|
|
13
|
+
import type { Prisma } from "@prisma/client";
|
|
14
|
+
import type { Payload, SuperJSONObject } from "wasp/core/serialization";
|
|
15
|
+
import type {
|
|
16
|
+
{= crud.entityUpper =},
|
|
17
|
+
} from "wasp/entities";
|
|
18
|
+
{=# overrides.GetAll.isDefined =}
|
|
19
|
+
{=& overrides.GetAll.importStatement =}
|
|
20
|
+
{=/ overrides.GetAll.isDefined =}
|
|
21
|
+
{=# overrides.Get.isDefined =}
|
|
22
|
+
{=& overrides.Get.importStatement =}
|
|
23
|
+
{=/ overrides.Get.isDefined =}
|
|
24
|
+
{=# overrides.Create.isDefined =}
|
|
25
|
+
{=& overrides.Create.importStatement =}
|
|
26
|
+
{=/ overrides.Create.isDefined =}
|
|
27
|
+
{=# overrides.Update.isDefined =}
|
|
28
|
+
{=& overrides.Update.importStatement =}
|
|
29
|
+
{=/ overrides.Update.isDefined =}
|
|
30
|
+
{=# overrides.Delete.isDefined =}
|
|
31
|
+
{=& overrides.Delete.importStatement =}
|
|
32
|
+
{=/ overrides.Delete.isDefined =}
|
|
33
|
+
|
|
34
|
+
type _WaspEntityTagged = _{= crud.entityUpper =}
|
|
35
|
+
type _WaspEntity = {= crud.entityUpper =}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* PUBLIC API
|
|
39
|
+
*/
|
|
40
|
+
export declare namespace {= crud.name =} {
|
|
41
|
+
{=# crud.operations.GetAll =}
|
|
42
|
+
export type GetAllQuery<Input extends Payload = never, Output extends Payload = Payload> = {= queryType =}<[_WaspEntityTagged], Input, Output>
|
|
43
|
+
{=/ crud.operations.GetAll =}
|
|
44
|
+
|
|
45
|
+
{=# crud.operations.Get =}
|
|
46
|
+
export type GetQuery<Input extends Payload = never, Output extends Payload = Payload> = {= queryType =}<[_WaspEntityTagged], Input, Output>
|
|
47
|
+
{=/ crud.operations.Get =}
|
|
48
|
+
|
|
49
|
+
{=# crud.operations.Create =}
|
|
50
|
+
export type CreateAction<Input extends Payload = never, Output extends Payload = Payload> = {= actionType =}<[_WaspEntityTagged], Input, Output>
|
|
51
|
+
{=/ crud.operations.Create =}
|
|
52
|
+
|
|
53
|
+
{=# crud.operations.Update =}
|
|
54
|
+
export type UpdateAction<Input extends Payload = never, Output extends Payload = Payload> = {= actionType =}<[_WaspEntityTagged], Input, Output>
|
|
55
|
+
{=/ crud.operations.Update =}
|
|
56
|
+
|
|
57
|
+
{=# crud.operations.Delete =}
|
|
58
|
+
export type DeleteAction<Input extends Payload = never, Output extends Payload = Payload> = {= actionType =}<[_WaspEntityTagged], Input, Output>
|
|
59
|
+
{=/ crud.operations.Delete =}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* PRIVATE API
|
|
64
|
+
*
|
|
65
|
+
* The types with the `Resolved` suffix are the types that are used internally by the Wasp client
|
|
66
|
+
* to implement full-stack type safety.
|
|
67
|
+
*/
|
|
68
|
+
{=# crud.operations.GetAll =}
|
|
69
|
+
{=^ overrides.GetAll.isDefined =}
|
|
70
|
+
type GetAllInput = {}
|
|
71
|
+
type GetAllOutput = _WaspEntity[]
|
|
72
|
+
export type GetAllQueryResolved = {= crud.name =}.GetAllQuery<GetAllInput, GetAllOutput>
|
|
73
|
+
{=/ overrides.GetAll.isDefined =}
|
|
74
|
+
{=# overrides.GetAll.isDefined =}
|
|
75
|
+
const _waspGetAllQuery = {= overrides.GetAll.importIdentifier =}
|
|
76
|
+
export type GetAllQueryResolved = typeof _waspGetAllQuery
|
|
77
|
+
{=/ overrides.GetAll.isDefined =}
|
|
78
|
+
{=/ crud.operations.GetAll =}
|
|
79
|
+
|
|
80
|
+
{=# crud.operations.Get =}
|
|
81
|
+
{=^ overrides.Get.isDefined =}
|
|
82
|
+
type GetInput = SuperJSONObject & Prisma.{= crud.entityUpper =}WhereUniqueInput
|
|
83
|
+
type GetOutput = _WaspEntity | null
|
|
84
|
+
export type GetQueryResolved = {= crud.name =}.GetQuery<GetInput, GetOutput>
|
|
85
|
+
{=/ overrides.Get.isDefined =}
|
|
86
|
+
{=# overrides.Get.isDefined =}
|
|
87
|
+
const _waspGetQuery = {= overrides.Get.importIdentifier =}
|
|
88
|
+
export type GetQueryResolved = typeof _waspGetQuery
|
|
89
|
+
{=/ overrides.Get.isDefined =}
|
|
90
|
+
{=/ crud.operations.Get =}
|
|
91
|
+
|
|
92
|
+
{=# crud.operations.Create =}
|
|
93
|
+
{=^ overrides.Create.isDefined =}
|
|
94
|
+
type CreateInput = SuperJSONObject & Prisma.XOR<
|
|
95
|
+
Prisma.{= crud.entityUpper =}CreateInput,
|
|
96
|
+
Prisma.{= crud.entityUpper =}UncheckedCreateInput
|
|
97
|
+
>
|
|
98
|
+
type CreateOutput = _WaspEntity
|
|
99
|
+
export type CreateActionResolved = {= crud.name =}.CreateAction<CreateInput, CreateOutput>
|
|
100
|
+
{=/ overrides.Create.isDefined =}
|
|
101
|
+
{=# overrides.Create.isDefined =}
|
|
102
|
+
const _waspCreateAction = {= overrides.Create.importIdentifier =}
|
|
103
|
+
export type CreateActionResolved = typeof _waspCreateAction
|
|
104
|
+
{=/ overrides.Create.isDefined =}
|
|
105
|
+
{=/ crud.operations.Create =}
|
|
106
|
+
|
|
107
|
+
{=# crud.operations.Update =}
|
|
108
|
+
{=^ overrides.Update.isDefined =}
|
|
109
|
+
type UpdateInput = SuperJSONObject & Prisma.XOR<
|
|
110
|
+
Prisma.{= crud.entityUpper =}UpdateInput,
|
|
111
|
+
Prisma.{= crud.entityUpper =}UncheckedUpdateInput
|
|
112
|
+
>
|
|
113
|
+
& Prisma.{= crud.entityUpper =}WhereUniqueInput
|
|
114
|
+
|
|
115
|
+
type UpdateOutput = _WaspEntity
|
|
116
|
+
export type UpdateActionResolved = {= crud.name =}.UpdateAction<UpdateInput, UpdateOutput>
|
|
117
|
+
{=/ overrides.Update.isDefined =}
|
|
118
|
+
{=# overrides.Update.isDefined =}
|
|
119
|
+
const _waspUpdateAction = {= overrides.Update.importIdentifier =}
|
|
120
|
+
export type UpdateActionResolved = typeof _waspUpdateAction
|
|
121
|
+
{=/ overrides.Update.isDefined =}
|
|
122
|
+
{=/ crud.operations.Update =}
|
|
123
|
+
|
|
124
|
+
{=# crud.operations.Delete =}
|
|
125
|
+
{=^ overrides.Delete.isDefined =}
|
|
126
|
+
type DeleteInput = SuperJSONObject & Prisma.{= crud.entityUpper =}WhereUniqueInput
|
|
127
|
+
type DeleteOutput = _WaspEntity
|
|
128
|
+
export type DeleteActionResolved = {= crud.name =}.DeleteAction<DeleteInput, DeleteOutput>
|
|
129
|
+
{=/ overrides.Delete.isDefined =}
|
|
130
|
+
{=# overrides.Delete.isDefined =}
|
|
131
|
+
const _waspDeleteAction = {= overrides.Delete.importIdentifier =}
|
|
132
|
+
export type DeleteActionResolved = typeof _waspDeleteAction
|
|
133
|
+
{=/ overrides.Delete.isDefined =}
|
|
134
|
+
{=/ crud.operations.Delete =}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{{={= =}=}}
|
|
2
|
+
{=# areThereAnyEntitiesDefined =}
|
|
3
|
+
{=# prismaSetupFn.isDefined =}
|
|
4
|
+
{=& prismaSetupFn.importStatement =}
|
|
5
|
+
|
|
6
|
+
function createDbClient() {
|
|
7
|
+
return {= prismaSetupFn.importIdentifier =}()
|
|
8
|
+
}
|
|
9
|
+
{=/ prismaSetupFn.isDefined =}
|
|
10
|
+
{=^ prismaSetupFn.isDefined =}
|
|
11
|
+
import { PrismaClient as InternalPrismaClient } from '@prisma/client'
|
|
12
|
+
|
|
13
|
+
function createDbClient() {
|
|
14
|
+
return new InternalPrismaClient()
|
|
15
|
+
}
|
|
16
|
+
{=/ prismaSetupFn.isDefined =}
|
|
17
|
+
{=/ areThereAnyEntitiesDefined =}
|
|
18
|
+
{=^ areThereAnyEntitiesDefined =}
|
|
19
|
+
// * Prisma will not generate a PrismaClient if there no
|
|
20
|
+
// entities in the schema. Trying to init the PrismaClient
|
|
21
|
+
// will throw an error.
|
|
22
|
+
// * To avoid throwing an error, we return null if there are no
|
|
23
|
+
// entities in the schema.
|
|
24
|
+
function createDbClient(): null {
|
|
25
|
+
return null
|
|
26
|
+
}
|
|
27
|
+
{=/ areThereAnyEntitiesDefined =}
|
|
28
|
+
|
|
29
|
+
const dbClient = createDbClient()
|
|
30
|
+
|
|
31
|
+
// PUBLIC API
|
|
32
|
+
export type PrismaClient = typeof dbClient
|
|
33
|
+
|
|
34
|
+
// PUBLIC API
|
|
35
|
+
export default dbClient
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{{={= =}=}}
|
|
2
|
+
import { EmailFromField } from "./types";
|
|
3
|
+
|
|
4
|
+
// PRIVATE API
|
|
5
|
+
// Formats an email address and an optional name into a string that can be used
|
|
6
|
+
// as the "from" field in an email.
|
|
7
|
+
// { email: "test@test.com, name: "Test" } -> "Test <test@test.com>"
|
|
8
|
+
export function formatFromField({
|
|
9
|
+
email,
|
|
10
|
+
name,
|
|
11
|
+
}: {
|
|
12
|
+
email: string;
|
|
13
|
+
name?: string;
|
|
14
|
+
}): string {
|
|
15
|
+
if (name) {
|
|
16
|
+
return `${name} <${email}>`;
|
|
17
|
+
}
|
|
18
|
+
return email;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
{=# isDefaultFromFieldDefined =}
|
|
22
|
+
// PRIVATE API
|
|
23
|
+
export function getDefaultFromField(): EmailFromField {
|
|
24
|
+
return {
|
|
25
|
+
email: "{= defaultFromField.email =}",
|
|
26
|
+
{=# defaultFromField.isNameDefined =}
|
|
27
|
+
name: "{= defaultFromField.name =}",
|
|
28
|
+
{=/ defaultFromField.isNameDefined =}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
{=/ isDefaultFromFieldDefined =}
|
|
32
|
+
{=^ isDefaultFromFieldDefined =}
|
|
33
|
+
// PRIVATE API
|
|
34
|
+
export function getDefaultFromField(): EmailFromField {
|
|
35
|
+
return {
|
|
36
|
+
email: "",
|
|
37
|
+
name: "",
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
{=/ isDefaultFromFieldDefined =}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{{={= =}=}}
|
|
2
|
+
{=# isSmtpProviderEnabled =}
|
|
3
|
+
// PRIVATE API
|
|
4
|
+
export { initSmtpEmailSender as initEmailSender } from "./providers/smtp.js";
|
|
5
|
+
{=/ isSmtpProviderEnabled =}
|
|
6
|
+
{=# isSendGridProviderEnabled =}
|
|
7
|
+
// PRIVATE API
|
|
8
|
+
export { initSendGridEmailSender as initEmailSender } from "./providers/sendgrid.js";
|
|
9
|
+
{=/ isSendGridProviderEnabled =}
|
|
10
|
+
{=# isMailgunProviderEnabled =}
|
|
11
|
+
// PRIVATE API
|
|
12
|
+
export { initMailgunEmailSender as initEmailSender } from "./providers/mailgun.js";
|
|
13
|
+
{=/ isMailgunProviderEnabled =}
|
|
14
|
+
{=# isDummyProviderEnabled =}
|
|
15
|
+
// PRIVATE API
|
|
16
|
+
export { initDummyEmailSender as initEmailSender } from "./providers/dummy.js";
|
|
17
|
+
{=/ isDummyProviderEnabled =}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { DummyEmailProvider, EmailSender } from "../types";
|
|
2
|
+
import { getDefaultFromField } from "../helpers.js";
|
|
3
|
+
|
|
4
|
+
import { getColorizedConsoleFormatString } from 'wasp/universal/ansiColors'
|
|
5
|
+
|
|
6
|
+
const yellowColorFormatString = getColorizedConsoleFormatString('yellow');
|
|
7
|
+
|
|
8
|
+
// PRIVATE API
|
|
9
|
+
export function initDummyEmailSender(
|
|
10
|
+
config?: DummyEmailProvider,
|
|
11
|
+
): EmailSender {
|
|
12
|
+
const defaultFromField = getDefaultFromField();
|
|
13
|
+
return {
|
|
14
|
+
send: async (email) => {
|
|
15
|
+
const fromField = email.from || defaultFromField;
|
|
16
|
+
|
|
17
|
+
console.log(yellowColorFormatString, '╔═══════════════════════╗');
|
|
18
|
+
console.log(yellowColorFormatString, '║ Dummy email sender ✉️ ║');
|
|
19
|
+
console.log(yellowColorFormatString, '╚═══════════════════════╝');
|
|
20
|
+
console.log(`From: ${fromField.name} <${fromField.email}>`);
|
|
21
|
+
console.log(`To: ${email.to}`);
|
|
22
|
+
console.log(`Subject: ${email.subject}`);
|
|
23
|
+
console.log(yellowColorFormatString, '═════════ Text ═════════');
|
|
24
|
+
console.log(email.text);
|
|
25
|
+
console.log(yellowColorFormatString, '═════════ HTML ═════════');
|
|
26
|
+
console.log(email.html);
|
|
27
|
+
console.log(yellowColorFormatString, '════════════════════════');
|
|
28
|
+
|
|
29
|
+
return {
|
|
30
|
+
success: true,
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import Mailgun from 'mailgun.js';
|
|
2
|
+
import { getDefaultFromField } from "../helpers.js";
|
|
3
|
+
import type { MailgunEmailProvider, EmailSender } from "../types";
|
|
4
|
+
|
|
5
|
+
// PRIVATE API
|
|
6
|
+
export function initMailgunEmailSender(
|
|
7
|
+
config: MailgunEmailProvider
|
|
8
|
+
): EmailSender {
|
|
9
|
+
const defaultFromField = getDefaultFromField();
|
|
10
|
+
|
|
11
|
+
const mailgun = new Mailgun(FormData);
|
|
12
|
+
|
|
13
|
+
const mailer = mailgun.client({
|
|
14
|
+
username: 'api',
|
|
15
|
+
key: config.apiKey,
|
|
16
|
+
url: config.apiUrl,
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
return {
|
|
20
|
+
async send(email) {
|
|
21
|
+
const fromField = email.from || defaultFromField;
|
|
22
|
+
return mailer.messages.create(config.domain, {
|
|
23
|
+
from: `${fromField.name} <${fromField.email}>`,
|
|
24
|
+
to: [email.to],
|
|
25
|
+
subject: email.subject,
|
|
26
|
+
text: email.text,
|
|
27
|
+
html: email.html,
|
|
28
|
+
})
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import SendGrid from "@sendgrid/mail";
|
|
2
|
+
import { getDefaultFromField } from "../helpers.js";
|
|
3
|
+
import type { SendGridProvider, EmailSender } from "../types";
|
|
4
|
+
|
|
5
|
+
// PRIVATE API
|
|
6
|
+
export function initSendGridEmailSender(
|
|
7
|
+
provider: SendGridProvider
|
|
8
|
+
): EmailSender {
|
|
9
|
+
SendGrid.setApiKey(provider.apiKey);
|
|
10
|
+
|
|
11
|
+
const defaultFromField = getDefaultFromField();
|
|
12
|
+
|
|
13
|
+
return {
|
|
14
|
+
async send(email) {
|
|
15
|
+
const fromField = email.from || defaultFromField;
|
|
16
|
+
return SendGrid.send({
|
|
17
|
+
from: {
|
|
18
|
+
email: fromField.email,
|
|
19
|
+
name: fromField.name,
|
|
20
|
+
},
|
|
21
|
+
to: email.to,
|
|
22
|
+
subject: email.subject,
|
|
23
|
+
text: email.text,
|
|
24
|
+
html: email.html,
|
|
25
|
+
}).catch((error) => {
|
|
26
|
+
// SendGrid can return an array of errors in its response,
|
|
27
|
+
// but the client doesn't surface them appropriately.
|
|
28
|
+
// If we find it, we will throw an AggregateError with all the errors
|
|
29
|
+
// so that they are all printed. Otherwise, we will throw the
|
|
30
|
+
// original error.
|
|
31
|
+
|
|
32
|
+
const responseErrors = error?.response?.body?.errors;
|
|
33
|
+
if (responseErrors && Array.isArray(responseErrors)) {
|
|
34
|
+
throw new AggregateError(
|
|
35
|
+
[...responseErrors, error],
|
|
36
|
+
`SendGrid error: ${error.message}`
|
|
37
|
+
);
|
|
38
|
+
} else {
|
|
39
|
+
throw error;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { createTransport } from "nodemailer";
|
|
2
|
+
import { formatFromField, getDefaultFromField } from "../helpers.js";
|
|
3
|
+
import type { SMTPEmailProvider, EmailSender } from "../types";
|
|
4
|
+
|
|
5
|
+
// PRIVATE API
|
|
6
|
+
export function initSmtpEmailSender(config: SMTPEmailProvider): EmailSender {
|
|
7
|
+
const transporter = createTransport({
|
|
8
|
+
host: config.host,
|
|
9
|
+
port: config.port,
|
|
10
|
+
auth: {
|
|
11
|
+
user: config.username,
|
|
12
|
+
pass: config.password,
|
|
13
|
+
},
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
const defaultFromField = getDefaultFromField();
|
|
17
|
+
|
|
18
|
+
return {
|
|
19
|
+
async send(email) {
|
|
20
|
+
return transporter.sendMail({
|
|
21
|
+
from: formatFromField(email.from || defaultFromField),
|
|
22
|
+
to: email.to,
|
|
23
|
+
subject: email.subject,
|
|
24
|
+
text: email.text,
|
|
25
|
+
html: email.html,
|
|
26
|
+
});
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{{={= =}=}}
|
|
2
|
+
// PRIVATE API
|
|
3
|
+
export type EmailProvider = SMTPEmailProvider | SendGridProvider | MailgunEmailProvider | DummyEmailProvider;
|
|
4
|
+
|
|
5
|
+
// PRIVATE API
|
|
6
|
+
export type SMTPEmailProvider = {
|
|
7
|
+
type: "smtp";
|
|
8
|
+
host: string;
|
|
9
|
+
port: number;
|
|
10
|
+
username: string;
|
|
11
|
+
password: string;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
// PRIVATE API
|
|
15
|
+
export type SendGridProvider = {
|
|
16
|
+
type: "sendgrid";
|
|
17
|
+
apiKey: string;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
// PRIVATE API
|
|
21
|
+
export type MailgunEmailProvider = {
|
|
22
|
+
type: "mailgun";
|
|
23
|
+
apiKey: string;
|
|
24
|
+
domain: string;
|
|
25
|
+
apiUrl?: string;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
// PRIVATE API
|
|
29
|
+
export type DummyEmailProvider = {
|
|
30
|
+
type: "dummy";
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// PUBLIC API
|
|
34
|
+
export type EmailSender = {
|
|
35
|
+
send: (email: Email) => Promise<SentMessageInfo>;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
// PUBLIC API
|
|
39
|
+
export type SentMessageInfo = any;
|
|
40
|
+
|
|
41
|
+
// PUBLIC API
|
|
42
|
+
export type Email = {
|
|
43
|
+
{=# isDefaultFromFieldDefined =}
|
|
44
|
+
from?: EmailFromField;
|
|
45
|
+
{=/ isDefaultFromFieldDefined =}
|
|
46
|
+
{=^ isDefaultFromFieldDefined =}
|
|
47
|
+
from: EmailFromField;
|
|
48
|
+
{=/ isDefaultFromFieldDefined =}
|
|
49
|
+
to: string;
|
|
50
|
+
subject: string;
|
|
51
|
+
text: string;
|
|
52
|
+
html: string;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
// PUBLIC API
|
|
56
|
+
export type EmailFromField = {
|
|
57
|
+
name?: string;
|
|
58
|
+
email: string;
|
|
59
|
+
}
|