Skip to content

Commit

Permalink
chore: add atlas-local to simplify local dev against mms (#4941)
Browse files Browse the repository at this point in the history
* chore: add atlas-local to simplify local dev against mms

* Update packages/compass/src/main/application.ts

Co-authored-by: Rhys <[email protected]>

* Update packages/compass/src/main/application.ts

Co-authored-by: Rhys <[email protected]>

* add atlas-dev

* reorder

---------

Co-authored-by: Rhys <[email protected]>
  • Loading branch information
mcasimir and Anemy authored Oct 4, 2023
1 parent 8d10dea commit a16da48
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/compass-preferences-model/src/preferences.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export type UserConfigurablePreferences = PermanentFeatureFlags &
atlasServiceBackendPreset:
| 'compass-dev'
| 'compass'
| 'atlas-local'
| 'atlas-dev'
| 'atlas';
// Features that are enabled by default in Compass, but are disabled in Data
Expand Down Expand Up @@ -644,8 +645,9 @@ export const storedUserPreferencesProps: Required<{
* Chooses atlas service backend configuration from preset
* - compass-dev: locally running compass kanopy backend (localhost)
* - compass: compass kanopy backend (compass.mongodb.com)
* - atlas-dev: dev mms backend (cloud-dev.mongodb.com)
* - atlas: mms backend (cloud.mongodb.com)
* - atlas-local: local mms backend (http://localhost:8080)
* - atlas-dev: dev mms backend (cloud-dev.mongodb.com)
* - atlas: mms backend (cloud.mongodb.com)
*/
atlasServiceBackendPreset: {
ui: true,
Expand All @@ -655,7 +657,7 @@ export const storedUserPreferencesProps: Required<{
short: 'Configuration used by atlas service',
},
validator: z
.enum(['compass-dev', 'compass', 'atlas-dev', 'atlas'])
.enum(['compass-dev', 'compass', 'atlas-dev', 'atlas-local', 'atlas'])
.default('atlas'),
type: 'string',
},
Expand Down
10 changes: 10 additions & 0 deletions packages/compass/src/main/application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ class CompassApplication {
* Atlas service backend configurations.
* - compass-dev: locally running compass kanopy backend (localhost)
* - compass: compass kanopy backend (compass.mongodb.com)
* - atlas-local: local mms backend (localhost)
* - atlas-dev: dev mms backend (cloud-dev.mongodb.com)
* - atlas: mms backend (cloud.mongodb.com)
*/
Expand All @@ -135,6 +136,15 @@ class CompassApplication {
},
authPortalUrl: 'https://account.mongodb.com/account/login',
},
'atlas-local': {
atlasApiBaseUrl: 'http://localhost:8080/api/private',
atlasApiUnauthBaseUrl: 'http://localhost:8080/api/private/unauth',
atlasLogin: {
clientId: '0oaq1le5jlzxCuTbu357',
issuer: 'https://auth-qa.mongodb.com/oauth2/default',
},
authPortalUrl: 'https://account-dev.mongodb.com/account/login',
},
'atlas-dev': {
atlasApiBaseUrl: 'https://cloud-dev.mongodb.com/api/private',
atlasApiUnauthBaseUrl:
Expand Down

0 comments on commit a16da48

Please sign in to comment.