Skip to content

Commit 5e3ae36

Browse files
Merge remote-tracking branch 'origin/main' into beta-releases
2 parents 016abe5 + cc045b8 commit 5e3ae36

File tree

53 files changed

+1213
-698
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+1213
-698
lines changed

package-lock.json

Lines changed: 339 additions & 339 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/atlas-service/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"email": "[email protected]"
1414
},
1515
"homepage": "https://github.com/mongodb-js/compass",
16-
"version": "0.18.1",
16+
"version": "0.19.0",
1717
"repository": {
1818
"type": "git",
1919
"url": "https://github.com/mongodb-js/compass.git"
@@ -80,7 +80,7 @@
8080
"@mongodb-js/devtools-connect": "^2.6.3",
8181
"@mongodb-js/oidc-plugin": "^0.4.0",
8282
"hadron-app-registry": "^9.1.11",
83-
"compass-preferences-model": "^2.20.2",
83+
"compass-preferences-model": "^2.21.0",
8484
"electron": "^29.4.2",
8585
"hadron-ipc": "^3.2.15",
8686
"lodash": "^4.17.21",

packages/atlas-service/src/atlas-service.spec.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ import { createNoopLoggerAndTelemetry } from '@mongodb-js/compass-logging/provid
77
import { CompassAtlasAuthService } from './compass-atlas-auth-service';
88

99
const ATLAS_CONFIG = {
10-
atlasApiBaseUrl: 'http://example.com/api/private',
11-
atlasApiUnauthBaseUrl: 'http://api.example.com',
10+
wsBaseUrl: 'ws://example.com',
11+
cloudBaseUrl: 'ws://example.com/cloud',
12+
atlasApiBaseUrl: 'http://example.com/api',
1213
atlasLogin: {
1314
clientId: 'some-client-id',
1415
issuer: 'http://example.com/oauth2/default',

packages/atlas-service/src/atlas-service.ts

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,20 @@ export class AtlasService {
2323
) {
2424
this.config = getAtlasConfig(preferences);
2525
}
26-
privateUnAuthEndpoint(path: string): string {
27-
return `${this.config.atlasApiUnauthBaseUrl}/${path}`;
26+
adminApiEndpoint(path?: string, requestId?: string): string {
27+
const uri = encodeURI(
28+
`${this.config.atlasApiBaseUrl}${path ? `/${path}` : ''}`
29+
);
30+
const query = requestId
31+
? `?request_id=${encodeURIComponent(requestId)}`
32+
: '';
33+
return `${uri}${query}`;
34+
}
35+
cloudEndpoint(path?: string): string {
36+
return encodeURI(`${this.config.cloudBaseUrl}${path ? `/${path}` : ''}`);
2837
}
29-
privateAtlasEndpoint(path: string, requestId?: string): string {
30-
return `${this.config.atlasApiBaseUrl}/${path}${
31-
requestId ? `?request_id=${requestId}` : ''
32-
}`;
38+
driverProxyEndpoint(path?: string): string {
39+
return encodeURI(`${this.config.wsBaseUrl}${path ? `/${path}` : ''}`);
3340
}
3441
async fetch(url: RequestInfo, init?: RequestInit): Promise<Response> {
3542
throwIfNetworkTrafficDisabled(this.preferences);
@@ -75,7 +82,6 @@ export class AtlasService {
7582
throw err;
7683
}
7784
}
78-
7985
async authenticatedFetch(
8086
url: RequestInfo,
8187
init?: RequestInit

packages/atlas-service/src/main.spec.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,9 @@ describe('CompassAuthServiceMain', function () {
5353
};
5454

5555
const defaultConfig = {
56-
atlasApiBaseUrl: 'http://example.com',
57-
atlasApiUnauthBaseUrl: 'http://example.com/unauth',
56+
wsBaseUrl: 'ws://example.com',
57+
cloudBaseUrl: 'ws://example.com/cloud',
58+
atlasApiBaseUrl: 'http://example.com/api',
5859
atlasLogin: {
5960
issuer: 'http://example.com',
6061
clientId: '1234abcd',

packages/atlas-service/src/util.ts

Lines changed: 55 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -78,63 +78,95 @@ export async function throwIfNotOk(
7878
}
7979

8080
export type AtlasServiceConfig = {
81+
/**
82+
* MongoDB Driver WebSocket proxy base url
83+
*/
84+
wsBaseUrl: string;
85+
/**
86+
* Cloud UI backend base url
87+
*/
88+
cloudBaseUrl: string;
89+
/**
90+
* Atlas admin API base url
91+
*/
8192
atlasApiBaseUrl: string;
82-
atlasApiUnauthBaseUrl: string;
93+
/**
94+
* Atlas OIDC config
95+
*/
8396
atlasLogin: {
8497
clientId: string;
8598
issuer: string;
8699
};
100+
/**
101+
* Atlas Account Portal UI base url
102+
*/
87103
authPortalUrl: string;
88104
};
89105

90106
/**
91107
* Atlas service backend configurations.
92-
* - compass-dev: locally running compass kanopy backend (localhost)
93-
* - compass: compass kanopy backend (compass.mongodb.com)
94-
* - atlas-local: local mms backend (localhost)
95-
* - atlas-dev: dev mms backend (cloud-dev.mongodb.com)
96-
* - atlas: mms backend (cloud.mongodb.com)
108+
* - atlas-local: local mms backend (localhost)
109+
* - atlas-dev: dev mms backend (cloud-dev.mongodb.com)
110+
* - atlas: mms backend (cloud.mongodb.com)
111+
* - web-sandbox-atlas-local: local mms backend + proxy (localhost / proxy prefix)
112+
* - web-sandbox-atlas-dev: dev mms backend + proxy (cloud-dev.mongodb.com / proxy prefix)
113+
* - web-sandbox-atlas: mms backend + proxy (cloud.mongodb.com / proxy prefix)
97114
*/
98115
const config = {
99-
'compass-dev': {
100-
atlasApiBaseUrl: 'http://localhost:8080',
101-
atlasApiUnauthBaseUrl: 'http://localhost:8080',
116+
'atlas-local': {
117+
wsBaseUrl: 'ws://localhost:61001/ws',
118+
cloudBaseUrl: '',
119+
atlasApiBaseUrl: 'http://localhost:8080/api/private',
102120
atlasLogin: {
103-
clientId: '0oajzdcznmE8GEyio297',
104-
issuer: 'https://auth.mongodb.com/oauth2/default',
121+
clientId: '0oaq1le5jlzxCuTbu357',
122+
issuer: 'https://auth-qa.mongodb.com/oauth2/default',
105123
},
106-
authPortalUrl: 'https://account.mongodb.com/account/login',
124+
authPortalUrl: 'https://account-dev.mongodb.com/account/login',
107125
},
108-
compass: {
109-
atlasApiBaseUrl: 'https://compass.mongodb.com',
110-
atlasApiUnauthBaseUrl: 'https://compass.mongodb.com',
126+
'atlas-dev': {
127+
wsBaseUrl: '',
128+
cloudBaseUrl: '',
129+
atlasApiBaseUrl: 'https://cloud-dev.mongodb.com/api/private',
130+
atlasLogin: {
131+
clientId: '0oaq1le5jlzxCuTbu357',
132+
issuer: 'https://auth-qa.mongodb.com/oauth2/default',
133+
},
134+
authPortalUrl: 'https://account-dev.mongodb.com/account/login',
135+
},
136+
atlas: {
137+
wsBaseUrl: '',
138+
cloudBaseUrl: '',
139+
atlasApiBaseUrl: 'https://cloud.mongodb.com/api/private',
111140
atlasLogin: {
112141
clientId: '0oajzdcznmE8GEyio297',
113142
issuer: 'https://auth.mongodb.com/oauth2/default',
114143
},
115144
authPortalUrl: 'https://account.mongodb.com/account/login',
116145
},
117-
'atlas-local': {
146+
'web-sandbox-atlas-local': {
147+
wsBaseUrl: 'ws://localhost:1337',
148+
cloudBaseUrl: '/cloud-mongodb-com',
118149
atlasApiBaseUrl: 'http://localhost:8080/api/private',
119-
atlasApiUnauthBaseUrl: 'http://localhost:8080/api/private/unauth',
120150
atlasLogin: {
121151
clientId: '0oaq1le5jlzxCuTbu357',
122152
issuer: 'https://auth-qa.mongodb.com/oauth2/default',
123153
},
124154
authPortalUrl: 'https://account-dev.mongodb.com/account/login',
125155
},
126-
'atlas-dev': {
156+
'web-sandbox-atlas-dev': {
157+
wsBaseUrl: 'ws://localhost:1337',
158+
cloudBaseUrl: '/cloud-mongodb-com',
127159
atlasApiBaseUrl: 'https://cloud-dev.mongodb.com/api/private',
128-
atlasApiUnauthBaseUrl: 'https://cloud-dev.mongodb.com/api/private/unauth',
129160
atlasLogin: {
130161
clientId: '0oaq1le5jlzxCuTbu357',
131162
issuer: 'https://auth-qa.mongodb.com/oauth2/default',
132163
},
133164
authPortalUrl: 'https://account-dev.mongodb.com/account/login',
134165
},
135-
atlas: {
166+
'web-sandbox-atlas': {
167+
wsBaseUrl: 'ws://localhost:1337',
168+
cloudBaseUrl: '/cloud-mongodb-com',
136169
atlasApiBaseUrl: 'https://cloud.mongodb.com/api/private',
137-
atlasApiUnauthBaseUrl: 'https://cloud.mongodb.com/api/private/unauth',
138170
atlasLogin: {
139171
clientId: '0oajzdcznmE8GEyio297',
140172
issuer: 'https://auth.mongodb.com/oauth2/default',
@@ -148,9 +180,7 @@ export function getAtlasConfig(
148180
) {
149181
const { atlasServiceBackendPreset } = preferences.getPreferences();
150182
const envConfig = {
151-
atlasApiBaseUrl: process.env.COMPASS_ATLAS_SERVICE_BASE_URL_OVERRIDE,
152-
atlasApiUnauthBaseUrl:
153-
process.env.COMPASS_ATLAS_SERVICE_UNAUTH_BASE_URL_OVERRIDE,
183+
atlasApiBaseUrl: process.env.COMPASS_ATLAS_SERVICE_UNAUTH_BASE_URL_OVERRIDE,
154184
atlasLogin: {
155185
clientId: process.env.COMPASS_CLIENT_ID_OVERRIDE,
156186
issuer: process.env.COMPASS_OIDC_ISSUER_OVERRIDE,
@@ -160,7 +190,7 @@ export function getAtlasConfig(
160190
return defaultsDeep(
161191
envConfig,
162192
config[atlasServiceBackendPreset]
163-
) as typeof envConfig & typeof config[keyof typeof config];
193+
) as AtlasServiceConfig;
164194
}
165195

166196
export function getTrackingUserInfo(userInfo: AtlasUserInfo) {

packages/compass-aggregations/package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@mongodb-js/compass-aggregations",
33
"description": "Compass Aggregation Pipeline Builder",
44
"private": true,
5-
"version": "9.30.0",
5+
"version": "9.31.0",
66
"main": "dist/index.js",
77
"compass:main": "src/index.ts",
88
"types": "dist/index.d.ts",
@@ -61,23 +61,23 @@
6161
"@dnd-kit/core": "^6.0.7",
6262
"@dnd-kit/sortable": "^7.0.2",
6363
"@dnd-kit/utilities": "^3.2.1",
64-
"@mongodb-js/atlas-service": "^0.18.1",
65-
"@mongodb-js/compass-app-stores": "^7.14.0",
66-
"@mongodb-js/compass-collection": "^4.27.0",
64+
"@mongodb-js/atlas-service": "^0.19.0",
65+
"@mongodb-js/compass-app-stores": "^7.15.0",
66+
"@mongodb-js/compass-collection": "^4.28.0",
6767
"@mongodb-js/compass-components": "^1.25.1",
68-
"@mongodb-js/compass-connections": "^1.29.0",
69-
"@mongodb-js/compass-crud": "^13.28.0",
68+
"@mongodb-js/compass-connections": "^1.30.0",
69+
"@mongodb-js/compass-crud": "^13.29.0",
7070
"@mongodb-js/compass-editor": "^0.24.1",
71-
"@mongodb-js/compass-field-store": "^9.4.0",
72-
"@mongodb-js/compass-generative-ai": "^0.11.1",
71+
"@mongodb-js/compass-field-store": "^9.5.0",
72+
"@mongodb-js/compass-generative-ai": "^0.12.0",
7373
"@mongodb-js/compass-logging": "^1.2.18",
7474
"@mongodb-js/compass-utils": "^0.6.4",
75-
"@mongodb-js/compass-workspaces": "^0.9.0",
75+
"@mongodb-js/compass-workspaces": "^0.10.0",
7676
"@mongodb-js/explain-plan-helper": "^1.1.12",
7777
"@mongodb-js/mongodb-constants": "^0.10.0",
7878
"@mongodb-js/my-queries-storage": "^0.8.1",
7979
"bson": "^6.7.0",
80-
"compass-preferences-model": "^2.20.2",
80+
"compass-preferences-model": "^2.21.0",
8181
"ejson-shell-parser": "^2.0.1",
8282
"hadron-app-registry": "^9.1.11",
8383
"hadron-document": "^8.5.3",

packages/compass-app-stores/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"email": "[email protected]"
1212
},
1313
"homepage": "https://github.com/mongodb-js/compass",
14-
"version": "7.14.0",
14+
"version": "7.15.0",
1515
"repository": {
1616
"type": "git",
1717
"url": "https://github.com/mongodb-js/compass.git"
@@ -75,7 +75,7 @@
7575
},
7676
"dependencies": {
7777
"@mongodb-js/compass-components": "^1.25.1",
78-
"@mongodb-js/compass-connections": "^1.29.0",
78+
"@mongodb-js/compass-connections": "^1.30.0",
7979
"@mongodb-js/compass-logging": "^1.2.18",
8080
"@mongodb-js/connection-info": "^0.3.0",
8181
"hadron-app-registry": "^9.1.11",

packages/compass-collection/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"email": "[email protected]"
1212
},
1313
"homepage": "https://github.com/mongodb-js/compass",
14-
"version": "4.27.0",
14+
"version": "4.28.0",
1515
"repository": {
1616
"type": "git",
1717
"url": "https://github.com/mongodb-js/compass.git"
@@ -48,13 +48,13 @@
4848
"reformat": "npm run eslint . -- --fix && npm run prettier -- --write ."
4949
},
5050
"dependencies": {
51-
"@mongodb-js/compass-app-stores": "^7.14.0",
51+
"@mongodb-js/compass-app-stores": "^7.15.0",
5252
"@mongodb-js/compass-components": "^1.25.1",
53-
"@mongodb-js/compass-connections": "^1.29.0",
53+
"@mongodb-js/compass-connections": "^1.30.0",
5454
"@mongodb-js/connection-info": "^0.3.0",
5555
"@mongodb-js/compass-logging": "^1.2.18",
56-
"@mongodb-js/compass-workspaces": "^0.9.0",
57-
"compass-preferences-model": "^2.20.2",
56+
"@mongodb-js/compass-workspaces": "^0.10.0",
57+
"compass-preferences-model": "^2.21.0",
5858
"hadron-app-registry": "^9.1.11",
5959
"mongodb-collection-model": "^5.20.0",
6060
"mongodb-ns": "^2.4.2",

packages/compass-connection-import-export/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"email": "[email protected]"
1515
},
1616
"homepage": "https://github.com/mongodb-js/compass",
17-
"version": "0.25.0",
17+
"version": "0.26.0",
1818
"repository": {
1919
"type": "git",
2020
"url": "https://github.com/mongodb-js/compass.git"
@@ -52,9 +52,9 @@
5252
},
5353
"dependencies": {
5454
"@mongodb-js/compass-components": "^1.25.1",
55-
"@mongodb-js/compass-connections": "^1.29.0",
56-
"@mongodb-js/connection-storage": "^0.11.0",
57-
"compass-preferences-model": "^2.20.2",
55+
"@mongodb-js/compass-connections": "^1.30.0",
56+
"@mongodb-js/connection-storage": "^0.12.0",
57+
"compass-preferences-model": "^2.21.0",
5858
"hadron-ipc": "^3.2.15",
5959
"react": "^17.0.2"
6060
},

0 commit comments

Comments
 (0)