@wasp.sh/wasp-cli-darwin-x64-unknown 0.25.0 → 0.26.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 +2 -0
- package/data/Cli/starters/basic/README.md +3 -3
- package/data/Cli/starters/basic/src/tags/components/CreateTagForm.tsx +2 -3
- package/data/Cli/starters/basic/vite.config.ts +0 -3
- package/data/Cli/starters/minimal/package.json +4 -1
- package/data/Cli/starters/minimal/vite.config.ts +0 -3
- package/data/Cli/starters/skeleton/AGENTS.md +6 -0
- package/data/Cli/starters/skeleton/CLAUDE.md +6 -0
- package/data/Cli/starters/skeleton/tsconfig.src.json +1 -11
- package/data/Generator/libs/auth/wasp.sh-lib-auth-0.26.0.tgz +0 -0
- package/data/Generator/libs/sdk-core/node_modules/@wasp.sh/lib-auth/wasp.sh-lib-auth-0.26.0.tgz +0 -0
- package/data/Generator/libs/sdk-core/wasp.sh-lib-sdk-core-0.26.0.tgz +0 -0
- package/data/Generator/libs/vite-ssr/{wasp.sh-lib-vite-ssr-0.25.0.tgz → wasp.sh-lib-vite-ssr-0.26.0.tgz} +0 -0
- package/data/Generator/templates/Dockerfile +1 -0
- package/data/Generator/templates/sdk/wasp/api/index.ts +5 -86
- package/data/Generator/templates/sdk/wasp/auth/email/actions/login.ts +2 -2
- package/data/Generator/templates/sdk/wasp/auth/email/actions/passwordReset.ts +1 -1
- package/data/Generator/templates/sdk/wasp/auth/email/actions/signup.ts +7 -6
- package/data/Generator/templates/sdk/wasp/auth/email/actions/verifyEmail.ts +1 -1
- package/data/Generator/templates/sdk/wasp/auth/forms/Auth.tsx +12 -6
- package/data/Generator/templates/sdk/wasp/auth/forms/ForgotPassword.tsx +2 -1
- package/data/Generator/templates/sdk/wasp/auth/forms/Login.tsx +2 -1
- package/data/Generator/templates/sdk/wasp/auth/forms/ResetPassword.tsx +2 -1
- package/data/Generator/templates/sdk/wasp/auth/forms/Signup.tsx +5 -5
- package/data/Generator/templates/sdk/wasp/auth/forms/VerifyEmail.tsx +2 -1
- package/data/Generator/templates/sdk/wasp/auth/forms/internal/common/LoginSignupForm.tsx +34 -33
- package/data/Generator/templates/sdk/wasp/auth/forms/internal/email/DummyEmailSenderNotice.module.css +11 -0
- package/data/Generator/templates/sdk/wasp/auth/forms/internal/email/DummyEmailSenderNotice.tsx +17 -0
- package/data/Generator/templates/sdk/wasp/auth/forms/internal/email/ForgotPasswordForm.tsx +9 -13
- package/data/Generator/templates/sdk/wasp/auth/forms/internal/email/ResetPasswordForm.tsx +8 -9
- package/data/Generator/templates/sdk/wasp/auth/forms/internal/email/VerifyEmailForm.tsx +4 -8
- package/data/Generator/templates/sdk/wasp/auth/forms/internal/email/useEmail.ts +5 -5
- package/data/Generator/templates/sdk/wasp/auth/forms/internal/usernameAndPassword/useUsernameAndPassword.ts +6 -5
- package/data/Generator/templates/sdk/wasp/auth/forms/types.ts +0 -59
- package/data/Generator/templates/sdk/wasp/auth/helpers/_Provider.tsx +2 -2
- package/data/Generator/templates/sdk/wasp/auth/index.ts +1 -1
- package/data/Generator/templates/sdk/wasp/auth/logout.ts +1 -1
- package/data/Generator/templates/sdk/wasp/auth/providers/index.ts +4 -4
- package/data/Generator/templates/sdk/wasp/auth/providers/types.ts +20 -24
- package/data/Generator/templates/sdk/wasp/auth/useAuth.ts +5 -5
- package/data/Generator/templates/sdk/wasp/auth/user.ts +147 -14
- package/data/Generator/templates/sdk/wasp/auth/username/actions/login.ts +2 -2
- package/data/Generator/templates/sdk/wasp/auth/username/actions/signup.ts +6 -5
- package/data/Generator/templates/sdk/wasp/auth/validation.ts +1 -83
- package/data/Generator/templates/sdk/wasp/client/app/pages/OAuthCallback.tsx +8 -5
- package/data/Generator/templates/sdk/wasp/client/app/pages/createAuthRequiredPage.jsx +6 -4
- package/data/Generator/templates/sdk/wasp/client/app/router.tsx +2 -2
- package/data/Generator/templates/sdk/wasp/client/auth/ui.ts +2 -2
- package/data/Generator/templates/sdk/wasp/client/auth/username.ts +2 -2
- package/data/Generator/templates/sdk/wasp/client/config.ts +1 -6
- package/data/Generator/templates/sdk/wasp/client/crud/_crud.ts +129 -75
- package/data/Generator/templates/sdk/wasp/client/env/schema.ts +14 -7
- package/data/Generator/templates/sdk/wasp/client/env.ts +4 -3
- package/data/Generator/templates/sdk/wasp/client/index.ts +3 -12
- package/data/Generator/templates/sdk/wasp/client/operations/actions/core.ts +14 -10
- package/data/Generator/templates/sdk/wasp/client/operations/actions/index.ts +7 -4
- package/data/Generator/templates/sdk/wasp/client/operations/index.ts +5 -5
- package/data/Generator/templates/sdk/wasp/client/operations/internal/index.ts +1 -8
- package/data/Generator/templates/sdk/wasp/client/operations/queries/core.ts +13 -55
- package/data/Generator/templates/sdk/wasp/client/operations/queries/index.ts +7 -7
- package/data/Generator/templates/sdk/wasp/client/router/Link.tsx +8 -8
- package/data/Generator/templates/sdk/wasp/client/router/NavLink.tsx +8 -8
- package/data/Generator/templates/sdk/wasp/client/router/index.ts +15 -15
- package/data/Generator/templates/sdk/wasp/client/test/index.ts +2 -1
- package/data/Generator/templates/sdk/wasp/client/test/vitest/helpers.tsx +5 -36
- package/data/Generator/templates/sdk/wasp/client/vite/index.ts +2 -1
- package/data/Generator/templates/sdk/wasp/client/vite/plugins/virtualUserModules.ts +43 -0
- package/data/Generator/templates/sdk/wasp/client/vite/plugins/{virtualModules.ts → virtualWaspModules.ts} +4 -4
- package/data/Generator/templates/sdk/wasp/client/vite/plugins/wasp.ts +17 -14
- package/data/Generator/templates/sdk/wasp/client/vite/plugins/waspConfig.ts +60 -18
- package/data/Generator/templates/sdk/wasp/client/vite/virtual-files/files/client-entry.tsx +1 -1
- package/data/Generator/templates/sdk/wasp/client/vite/virtual-files/files/routes.tsx +1 -1
- package/data/Generator/templates/sdk/wasp/client/vite/virtual-files/files/ssr-entry.tsx +1 -1
- package/data/Generator/templates/sdk/wasp/client/webSocket/WebSocketProvider.tsx +3 -3
- package/data/Generator/templates/sdk/wasp/client/webSocket/index.ts +1 -1
- package/data/Generator/templates/sdk/wasp/core/serialization/index.ts +2 -47
- package/data/Generator/templates/sdk/wasp/core/serialization/prisma.ts +0 -1
- package/data/Generator/templates/sdk/wasp/entities/index.ts +6 -6
- package/data/Generator/templates/sdk/wasp/env/index.ts +1 -9
- package/data/Generator/templates/sdk/wasp/package.json +150 -104
- package/data/Generator/templates/sdk/wasp/server/_types/index.ts +8 -10
- package/data/Generator/templates/sdk/wasp/server/_types/taggedEntities.ts +4 -4
- package/data/Generator/templates/sdk/wasp/server/api/index.ts +5 -5
- package/data/Generator/templates/sdk/wasp/server/auth/email/index.ts +2 -12
- package/data/Generator/templates/sdk/wasp/server/auth/email/utils.ts +8 -30
- package/data/Generator/templates/sdk/wasp/server/auth/hooks.ts +5 -2
- package/data/Generator/templates/sdk/wasp/server/auth/index.ts +3 -3
- package/data/Generator/templates/sdk/wasp/{auth → server/auth}/jwt.ts +1 -1
- package/data/Generator/templates/sdk/wasp/{auth → server/auth}/lucia.ts +4 -4
- package/data/Generator/templates/sdk/wasp/server/auth/oauth/oneTimeCode.ts +1 -1
- package/data/Generator/templates/sdk/wasp/server/auth/oauth/providers/discord.ts +1 -1
- package/data/Generator/templates/sdk/wasp/server/auth/oauth/providers/github.ts +1 -1
- package/data/Generator/templates/sdk/wasp/server/auth/oauth/providers/google.ts +1 -1
- package/data/Generator/templates/sdk/wasp/server/auth/oauth/providers/keycloak.ts +1 -1
- package/data/Generator/templates/sdk/wasp/server/auth/oauth/providers/microsoft.ts +1 -1
- package/data/Generator/templates/sdk/wasp/server/auth/oauth/providers/slack.ts +1 -1
- package/data/Generator/templates/sdk/wasp/{auth → server/auth}/session.ts +17 -6
- package/data/Generator/templates/sdk/wasp/{auth → server/auth}/utils.ts +40 -183
- package/data/Generator/templates/sdk/wasp/server/config.ts +1 -1
- package/data/Generator/templates/sdk/wasp/{core → server/core}/auth.ts +3 -3
- package/data/Generator/templates/sdk/wasp/server/crud/_operationTypes.ts +16 -63
- package/data/Generator/templates/sdk/wasp/server/dbClient.ts +15 -17
- package/data/Generator/templates/sdk/wasp/server/email/core/helpers.ts +3 -20
- package/data/Generator/templates/sdk/wasp/server/email/core/providers/dummy.ts +2 -2
- package/data/Generator/templates/sdk/wasp/server/email/core/providers/resend.ts +2 -1
- package/data/Generator/templates/sdk/wasp/server/email/core/providers/smtp.ts +2 -1
- package/data/Generator/templates/sdk/wasp/server/email/core/types.ts +2 -45
- package/data/Generator/templates/sdk/wasp/server/email/index.ts +1 -1
- package/data/Generator/templates/sdk/wasp/server/env.ts +20 -11
- package/data/Generator/templates/sdk/wasp/server/index.ts +3 -3
- package/data/Generator/templates/sdk/wasp/server/jobs/_job.ts +1 -1
- package/data/Generator/templates/sdk/wasp/server/jobs/core/pgBoss/index.ts +1 -1
- package/data/Generator/templates/sdk/wasp/server/jobs/core/pgBoss/pgBossJob.ts +4 -4
- package/data/Generator/templates/sdk/wasp/server/jobs/core/pgBoss/types.ts +1 -1
- package/data/Generator/templates/sdk/wasp/server/middleware/index.ts +1 -1
- package/data/Generator/templates/sdk/wasp/server/operations/actions/index.ts +14 -8
- package/data/Generator/templates/sdk/wasp/server/operations/actions/types.ts +5 -5
- package/data/Generator/templates/sdk/wasp/server/operations/queries/index.ts +14 -8
- package/data/Generator/templates/sdk/wasp/server/operations/queries/types.ts +5 -5
- package/data/Generator/templates/sdk/wasp/server/operations/wrappers.ts +40 -14
- package/data/Generator/templates/sdk/wasp/server/types/index.ts +1 -11
- package/data/Generator/templates/sdk/wasp/server/utils.ts +5 -20
- package/data/Generator/templates/sdk/wasp/server/webSocket/index.ts +7 -7
- package/data/Generator/templates/sdk/wasp/tsconfig.json +20 -46
- package/data/Generator/templates/sdk/wasp/types/index.ts +8 -0
- package/data/Generator/templates/sdk/wasp/types/register.ts +21 -0
- package/data/Generator/templates/sdk/wasp/vite-env.d.ts +0 -9
- package/data/Generator/templates/sdk/wasp/wasp-ssr.d.ts +8 -0
- package/data/Generator/templates/sdk/wasp/wasp-user-virtual-modules.d.ts +20 -0
- package/data/Generator/templates/server/package.json +2 -1
- package/data/Generator/templates/server/rollup.config.js +2 -43
- package/data/Generator/templates/server/rollup.dbSeed.config.js +3 -0
- package/data/Generator/templates/server/src/app.js +2 -2
- package/data/Generator/templates/server/src/auth/providers/config/email.ts +5 -5
- package/data/Generator/templates/server/src/auth/providers/email/login.ts +4 -4
- package/data/Generator/templates/server/src/auth/providers/email/requestPasswordReset.ts +4 -4
- package/data/Generator/templates/server/src/auth/providers/email/resetPassword.ts +13 -5
- package/data/Generator/templates/server/src/auth/providers/email/signup.ts +29 -18
- package/data/Generator/templates/server/src/auth/providers/email/verifyEmail.ts +7 -2
- package/data/Generator/templates/server/src/auth/providers/oauth/cookies.ts +5 -1
- package/data/Generator/templates/server/src/auth/providers/oauth/handler.ts +1 -1
- package/data/Generator/templates/server/src/auth/providers/oauth/oneTimeCode.ts +2 -2
- package/data/Generator/templates/server/src/auth/providers/oauth/state.ts +55 -13
- package/data/Generator/templates/server/src/auth/providers/oauth/user.ts +6 -3
- package/data/Generator/templates/server/src/auth/providers/username/login.ts +4 -4
- package/data/Generator/templates/server/src/auth/providers/username/signup.ts +12 -4
- package/data/Generator/templates/server/src/createRollupBundle.js +47 -0
- package/data/Generator/templates/server/src/crud/_operations.ts +16 -16
- package/data/Generator/templates/server/src/plugins/virtualUserModules.js +40 -0
- package/data/Generator/templates/server/src/routes/apis/index.ts +3 -3
- package/data/Generator/templates/server/src/routes/auth/index.js +1 -1
- package/data/Generator/templates/server/src/routes/auth/logout.ts +2 -2
- package/data/Generator/templates/server/src/routes/crud/_crud.ts +1 -1
- package/data/Generator/templates/server/src/routes/index.js +18 -18
- package/data/Generator/templates/server/src/routes/operations/index.js +1 -1
- package/data/Generator/templates/server/src/webSocket/initialization.ts +1 -1
- package/data/Generator/templates/server/tsconfig.json +7 -13
- package/data/Generator/templates/types/app/sdk/register.ts +57 -0
- package/data/packages/deploy/dist/common/cliVersion.js +17 -0
- package/data/packages/deploy/dist/common/waspProject.js +1 -1
- package/data/packages/deploy/dist/common/zx.js +24 -6
- package/data/packages/deploy/dist/providers/fly/commands/createDb/createDb.js +13 -5
- package/data/packages/deploy/dist/providers/fly/flyCli.js +29 -17
- package/data/packages/deploy/dist/providers/fly/index.js +16 -8
- package/data/packages/deploy/dist/providers/railway/commands/setup/setup.js +19 -31
- package/data/packages/deploy/dist/providers/railway/index.js +11 -2
- package/data/packages/deploy/dist/providers/railway/jsonOutputSchemas.js +19 -34
- package/data/packages/deploy/dist/providers/railway/railwayCli.js +11 -20
- package/data/packages/deploy/dist/providers/railway/railwayEnvironment/cli.js +20 -0
- package/data/packages/deploy/dist/providers/railway/railwayProject/RailwayProject.js +4 -1
- package/data/packages/deploy/dist/providers/railway/railwayProject/cli.js +6 -14
- package/data/packages/deploy/dist/providers/railway/railwayService/database.js +88 -0
- package/data/packages/deploy/dist/providers/railway/railwayService/deployment.js +12 -25
- package/data/packages/deploy/dist/providers/railway/railwayService/nameGenerator.js +5 -4
- package/data/packages/deploy/dist/providers/railway/railwayService/serviceInstance.js +48 -0
- package/data/packages/deploy/dist/providers/railway/railwayService/url.js +9 -30
- package/data/packages/deploy/package-lock.json +2 -2
- package/data/packages/deploy/package.json +1 -1
- package/data/packages/prisma/package-lock.json +2 -2
- package/data/packages/prisma/package.json +1 -1
- package/data/packages/spec/dist/__tests__/spec/mapApp.unit.test.js +19 -15
- package/data/packages/spec/dist/__tests__/spec/tsAppSpec.test-d.js +6 -0
- package/data/packages/spec/dist/src/appSpec.d.ts +15 -2
- package/data/packages/spec/dist/src/appSpec.d.ts.map +1 -1
- package/data/packages/spec/dist/src/spec/mapper/app.d.ts +1 -0
- package/data/packages/spec/dist/src/spec/mapper/app.d.ts.map +1 -1
- package/data/packages/spec/dist/src/spec/mapper/app.js +8 -2
- package/data/packages/spec/dist/src/spec/mapper/context.js +4 -4
- package/data/packages/spec/dist/src/spec/mapper/specElements.js +9 -9
- package/data/packages/spec/dist/src/spec/publicApi/constructors.d.ts +11 -11
- package/data/packages/spec/dist/src/spec/publicApi/constructors.js +11 -11
- package/data/packages/spec/dist/src/spec/publicApi/register.d.ts +1 -1
- package/data/packages/spec/dist/src/spec/publicApi/waspSpec.d.ts +58 -38
- package/data/packages/spec/dist/src/spec/publicApi/waspSpec.d.ts.map +1 -1
- package/data/packages/spec/package-lock.json +2 -2
- package/data/packages/spec/package.json +1 -1
- package/data/packages/studio/package-lock.json +15 -23
- package/data/packages/studio/package.json +2 -2
- package/package.json +1 -1
- package/wasp-bin +0 -0
- package/data/Generator/libs/auth/wasp.sh-lib-auth-0.25.0.tgz +0 -0
- package/data/Generator/templates/sdk/wasp/api/events.ts +0 -11
- package/data/Generator/templates/sdk/wasp/auth/email/index.ts +0 -5
- package/data/Generator/templates/sdk/wasp/auth/forms/internal/Form.module.css +0 -99
- package/data/Generator/templates/sdk/wasp/auth/forms/internal/Form.tsx +0 -74
- package/data/Generator/templates/sdk/wasp/auth/forms/internal/Message.module.css +0 -22
- package/data/Generator/templates/sdk/wasp/auth/forms/internal/Message.tsx +0 -34
- package/data/Generator/templates/sdk/wasp/auth/forms/internal/auth-styles.css +0 -30
- package/data/Generator/templates/sdk/wasp/auth/forms/internal/social/SocialButton.module.css +0 -33
- package/data/Generator/templates/sdk/wasp/auth/forms/internal/social/SocialButton.tsx +0 -14
- package/data/Generator/templates/sdk/wasp/auth/forms/internal/social/SocialIcons.module.css +0 -4
- package/data/Generator/templates/sdk/wasp/auth/forms/internal/social/SocialIcons.tsx +0 -85
- package/data/Generator/templates/sdk/wasp/auth/forms/internal/util.ts +0 -16
- package/data/Generator/templates/sdk/wasp/auth/helpers/user.ts +0 -15
- package/data/Generator/templates/sdk/wasp/auth/responseSchemas.ts +0 -10
- package/data/Generator/templates/sdk/wasp/auth/types.ts +0 -2
- package/data/Generator/templates/sdk/wasp/auth/username/index.ts +0 -2
- package/data/Generator/templates/sdk/wasp/client/app/components/DefaultRootErrorBoundary.tsx +0 -16
- package/data/Generator/templates/sdk/wasp/client/app/components/FullPageWrapper.tsx +0 -21
- package/data/Generator/templates/sdk/wasp/client/app/components/Loader.module.css +0 -37
- package/data/Generator/templates/sdk/wasp/client/app/components/Loader.tsx +0 -12
- package/data/Generator/templates/sdk/wasp/client/app/components/Message.tsx +0 -86
- package/data/Generator/templates/sdk/wasp/client/crud/operationsHelpers.ts +0 -21
- package/data/Generator/templates/sdk/wasp/client/hooks.ts +0 -19
- package/data/Generator/templates/sdk/wasp/client/operations/hooks.ts +0 -347
- package/data/Generator/templates/sdk/wasp/client/operations/internal/resources.js +0 -85
- package/data/Generator/templates/sdk/wasp/client/operations/internal/updateHandlersMap.js +0 -37
- package/data/Generator/templates/sdk/wasp/client/operations/queryClient.ts +0 -34
- package/data/Generator/templates/sdk/wasp/client/operations/rpc.ts +0 -96
- package/data/Generator/templates/sdk/wasp/client/router/linkHelpers.ts +0 -48
- package/data/Generator/templates/sdk/wasp/client/router/types.ts +0 -98
- package/data/Generator/templates/sdk/wasp/client/vite/plugins/detectServerImports.ts +0 -50
- package/data/Generator/templates/sdk/wasp/client/vite/plugins/envFile.ts +0 -112
- package/data/Generator/templates/sdk/wasp/client/vite/plugins/typescriptCheck.ts +0 -36
- package/data/Generator/templates/sdk/wasp/client/vite/plugins/validateEnv.ts +0 -88
- package/data/Generator/templates/sdk/wasp/client/vite/virtual-files/resolver.ts +0 -35
- package/data/Generator/templates/sdk/wasp/core/serialization/custom-register.ts +0 -21
- package/data/Generator/templates/sdk/wasp/core/storage.ts +0 -73
- package/data/Generator/templates/sdk/wasp/env/validation.ts +0 -44
- package/data/Generator/templates/sdk/wasp/server/HttpError.ts +0 -30
- package/data/Generator/templates/sdk/wasp/server/auth/oauth/provider.ts +0 -20
- package/data/Generator/templates/sdk/wasp/server/auth/user.ts +0 -154
- package/data/Generator/templates/sdk/wasp/server/auth/username.ts +0 -1
- package/data/Generator/templates/sdk/wasp/server/jobs/core/job.ts +0 -28
- package/data/Generator/templates/sdk/wasp/server/middleware/globalMiddleware.ts +0 -8
- package/data/Generator/templates/sdk/wasp/universal/ansiColors.ts +0 -58
- package/data/Generator/templates/sdk/wasp/universal/predicates.ts +0 -3
- package/data/Generator/templates/sdk/wasp/universal/types.ts +0 -74
- package/data/Generator/templates/sdk/wasp/universal/url.ts +0 -9
- package/data/Generator/templates/sdk/wasp/universal/validators.ts +0 -21
- package/data/packages/ts-inspect/dist/exports.js +0 -82
- package/data/packages/ts-inspect/dist/index.js +0 -28
- package/data/packages/ts-inspect/package-lock.json +0 -4724
- package/data/packages/ts-inspect/package.json +0 -31
- /package/data/Generator/templates/sdk/wasp/{auth → server/auth}/password.ts +0 -0
|
@@ -25,7 +25,7 @@ function makeMapperContext({ entityNames = [], routeNames = [], } = {}) {
|
|
|
25
25
|
}
|
|
26
26
|
function getSpecElementDeclName(specElement) {
|
|
27
27
|
return SpecElementMapper.mapSpecElement(specElement, makeMapperContext())
|
|
28
|
-
.
|
|
28
|
+
.declValue.name;
|
|
29
29
|
}
|
|
30
30
|
function mapMockApp(app, entityNames) {
|
|
31
31
|
return convertWaspSpecToAppSpec(app, {
|
|
@@ -41,10 +41,11 @@ describe("convertWaspSpecToAppSpec", () => {
|
|
|
41
41
|
expect(decls).toStrictEqual([
|
|
42
42
|
{
|
|
43
43
|
declType: "App",
|
|
44
|
-
declName: app.name,
|
|
45
44
|
declValue: {
|
|
45
|
+
name: app.name,
|
|
46
46
|
wasp: app.wasp,
|
|
47
47
|
title: app.title,
|
|
48
|
+
deployment: undefined,
|
|
48
49
|
head: app.head,
|
|
49
50
|
auth: undefined,
|
|
50
51
|
server: undefined,
|
|
@@ -74,11 +75,13 @@ describe("convertWaspSpecToAppSpec", () => {
|
|
|
74
75
|
const db = Fixtures.getDbConfig("full");
|
|
75
76
|
const emailSender = Fixtures.getEmailSenderConfig("full");
|
|
76
77
|
const webSocket = Fixtures.getWebSocketConfig("full");
|
|
78
|
+
const deployment = {};
|
|
77
79
|
const entityNames = Fixtures.getEntities("full");
|
|
78
80
|
const inputApp = app({
|
|
79
81
|
name: "FullApp",
|
|
80
82
|
wasp: { version: "^0.16.3" },
|
|
81
83
|
title: "Mock App",
|
|
84
|
+
deployment,
|
|
82
85
|
head: ['<link rel="icon" href="/favicon.ico" />'],
|
|
83
86
|
auth: authConfig,
|
|
84
87
|
server,
|
|
@@ -108,10 +111,11 @@ describe("convertWaspSpecToAppSpec", () => {
|
|
|
108
111
|
expect(result).toStrictEqual([
|
|
109
112
|
{
|
|
110
113
|
declType: "App",
|
|
111
|
-
declName: inputApp.name,
|
|
112
114
|
declValue: {
|
|
115
|
+
name: inputApp.name,
|
|
113
116
|
wasp: inputApp.wasp,
|
|
114
117
|
title: inputApp.title,
|
|
118
|
+
deployment: { mode: undefined },
|
|
115
119
|
head: inputApp.head,
|
|
116
120
|
auth: AppSpecMapper.mapAuth(authConfig, ctx),
|
|
117
121
|
server: AppSpecMapper.mapServer(server, ctx),
|
|
@@ -143,7 +147,7 @@ describe("convertWaspSpecToAppSpec", () => {
|
|
|
143
147
|
const decls = mapMockApp(app, []);
|
|
144
148
|
const pageNames = decls
|
|
145
149
|
.filter((d) => d.declType === "Page")
|
|
146
|
-
.map((d) => d.
|
|
150
|
+
.map((d) => d.declValue.name);
|
|
147
151
|
expect(pageNames).toEqual([pageName]);
|
|
148
152
|
});
|
|
149
153
|
test("dedups a page referenced via a route shorthand twice", () => {
|
|
@@ -157,7 +161,7 @@ describe("convertWaspSpecToAppSpec", () => {
|
|
|
157
161
|
const decls = mapMockApp(app, []);
|
|
158
162
|
const pageNames = decls
|
|
159
163
|
.filter((d) => d.declType === "Page")
|
|
160
|
-
.map((d) => d.
|
|
164
|
+
.map((d) => d.declValue.name);
|
|
161
165
|
expect(pageNames).toEqual([pageName]);
|
|
162
166
|
});
|
|
163
167
|
test("dedups a page referenced explicitly and via a route shorthand", () => {
|
|
@@ -170,7 +174,7 @@ describe("convertWaspSpecToAppSpec", () => {
|
|
|
170
174
|
const decls = mapMockApp(app, []);
|
|
171
175
|
const pageNames = decls
|
|
172
176
|
.filter((d) => d.declType === "Page")
|
|
173
|
-
.map((d) => d.
|
|
177
|
+
.map((d) => d.declValue.name);
|
|
174
178
|
expect(pageNames).toEqual([pageName]);
|
|
175
179
|
});
|
|
176
180
|
test("throws when the same page name is produced with differing configs explicitly", () => {
|
|
@@ -218,7 +222,7 @@ describe("convertWaspSpecToAppSpec", () => {
|
|
|
218
222
|
const decls = mapMockApp(app, []);
|
|
219
223
|
const queryNames = decls
|
|
220
224
|
.filter((d) => d.declType === "Query")
|
|
221
|
-
.map((d) => d.
|
|
225
|
+
.map((d) => d.declValue.name);
|
|
222
226
|
expect(queryNames).toEqual([getSpecElementDeclName(query1)]);
|
|
223
227
|
});
|
|
224
228
|
test("throws when two queries share a name with differing configs", () => {
|
|
@@ -241,8 +245,8 @@ describe("mapPage", () => {
|
|
|
241
245
|
const result = SpecElementMapper.mapPageSpec(page, ctx);
|
|
242
246
|
expect(result).toStrictEqual({
|
|
243
247
|
declType: "Page",
|
|
244
|
-
declName: getRefObjectDeclarationName(page.component),
|
|
245
248
|
declValue: {
|
|
249
|
+
name: getRefObjectDeclarationName(page.component),
|
|
246
250
|
component: mapRefObjectForMockProjectDir(page.component),
|
|
247
251
|
authRequired: page.authRequired,
|
|
248
252
|
},
|
|
@@ -267,8 +271,8 @@ describe("mapRoute", () => {
|
|
|
267
271
|
const result = SpecElementMapper.mapRouteSpec(route, ctx);
|
|
268
272
|
expect(result).toStrictEqual({
|
|
269
273
|
declType: "Route",
|
|
270
|
-
declName: route.name,
|
|
271
274
|
declValue: {
|
|
275
|
+
name: route.name,
|
|
272
276
|
path: route.path,
|
|
273
277
|
to: {
|
|
274
278
|
name: getRefObjectDeclarationName(route.page.component),
|
|
@@ -297,8 +301,8 @@ describe("mapQuery", () => {
|
|
|
297
301
|
const result = SpecElementMapper.mapQuerySpec(query, ctx);
|
|
298
302
|
expect(result).toStrictEqual({
|
|
299
303
|
declType: "Query",
|
|
300
|
-
declName: getRefObjectDeclarationName(query.fn),
|
|
301
304
|
declValue: {
|
|
305
|
+
name: getRefObjectDeclarationName(query.fn),
|
|
302
306
|
fn: mapRefObjectForMockProjectDir(query.fn),
|
|
303
307
|
entities: query.entities?.map(ctx.resolveEntityRef),
|
|
304
308
|
auth: query.auth,
|
|
@@ -323,8 +327,8 @@ describe("mapAction", () => {
|
|
|
323
327
|
const result = SpecElementMapper.mapActionSpec(action, ctx);
|
|
324
328
|
expect(result).toStrictEqual({
|
|
325
329
|
declType: "Action",
|
|
326
|
-
declName: getRefObjectDeclarationName(action.fn),
|
|
327
330
|
declValue: {
|
|
331
|
+
name: getRefObjectDeclarationName(action.fn),
|
|
328
332
|
fn: mapRefObjectForMockProjectDir(action.fn),
|
|
329
333
|
entities: action.entities?.map(ctx.resolveEntityRef),
|
|
330
334
|
auth: action.auth,
|
|
@@ -591,8 +595,8 @@ describe("mapApi", () => {
|
|
|
591
595
|
const result = SpecElementMapper.mapApiSpec(api, ctx);
|
|
592
596
|
expect(result).toStrictEqual({
|
|
593
597
|
declType: "Api",
|
|
594
|
-
declName: getRefObjectDeclarationName(api.fn),
|
|
595
598
|
declValue: {
|
|
599
|
+
name: getRefObjectDeclarationName(api.fn),
|
|
596
600
|
fn: mapRefObjectForMockProjectDir(api.fn),
|
|
597
601
|
middlewareConfigFn: api.middlewareConfigFn &&
|
|
598
602
|
mapRefObjectForMockProjectDir(api.middlewareConfigFn),
|
|
@@ -615,8 +619,8 @@ describe("mapApiNamespace", () => {
|
|
|
615
619
|
const result = SpecElementMapper.mapApiNamespaceSpec(apiNamespace, ctx);
|
|
616
620
|
expect(result).toStrictEqual({
|
|
617
621
|
declType: "ApiNamespace",
|
|
618
|
-
declName: getRefObjectDeclarationName(apiNamespace.middlewareConfigFn),
|
|
619
622
|
declValue: {
|
|
623
|
+
name: getRefObjectDeclarationName(apiNamespace.middlewareConfigFn),
|
|
620
624
|
middlewareConfigFn: mapRefObjectForMockProjectDir(apiNamespace.middlewareConfigFn),
|
|
621
625
|
path: apiNamespace.path,
|
|
622
626
|
},
|
|
@@ -742,8 +746,8 @@ describe("mapJob", () => {
|
|
|
742
746
|
const result = SpecElementMapper.mapJobSpec(job, ctx);
|
|
743
747
|
expect(result).toStrictEqual({
|
|
744
748
|
declType: "Job",
|
|
745
|
-
declName: getRefObjectDeclarationName(job.fn),
|
|
746
749
|
declValue: {
|
|
750
|
+
name: getRefObjectDeclarationName(job.fn),
|
|
747
751
|
executor: job.executor,
|
|
748
752
|
perform: {
|
|
749
753
|
fn: mapRefObjectForMockProjectDir(job.fn),
|
|
@@ -772,8 +776,8 @@ describe("mapCrud", () => {
|
|
|
772
776
|
const result = SpecElementMapper.mapCrudSpec(crudDecl, ctx);
|
|
773
777
|
expect(result).toStrictEqual({
|
|
774
778
|
declType: "Crud",
|
|
775
|
-
declName: crudDecl.name,
|
|
776
779
|
declValue: {
|
|
780
|
+
name: crudDecl.name,
|
|
777
781
|
entity: ctx.resolveEntityRef(crudDecl.entity),
|
|
778
782
|
operations: SpecElementMapper.mapCrudOperations(crudDecl.operations, ctx),
|
|
779
783
|
},
|
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
// the variables we define here:
|
|
3
3
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
4
4
|
import { describe, expectTypeOf, test } from "vitest";
|
|
5
|
+
describe("Deployment", () => {
|
|
6
|
+
test("allows an omitted mode or split mode", () => {
|
|
7
|
+
expectTypeOf().toExtend();
|
|
8
|
+
expectTypeOf().toExtend();
|
|
9
|
+
});
|
|
10
|
+
});
|
|
5
11
|
describe("AuthMethods", () => {
|
|
6
12
|
const usernameAndPassword = {
|
|
7
13
|
usernameAndPassword: {},
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
export type Decl = {
|
|
7
7
|
[Type in keyof DeclTypeToValue]: {
|
|
8
8
|
declType: Type;
|
|
9
|
-
declName: string;
|
|
10
9
|
declValue: DeclTypeToValue[Type];
|
|
11
10
|
};
|
|
12
11
|
}[keyof DeclTypeToValue];
|
|
@@ -26,26 +25,31 @@ export type GetDeclForType<T extends Decl["declType"]> = Extract<Decl, {
|
|
|
26
25
|
}>;
|
|
27
26
|
export type DeclType = Decl["declType"] | "Entity";
|
|
28
27
|
export type Page = {
|
|
28
|
+
name: string;
|
|
29
29
|
component: ExtImport;
|
|
30
30
|
authRequired: Optional<boolean>;
|
|
31
31
|
};
|
|
32
32
|
export type Route = {
|
|
33
|
+
name: string;
|
|
33
34
|
path: string;
|
|
34
35
|
to: Ref<"Page">;
|
|
35
36
|
prerender: string[];
|
|
36
37
|
lazy: Optional<boolean>;
|
|
37
38
|
};
|
|
38
39
|
export type Action = {
|
|
40
|
+
name: string;
|
|
39
41
|
fn: ExtImport;
|
|
40
42
|
entities: Optional<Ref<"Entity">[]>;
|
|
41
43
|
auth: Optional<boolean>;
|
|
42
44
|
};
|
|
43
45
|
export type Query = {
|
|
46
|
+
name: string;
|
|
44
47
|
fn: ExtImport;
|
|
45
48
|
entities: Optional<Ref<"Entity">[]>;
|
|
46
49
|
auth: Optional<boolean>;
|
|
47
50
|
};
|
|
48
51
|
export type Job = {
|
|
52
|
+
name: string;
|
|
49
53
|
executor: JobExecutor;
|
|
50
54
|
perform: Perform;
|
|
51
55
|
schedule: Optional<Schedule>;
|
|
@@ -61,6 +65,7 @@ export type Perform = {
|
|
|
61
65
|
executorOptions: Optional<ExecutorOptions>;
|
|
62
66
|
};
|
|
63
67
|
export type Api = {
|
|
68
|
+
name: string;
|
|
64
69
|
fn: ExtImport;
|
|
65
70
|
middlewareConfigFn: Optional<ExtImport>;
|
|
66
71
|
entities: Optional<Ref<"Entity">[]>;
|
|
@@ -68,16 +73,20 @@ export type Api = {
|
|
|
68
73
|
auth: Optional<boolean>;
|
|
69
74
|
};
|
|
70
75
|
export type ApiNamespace = {
|
|
76
|
+
name: string;
|
|
71
77
|
middlewareConfigFn: ExtImport;
|
|
72
78
|
path: string;
|
|
73
79
|
};
|
|
74
80
|
export type Crud = {
|
|
81
|
+
name: string;
|
|
75
82
|
entity: Ref<"Entity">;
|
|
76
83
|
operations: CrudOperations;
|
|
77
84
|
};
|
|
78
85
|
export type App = {
|
|
86
|
+
name: string;
|
|
79
87
|
wasp: Wasp;
|
|
80
88
|
title: string;
|
|
89
|
+
deployment: Optional<Deployment>;
|
|
81
90
|
head: Optional<string[]>;
|
|
82
91
|
auth: Optional<Auth>;
|
|
83
92
|
server: Optional<Server>;
|
|
@@ -86,6 +95,10 @@ export type App = {
|
|
|
86
95
|
emailSender: Optional<EmailSender>;
|
|
87
96
|
webSocket: Optional<WebSocket>;
|
|
88
97
|
};
|
|
98
|
+
export type Deployment = {
|
|
99
|
+
mode: Optional<DeploymentMode>;
|
|
100
|
+
};
|
|
101
|
+
export type DeploymentMode = "split";
|
|
89
102
|
export type ExtImport = NamedExtImport | DefaultExtImport;
|
|
90
103
|
export type ExtImportKind = ExtImport["kind"];
|
|
91
104
|
export type NamedExtImport = {
|
|
@@ -103,7 +116,7 @@ export type JobExecutor = "PgBoss";
|
|
|
103
116
|
export type ExecutorOptions = {
|
|
104
117
|
pgBoss: Optional<object>;
|
|
105
118
|
};
|
|
106
|
-
export type HttpMethod = "ALL" | "GET" | "POST" | "PUT" | "DELETE";
|
|
119
|
+
export type HttpMethod = "ALL" | "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD";
|
|
107
120
|
export type HttpRoute = [HttpMethod, string];
|
|
108
121
|
export type CrudOperations = {
|
|
109
122
|
get: Optional<CrudOperationOptions>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appSpec.d.ts","sourceRoot":"","sources":["../../src/appSpec.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,MAAM,IAAI,GAAG;KAChB,IAAI,IAAI,MAAM,eAAe,GAAG;QAC/B,QAAQ,EAAE,IAAI,CAAC;QACf,
|
|
1
|
+
{"version":3,"file":"appSpec.d.ts","sourceRoot":"","sources":["../../src/appSpec.ts"],"names":[],"mappings":"AAAA;;;;GAIG;A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,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACtB,EAAE,EAAE,SAAS,CAAC;IACd,WAAW,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;CAChC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,KAAK,QAAQ,CAAC,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC"}
|
|
@@ -2,6 +2,7 @@ import * as AppSpec from "../../appSpec.js";
|
|
|
2
2
|
import * as WaspSpec from "../publicApi/waspSpec.js";
|
|
3
3
|
import { AppMapperContext } from "./context.js";
|
|
4
4
|
export declare function mapAppSpec(app: WaspSpec.App, ctx: AppMapperContext): AppSpec.GetDeclForType<"App">;
|
|
5
|
+
export declare function mapDeployment(deployment: WaspSpec.Deployment): AppSpec.Deployment;
|
|
5
6
|
export declare function mapAuth(auth: WaspSpec.Auth, ctx: AppMapperContext): AppSpec.Auth;
|
|
6
7
|
export declare function mapAuthMethods(methods: WaspSpec.AuthMethods, ctx: AppMapperContext): AppSpec.AuthMethods;
|
|
7
8
|
export declare function mapUsernameAndPassword(usernameAndPassword: WaspSpec.UsernameAndPasswordConfig, ctx: AppMapperContext): AppSpec.UsernameAndPasswordConfig;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../../../src/spec/mapper/app.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAC;AAC5C,OAAO,KAAK,QAAQ,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEhD,wBAAgB,UAAU,CACxB,GAAG,EAAE,QAAQ,CAAC,GAAG,EACjB,GAAG,EAAE,gBAAgB,GACpB,OAAO,CAAC,cAAc,CAAC,KAAK,CAAC,
|
|
1
|
+
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../../../src/spec/mapper/app.ts"],"names":[],"mappings":"AAAA,OAAO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AAM,EACvB,GAAG,EAAE,gBAAgB,GACpB,OAAO,CAAC,MAAM,CAShB;AAED,wBAAgB,KAAK,CAAC,EAAE,EAAE,QAAQ,CAAC,EAAE,EAAE,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAAC,EAAE,CAMxE;AAED,wBAAgB,cAAc,CAC5B,WAAW,EAAE,QAAQ,CAAC,WAAW,GAChC,OAAO,CAAC,WAAW,CAMrB;AAED,wBAAgB,iBAAiB,CAC/B,cAAc,EAAE,QAAQ,CAAC,cAAc,GACtC,OAAO,CAAC,cAAc,CAKxB;AAED,wBAAgB,YAAY,CAC1B,SAAS,EAAE,QAAQ,CAAC,SAAS,EAC7B,GAAG,EAAE,gBAAgB,GACpB,OAAO,CAAC,SAAS,CAMnB"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
export function mapAppSpec(app, ctx) {
|
|
2
|
-
const { name, wasp, title, head, auth, server, client, db, emailSender, webSocket, } = app;
|
|
2
|
+
const { name, wasp, title, deployment, head, auth, server, client, db, emailSender, webSocket, } = app;
|
|
3
3
|
return {
|
|
4
4
|
declType: "App",
|
|
5
|
-
declName: name,
|
|
6
5
|
declValue: {
|
|
6
|
+
name,
|
|
7
7
|
wasp,
|
|
8
8
|
title,
|
|
9
|
+
deployment: deployment && mapDeployment(deployment),
|
|
9
10
|
head,
|
|
10
11
|
auth: auth && mapAuth(auth, ctx),
|
|
11
12
|
server: server && mapServer(server, ctx),
|
|
@@ -16,6 +17,11 @@ export function mapAppSpec(app, ctx) {
|
|
|
16
17
|
},
|
|
17
18
|
};
|
|
18
19
|
}
|
|
20
|
+
export function mapDeployment(deployment) {
|
|
21
|
+
return {
|
|
22
|
+
mode: deployment.mode,
|
|
23
|
+
};
|
|
24
|
+
}
|
|
19
25
|
export function mapAuth(auth, ctx) {
|
|
20
26
|
const { userEntity, methods, onAuthFailedRedirectTo, onAuthSucceededRedirectTo, onBeforeSignup, onAfterSignup, onAfterEmailVerified, onBeforeOAuthRedirect, onBeforeLogin, onAfterLogin, } = auth;
|
|
21
27
|
return {
|
|
@@ -28,7 +28,7 @@ export function makeAppMapperContext({ entityNames, projectRootDir, specElements
|
|
|
28
28
|
function makeKeyForDecl(decl) {
|
|
29
29
|
// We're keying by type+name since waspc allows Decls with the same name
|
|
30
30
|
// if they are different types.
|
|
31
|
-
return `${decl.declType}:${decl.
|
|
31
|
+
return `${decl.declType}:${decl.declValue.name}`;
|
|
32
32
|
}
|
|
33
33
|
export function makeRefParser(declType, declNames) {
|
|
34
34
|
return function parseRef(potentialRef) {
|
|
@@ -43,9 +43,9 @@ export function makeRefParser(declType, declNames) {
|
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
45
|
function makeConflictingDeclsError(existingDecl, incomingDecl) {
|
|
46
|
-
return new WaspSpecUserError(`Conflicting configurations for the ${declTypeDisplayNames[existingDecl.declType]} \`${existingDecl.
|
|
47
|
-
`\`${existingDecl.
|
|
48
|
-
`\`${incomingDecl.
|
|
46
|
+
return new WaspSpecUserError(`Conflicting configurations for the ${declTypeDisplayNames[existingDecl.declType]} \`${existingDecl.declValue.name}\`:\n\n` +
|
|
47
|
+
`\`${existingDecl.declValue.name}\` (A):\n${showDecl(existingDecl)}\n\n` +
|
|
48
|
+
`\`${incomingDecl.declValue.name}\` (B):\n${showDecl(incomingDecl)}\n\n` +
|
|
49
49
|
`All definitions with the same name must produce the same configuration.\n` +
|
|
50
50
|
"If the duplication was intentional, please use a different name to differentiate them.");
|
|
51
51
|
}
|
|
@@ -11,7 +11,7 @@ export const AppSpecDeclTypeForWaspSpecElementKind = {
|
|
|
11
11
|
crud: "Crud",
|
|
12
12
|
};
|
|
13
13
|
export function declToRef(decl) {
|
|
14
|
-
return { declType: decl.declType, name: decl.
|
|
14
|
+
return { declType: decl.declType, name: decl.declValue.name };
|
|
15
15
|
}
|
|
16
16
|
export function mapSpecElement(el, ctx) {
|
|
17
17
|
switch (el.kind) {
|
|
@@ -39,8 +39,8 @@ export function mapPageSpec(page, ctx) {
|
|
|
39
39
|
const { component, authRequired } = page;
|
|
40
40
|
return {
|
|
41
41
|
declType: "Page",
|
|
42
|
-
declName: getRefObjectDeclarationName(page.component),
|
|
43
42
|
declValue: {
|
|
43
|
+
name: getRefObjectDeclarationName(page.component),
|
|
44
44
|
component: ctx.parseRefObject(component),
|
|
45
45
|
authRequired,
|
|
46
46
|
},
|
|
@@ -50,8 +50,8 @@ export function mapRouteSpec(route, ctx) {
|
|
|
50
50
|
const { path, prerender, lazy } = route;
|
|
51
51
|
return {
|
|
52
52
|
declType: "Route",
|
|
53
|
-
declName: route.name,
|
|
54
53
|
declValue: {
|
|
54
|
+
name: route.name,
|
|
55
55
|
path,
|
|
56
56
|
to: ctx.collectSpecElement(route.page),
|
|
57
57
|
prerender: normalizePrerender(prerender, path),
|
|
@@ -63,8 +63,8 @@ export function mapQuerySpec(query, ctx) {
|
|
|
63
63
|
const { fn, entities, auth } = query;
|
|
64
64
|
return {
|
|
65
65
|
declType: "Query",
|
|
66
|
-
declName: getRefObjectDeclarationName(query.fn),
|
|
67
66
|
declValue: {
|
|
67
|
+
name: getRefObjectDeclarationName(query.fn),
|
|
68
68
|
fn: ctx.parseRefObject(fn),
|
|
69
69
|
entities: entities?.map(ctx.resolveEntityRef),
|
|
70
70
|
auth,
|
|
@@ -75,8 +75,8 @@ export function mapActionSpec(action, ctx) {
|
|
|
75
75
|
const { fn, entities, auth } = action;
|
|
76
76
|
return {
|
|
77
77
|
declType: "Action",
|
|
78
|
-
declName: getRefObjectDeclarationName(action.fn),
|
|
79
78
|
declValue: {
|
|
79
|
+
name: getRefObjectDeclarationName(action.fn),
|
|
80
80
|
fn: ctx.parseRefObject(fn),
|
|
81
81
|
entities: entities?.map(ctx.resolveEntityRef),
|
|
82
82
|
auth,
|
|
@@ -87,8 +87,8 @@ export function mapApiSpec(api, ctx) {
|
|
|
87
87
|
const { method, path, fn, middlewareConfigFn, entities, auth } = api;
|
|
88
88
|
return {
|
|
89
89
|
declType: "Api",
|
|
90
|
-
declName: getRefObjectDeclarationName(api.fn),
|
|
91
90
|
declValue: {
|
|
91
|
+
name: getRefObjectDeclarationName(api.fn),
|
|
92
92
|
fn: ctx.parseRefObject(fn),
|
|
93
93
|
middlewareConfigFn: middlewareConfigFn && ctx.parseRefObject(middlewareConfigFn),
|
|
94
94
|
entities: entities?.map(ctx.resolveEntityRef),
|
|
@@ -101,8 +101,8 @@ export function mapApiNamespaceSpec(apiNamespace, ctx) {
|
|
|
101
101
|
const { middlewareConfigFn, path } = apiNamespace;
|
|
102
102
|
return {
|
|
103
103
|
declType: "ApiNamespace",
|
|
104
|
-
declName: getRefObjectDeclarationName(apiNamespace.middlewareConfigFn),
|
|
105
104
|
declValue: {
|
|
105
|
+
name: getRefObjectDeclarationName(apiNamespace.middlewareConfigFn),
|
|
106
106
|
middlewareConfigFn: ctx.parseRefObject(middlewareConfigFn),
|
|
107
107
|
path,
|
|
108
108
|
},
|
|
@@ -112,8 +112,8 @@ export function mapJobSpec(job, ctx) {
|
|
|
112
112
|
const { fn, executor, schedule, entities, performExecutorOptions } = job;
|
|
113
113
|
return {
|
|
114
114
|
declType: "Job",
|
|
115
|
-
declName: getRefObjectDeclarationName(job.fn),
|
|
116
115
|
declValue: {
|
|
116
|
+
name: getRefObjectDeclarationName(job.fn),
|
|
117
117
|
executor,
|
|
118
118
|
perform: {
|
|
119
119
|
fn: ctx.parseRefObject(fn),
|
|
@@ -136,8 +136,8 @@ export function mapCrudSpec(crud, ctx) {
|
|
|
136
136
|
const { entity, operations } = crud;
|
|
137
137
|
return {
|
|
138
138
|
declType: "Crud",
|
|
139
|
-
declName: crud.name,
|
|
140
139
|
declValue: {
|
|
140
|
+
name: crud.name,
|
|
141
141
|
entity: ctx.resolveEntityRef(entity),
|
|
142
142
|
operations: mapCrudOperations(operations, ctx),
|
|
143
143
|
},
|
|
@@ -6,7 +6,7 @@ import type { Action, Api, ApiNamespace, App, Crud, Job, Page, Query, Route } fr
|
|
|
6
6
|
* the file's default export. The Wasp compiler reads this default export to
|
|
7
7
|
* generate your app.
|
|
8
8
|
*
|
|
9
|
-
* See the [Wasp Spec docs](https://wasp.sh/docs/
|
|
9
|
+
* See the [Wasp Spec docs](https://wasp.sh/docs/features/spec) for the full
|
|
10
10
|
* shape of the configuration.
|
|
11
11
|
*
|
|
12
12
|
* @example
|
|
@@ -44,8 +44,8 @@ export type AppConfig = Omit<App, "kind">;
|
|
|
44
44
|
*
|
|
45
45
|
* A page is a React component rendered by a {@link route}.
|
|
46
46
|
*
|
|
47
|
-
* See [
|
|
48
|
-
* [Auth overview](https://wasp.sh/docs/auth/overview#protecting-a-page-with-authrequired)
|
|
47
|
+
* See [Pages & Routes](https://wasp.sh/docs/features/pages-and-routes) and the
|
|
48
|
+
* [Auth overview](https://wasp.sh/docs/features/auth/overview#protecting-a-page-with-authrequired)
|
|
49
49
|
* for protecting pages with `authRequired`.
|
|
50
50
|
*
|
|
51
51
|
* @example
|
|
@@ -127,7 +127,7 @@ export type RouteConfig = Omit<Route, "kind" | "name" | "path" | "page">;
|
|
|
127
127
|
* delegates into `context.entities` and invalidate the client cache when
|
|
128
128
|
* related actions modify them.
|
|
129
129
|
*
|
|
130
|
-
* See [Queries](https://wasp.sh/docs/data
|
|
130
|
+
* See [Queries](https://wasp.sh/docs/features/data/operations/queries).
|
|
131
131
|
*
|
|
132
132
|
* @example
|
|
133
133
|
* ```ts
|
|
@@ -147,7 +147,7 @@ export type RouteConfig = Omit<Route, "kind" | "name" | "path" | "page">;
|
|
|
147
147
|
* Reference to the Query's NodeJS implementation.
|
|
148
148
|
*
|
|
149
149
|
* See [the
|
|
150
|
-
* docs](https://wasp.sh/docs/data
|
|
150
|
+
* docs](https://wasp.sh/docs/features/data/operations/queries#implementing-queries)
|
|
151
151
|
* for details on the implementation and its context.
|
|
152
152
|
*
|
|
153
153
|
* {@include ./referenceImports.md}
|
|
@@ -174,7 +174,7 @@ export type QueryConfig = Omit<Query, "kind" | "fn">;
|
|
|
174
174
|
* called from the client and the server. Listing entities in `config.entities`
|
|
175
175
|
* lets Wasp invalidate related query caches when this action runs.
|
|
176
176
|
*
|
|
177
|
-
* See [Actions](https://wasp.sh/docs/data
|
|
177
|
+
* See [Actions](https://wasp.sh/docs/features/data/operations/actions).
|
|
178
178
|
*
|
|
179
179
|
* @example
|
|
180
180
|
* ```ts
|
|
@@ -191,7 +191,7 @@ export type QueryConfig = Omit<Query, "kind" | "fn">;
|
|
|
191
191
|
* @param fn
|
|
192
192
|
* Reference to the Action's NodeJS implementation.
|
|
193
193
|
*
|
|
194
|
-
* See [the docs](https://wasp.sh/docs/data
|
|
194
|
+
* See [the docs](https://wasp.sh/docs/features/data/operations/actions#implementing-actions) for details on the implementation and its context.
|
|
195
195
|
*
|
|
196
196
|
* {@include ./referenceImports.md}
|
|
197
197
|
* @param config
|
|
@@ -216,7 +216,7 @@ export type ActionConfig = Omit<Action, "kind" | "fn">;
|
|
|
216
216
|
* them for webhooks, file uploads, or any HTTP interaction that doesn't fit
|
|
217
217
|
* the {@link query}/{@link action} model.
|
|
218
218
|
*
|
|
219
|
-
* See [Custom HTTP API Endpoints](https://wasp.sh/docs/
|
|
219
|
+
* See [Custom HTTP API Endpoints](https://wasp.sh/docs/features/apis).
|
|
220
220
|
*
|
|
221
221
|
* @example
|
|
222
222
|
* ```ts
|
|
@@ -254,7 +254,7 @@ export type ApiConfig = Omit<Api, "kind" | "method" | "path" | "fn">;
|
|
|
254
254
|
* CORS) for a group of related endpoints.
|
|
255
255
|
*
|
|
256
256
|
* See the
|
|
257
|
-
* [per-path middleware section](https://wasp.sh/docs/advanced/middleware
|
|
257
|
+
* [per-path middleware section](https://wasp.sh/docs/advanced/server-customization/middleware#3-customize-per-path-middleware).
|
|
258
258
|
*
|
|
259
259
|
* @example
|
|
260
260
|
* ```ts
|
|
@@ -290,7 +290,7 @@ export type ApiNamespaceConfig = Omit<ApiNamespace, "kind" | "path">;
|
|
|
290
290
|
* function as the first argument and configure the executor and schedule
|
|
291
291
|
* in `config`.
|
|
292
292
|
*
|
|
293
|
-
* See [Recurring Jobs](https://wasp.sh/docs/
|
|
293
|
+
* See [Recurring Jobs](https://wasp.sh/docs/features/jobs).
|
|
294
294
|
*
|
|
295
295
|
* @example
|
|
296
296
|
* ```ts
|
|
@@ -331,7 +331,7 @@ export type JobConfig = Omit<Job, "kind" | "fn">;
|
|
|
331
331
|
* `operations` can be enabled with defaults (an empty object), made public
|
|
332
332
|
* via `isPublic`, or replaced by a custom implementation via `overrideFn`.
|
|
333
333
|
*
|
|
334
|
-
* See [Automatic CRUD](https://wasp.sh/docs/data
|
|
334
|
+
* See [Automatic CRUD](https://wasp.sh/docs/features/data/crud).
|
|
335
335
|
*
|
|
336
336
|
* @example
|
|
337
337
|
* ```ts
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* the file's default export. The Wasp compiler reads this default export to
|
|
12
12
|
* generate your app.
|
|
13
13
|
*
|
|
14
|
-
* See the [Wasp Spec docs](https://wasp.sh/docs/
|
|
14
|
+
* See the [Wasp Spec docs](https://wasp.sh/docs/features/spec) for the full
|
|
15
15
|
* shape of the configuration.
|
|
16
16
|
*
|
|
17
17
|
* @example
|
|
@@ -42,8 +42,8 @@ export function app(config) {
|
|
|
42
42
|
*
|
|
43
43
|
* A page is a React component rendered by a {@link route}.
|
|
44
44
|
*
|
|
45
|
-
* See [
|
|
46
|
-
* [Auth overview](https://wasp.sh/docs/auth/overview#protecting-a-page-with-authrequired)
|
|
45
|
+
* See [Pages & Routes](https://wasp.sh/docs/features/pages-and-routes) and the
|
|
46
|
+
* [Auth overview](https://wasp.sh/docs/features/auth/overview#protecting-a-page-with-authrequired)
|
|
47
47
|
* for protecting pages with `authRequired`.
|
|
48
48
|
*
|
|
49
49
|
* @example
|
|
@@ -109,7 +109,7 @@ page, config) {
|
|
|
109
109
|
* delegates into `context.entities` and invalidate the client cache when
|
|
110
110
|
* related actions modify them.
|
|
111
111
|
*
|
|
112
|
-
* See [Queries](https://wasp.sh/docs/data
|
|
112
|
+
* See [Queries](https://wasp.sh/docs/features/data/operations/queries).
|
|
113
113
|
*
|
|
114
114
|
* @example
|
|
115
115
|
* ```ts
|
|
@@ -129,7 +129,7 @@ page, config) {
|
|
|
129
129
|
* Reference to the Query's NodeJS implementation.
|
|
130
130
|
*
|
|
131
131
|
* See [the
|
|
132
|
-
* docs](https://wasp.sh/docs/data
|
|
132
|
+
* docs](https://wasp.sh/docs/features/data/operations/queries#implementing-queries)
|
|
133
133
|
* for details on the implementation and its context.
|
|
134
134
|
*
|
|
135
135
|
* {@include ./referenceImports.md}
|
|
@@ -148,7 +148,7 @@ export function query(fn, config) {
|
|
|
148
148
|
* called from the client and the server. Listing entities in `config.entities`
|
|
149
149
|
* lets Wasp invalidate related query caches when this action runs.
|
|
150
150
|
*
|
|
151
|
-
* See [Actions](https://wasp.sh/docs/data
|
|
151
|
+
* See [Actions](https://wasp.sh/docs/features/data/operations/actions).
|
|
152
152
|
*
|
|
153
153
|
* @example
|
|
154
154
|
* ```ts
|
|
@@ -165,7 +165,7 @@ export function query(fn, config) {
|
|
|
165
165
|
* @param fn
|
|
166
166
|
* Reference to the Action's NodeJS implementation.
|
|
167
167
|
*
|
|
168
|
-
* See [the docs](https://wasp.sh/docs/data
|
|
168
|
+
* See [the docs](https://wasp.sh/docs/features/data/operations/actions#implementing-actions) for details on the implementation and its context.
|
|
169
169
|
*
|
|
170
170
|
* {@include ./referenceImports.md}
|
|
171
171
|
* @param config
|
|
@@ -182,7 +182,7 @@ export function action(fn, config) {
|
|
|
182
182
|
* them for webhooks, file uploads, or any HTTP interaction that doesn't fit
|
|
183
183
|
* the {@link query}/{@link action} model.
|
|
184
184
|
*
|
|
185
|
-
* See [Custom HTTP API Endpoints](https://wasp.sh/docs/
|
|
185
|
+
* See [Custom HTTP API Endpoints](https://wasp.sh/docs/features/apis).
|
|
186
186
|
*
|
|
187
187
|
* @example
|
|
188
188
|
* ```ts
|
|
@@ -212,7 +212,7 @@ export function api(method, path, fn, config) {
|
|
|
212
212
|
* CORS) for a group of related endpoints.
|
|
213
213
|
*
|
|
214
214
|
* See the
|
|
215
|
-
* [per-path middleware section](https://wasp.sh/docs/advanced/middleware
|
|
215
|
+
* [per-path middleware section](https://wasp.sh/docs/advanced/server-customization/middleware#3-customize-per-path-middleware).
|
|
216
216
|
*
|
|
217
217
|
* @example
|
|
218
218
|
* ```ts
|
|
@@ -240,7 +240,7 @@ export function apiNamespace(path, config) {
|
|
|
240
240
|
* function as the first argument and configure the executor and schedule
|
|
241
241
|
* in `config`.
|
|
242
242
|
*
|
|
243
|
-
* See [Recurring Jobs](https://wasp.sh/docs/
|
|
243
|
+
* See [Recurring Jobs](https://wasp.sh/docs/features/jobs).
|
|
244
244
|
*
|
|
245
245
|
* @example
|
|
246
246
|
* ```ts
|
|
@@ -273,7 +273,7 @@ export function job(fn, config) {
|
|
|
273
273
|
* `operations` can be enabled with defaults (an empty object), made public
|
|
274
274
|
* via `isPublic`, or replaced by a custom implementation via `overrideFn`.
|
|
275
275
|
*
|
|
276
|
-
* See [Automatic CRUD](https://wasp.sh/docs/data
|
|
276
|
+
* See [Automatic CRUD](https://wasp.sh/docs/features/data/crud).
|
|
277
277
|
*
|
|
278
278
|
* @example
|
|
279
279
|
* ```ts
|