Skip to content

Commit

Permalink
chore: App router migration - Add env variables for `auth/forgot-pass…
Browse files Browse the repository at this point in the history
…word/*`, `auth/login`, `auth/logout`, `auth/new`, `auth/saml-idp (#16488)

* Add env variables for auth/forgot-password, auth/login, auth/logout

* Add env variables for auth/new, auth/saml-idp
  • Loading branch information
hbjORbj authored and zomars committed Sep 4, 2024
1 parent 91813b9 commit 0b9962a
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 1 deletion.
8 changes: 8 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,14 @@ APP_ROUTER_GETTING_STARTED_STEP_ENABLED=0
APP_ROUTER_APPS_ENABLED=0
APP_ROUTER_VIDEO_ENABLED=0
APP_ROUTER_TEAMS_ENABLED=0
APP_ROUTER_AUTH_FORGOT_PASSWORD_ENABLED=0
APP_ROUTER_AUTH_LOGIN_ENABLED=0
APP_ROUTER_AUTH_LOGOUT_ENABLED=0
APP_ROUTER_AUTH_NEW_ENABLED=0
APP_ROUTER_AUTH_SAML_ENABLED=0
APP_ROUTER_AUTH_ERROR_ENABLED=0
APP_ROUTER_AUTH_PLATFORM_ENABLED=0
APP_ROUTER_AUTH_OAUTH2_ENABLED=0

# disable setry server source maps
SENTRY_DISABLE_SERVER_WEBPACK_PLUGIN=1
Expand Down
8 changes: 8 additions & 0 deletions apps/web/abTest/middlewareFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ const ROUTES: [URLPattern, boolean][] = [
["/apps/:slug/setup", process.env.APP_ROUTER_APPS_SLUG_SETUP_ENABLED === "1"] as const,
["/apps/categories", process.env.APP_ROUTER_APPS_CATEGORIES_ENABLED === "1"] as const,
["/apps/categories/:category", process.env.APP_ROUTER_APPS_CATEGORIES_CATEGORY_ENABLED === "1"] as const,
["/auth/forgot-password/:path*", process.env.APP_ROUTER_AUTH_FORGOT_PASSWORD_ENABLED === "1"] as const,
["/auth/login", process.env.APP_ROUTER_AUTH_LOGIN_ENABLED === "1"] as const,
["/auth/logout", process.env.APP_ROUTER_AUTH_LOGOUT_ENABLED === "1"] as const,
["/auth/new", process.env.APP_ROUTER_AUTH_NEW_ENABLED === "1"] as const,
["/auth/saml-idp", process.env.APP_ROUTER_AUTH_SAML_ENABLED === "1"] as const,
["/auth/error", process.env.APP_ROUTER_AUTH_ERROR_ENABLED === "1"] as const,
["/auth/platform/:path*", process.env.APP_ROUTER_AUTH_PLATFORM_ENABLED === "1"] as const,
["/auth/oauth2/:path*", process.env.APP_ROUTER_AUTH_OAUTH2_ENABLED === "1"] as const,
["/workflows/:path*", process.env.APP_ROUTER_WORKFLOWS_ENABLED === "1"] as const,
["/settings/teams/:path*", process.env.APP_ROUTER_SETTINGS_TEAMS_ENABLED === "1"] as const,
["/getting-started/:step", process.env.APP_ROUTER_GETTING_STARTED_STEP_ENABLED === "1"] as const,
Expand Down
8 changes: 8 additions & 0 deletions apps/web/scripts/vercel-production-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ checkRoute "$APP_ROUTER_APPS_SLUG_ENABLED" app/future/apps/\[slug\]
checkRoute "$APP_ROUTER_APPS_SLUG_SETUP_ENABLED" app/future/apps/\[slug\]/setup
checkRoute "$APP_ROUTER_APPS_CATEGORIES_ENABLED" app/future/apps/categories
checkRoute "$APP_ROUTER_APPS_CATEGORIES_CATEGORY_ENABLED" app/future/apps/categories/\[category\]
checkRoute "$APP_ROUTER_AUTH_FORGOT_PASSWORD_ENABLED" app/future/auth/forgot-password
checkRoute "$APP_ROUTER_AUTH_LOGIN_ENABLED" app/future/auth/login
checkRoute "$APP_ROUTER_AUTH_LOGOUT_ENABLED" app/future/auth/logout
checkRoute "$APP_ROUTER_AUTH_NEW_ENABLED" app/future/auth/new
checkRoute "$APP_ROUTER_AUTH_SAML_ENABLED" app/future/auth/saml-idp
checkRoute "$APP_ROUTER_AUTH_ERROR_ENABLED" app/future/auth/error
checkRoute "$APP_ROUTER_AUTH_PLATFORM_ENABLED" app/future/auth/platform
checkRoute "$APP_ROUTER_AUTH_OAUTH2_ENABLED" app/future/auth/oauth2
checkRoute "$APP_ROUTER_WORKFLOWS_ENABLED" app/future/workflows
checkRoute "$APP_ROUTER_SETTINGS_TEAMS_ENABLED" app/future/settings/teams
checkRoute "$APP_ROUTER_GETTING_STARTED_STEP_ENABLED" app/future/getting-started
Expand Down
15 changes: 14 additions & 1 deletion turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,12 @@
"@calcom/embed-core#build": {
"cache": false,
"outputs": ["../../../apps/web/public/embed/**"],
"env": ["EMBED_PUBLIC_VERCEL_URL", "EMBED_PUBLIC_WEBAPP_URL", "EMBED_PUBLIC_EMBED_FINGER_PRINT", "EMBED_PUBLIC_EMBED_VERSION"]
"env": [
"EMBED_PUBLIC_VERCEL_URL",
"EMBED_PUBLIC_WEBAPP_URL",
"EMBED_PUBLIC_EMBED_FINGER_PRINT",
"EMBED_PUBLIC_EMBED_VERSION"
]
},
"embed-tests-update-snapshots:ci": {
"cache": false,
Expand Down Expand Up @@ -234,6 +239,14 @@
"APP_ROUTER_SETTINGS_TEAMS_ENABLED",
"APP_ROUTER_WORKFLOWS_ENABLED",
"APP_ROUTER_VIDEO_ENABLED",
"APP_ROUTER_AUTH_FORGOT_PASSWORD_ENABLED",
"APP_ROUTER_AUTH_LOGIN_ENABLED",
"APP_ROUTER_AUTH_LOGOUT_ENABLED",
"APP_ROUTER_AUTH_NEW_ENABLED",
"APP_ROUTER_AUTH_SAML_ENABLED",
"APP_ROUTER_AUTH_ERROR_ENABLED",
"APP_ROUTER_AUTH_PLATFORM_ENABLED",
"APP_ROUTER_AUTH_OAUTH2_ENABLED",
"APP_ROUTER_TEAMS_ENABLED",
"APP_USER_NAME",
"BASECAMP3_CLIENT_ID",
Expand Down

0 comments on commit 0b9962a

Please sign in to comment.