-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0bffec9
commit 7215103
Showing
7 changed files
with
704 additions
and
422 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ on: | |
options: | ||
- production | ||
- recette | ||
- next | ||
app_version: | ||
description: app version | ||
type: string | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ export interface PublicConfig { | |
host: string; | ||
baseUrl: string; | ||
apiEndpoint: string; | ||
env: "local" | "recette" | "production"; | ||
env: "local" | "recette" | "production" | "next"; | ||
version: string; | ||
productMeta: { | ||
brandName: "sirius"; | ||
|
@@ -30,6 +30,22 @@ function getProductionPublicConfig(): PublicConfig { | |
}; | ||
} | ||
|
||
function getNextPublicConfig(): PublicConfig { | ||
const host = "https://sirius-next.inserjeunes.beta.gouv.fr"; | ||
|
||
return { | ||
sentry: { | ||
dsn: "https://[email protected]/153", | ||
}, | ||
host, | ||
baseUrl: `https://${host}`, | ||
env: "production", | ||
apiEndpoint: `https://${host}/api`, | ||
version: getVersion(), | ||
productMeta: getProductMeta(), | ||
}; | ||
} | ||
|
||
function getRecettePublicConfig(): PublicConfig { | ||
const host = "sirius-recette.inserjeunes.beta.gouv.fr"; | ||
|
||
|
@@ -92,6 +108,7 @@ function getEnv(): PublicConfig["env"] { | |
switch (env) { | ||
case "production": | ||
case "recette": | ||
case "next": | ||
case "local": | ||
return env; | ||
default: | ||
|
@@ -105,6 +122,8 @@ function getPublicConfig(): PublicConfig { | |
return getProductionPublicConfig(); | ||
case "recette": | ||
return getRecettePublicConfig(); | ||
case "next": | ||
return getNextPublicConfig(); | ||
case "local": | ||
return getLocalPublicConfig(); | ||
} | ||
|