@mongodb-js/connection-info 0.11.7 → 0.11.9

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.
@@ -1,9 +1,19 @@
1
1
  import type { ConnectionOptions } from 'mongodb-data-service';
2
+ /**
3
+ * Atlas metadata for clusters, refer to the backend implementation to see how
4
+ * the values are derived
5
+ *
6
+ * https://github.com/10gen/mms/blob/1efe59a9bb4646635d946d979e5c9f4423f95b10/server/src/main/com/xgen/svc/mms/res/view/explorer/DataExplorerConnectionInfoView.java#L223-L302
7
+ */
2
8
  export interface AtlasClusterMetadata {
9
+ /**
10
+ * Atlas organization id
11
+ */
3
12
  orgId: string;
4
13
  /**
5
- * Project ID that uniquely identifies an Atlas project. Legacy name is "groupId"
6
- * as projects were previously identified as "groups".
14
+ * Project ID that uniquely identifies an Atlas project. Legacy name is
15
+ * "groupId" as projects were previously identified as "groups".
16
+ *
7
17
  * https://www.mongodb.com/docs/atlas/api/atlas-admin-api-ref/#project-id
8
18
  */
9
19
  projectId: string;
@@ -15,6 +25,19 @@ export interface AtlasClusterMetadata {
15
25
  * Cluster name, unique inside same project
16
26
  */
17
27
  clusterName: string;
28
+ /**
29
+ * Possible types of Atlas clusters.
30
+ *
31
+ * https://github.com/10gen/mms/blob/9e6bf2d81d4d85b5ac68a15bf471dcddc5922323/client/packages/types/nds/clusterDescription.ts#L12-L16
32
+ */
33
+ clusterType: 'REPLICASET' | 'SHARDED' | 'GEOSHARDED';
34
+ /**
35
+ * Cluster states
36
+ *
37
+ * `DELETED` is never returned from backend, but can be derived by connection
38
+ * missing when polling connection info list
39
+ */
40
+ clusterState: 'CREATING' | 'UPDATING' | 'PAUSED' | 'IDLE' | 'REPARING' | 'DELETING' | 'DELETED';
18
41
  /**
19
42
  * A special id and type that are only relevant in context of mms metrics
20
43
  * features. These are deployment items props (with a special exception for
@@ -26,10 +49,9 @@ export interface AtlasClusterMetadata {
26
49
  metricsId: string;
27
50
  /**
28
51
  * Somewhat related to the clusterType provided as part of clusterDescription,
29
- * but way less granular:
52
+ * but accounting for special shared cluster types. Used for `/metrics/*`
53
+ * routing and automation agent jobs
30
54
  *
31
- * - `host`: CM/OM clusters not managed by Atlas (in theory should
32
- * never appear in our runtime)
33
55
  * - `cluster`: any sharded cluster type (sharded or geo sharded /
34
56
  * "global writes" one)
35
57
  * - `replicaSet`: anything that is not sharded (both dedicated or "free
@@ -38,21 +60,26 @@ export interface AtlasClusterMetadata {
38
60
  * - `flex`: new type that replaces serverless and some shared
39
61
  * clusters
40
62
  */
41
- metricsType: 'host' | 'replicaSet' | 'cluster' | 'serverless' | 'flex';
63
+ metricsType: 'replicaSet' | 'cluster' | 'serverless' | 'flex';
42
64
  /**
43
65
  * Atlas API base url to be used when making control plane requests for a
44
- * regionalized cluster
66
+ * regionalized cluster. Always `null` while compass-web is disabled for
67
+ * those types of clusters
45
68
  */
46
- regionalBaseUrl: string;
69
+ regionalBaseUrl: null;
47
70
  instanceSize?: string;
48
71
  /**
49
- * Possible types of Atlas clusters.
50
- * Copied from:
51
- * https://github.com/10gen/mms/blob/9e6bf2d81d4d85b5ac68a15bf471dcddc5922323/client/packages/types/nds/clusterDescription.ts#L12-L16
72
+ * Flags indicating Atlas cluster-level control plane feature support
52
73
  */
53
- clusterType: 'REPLICASET' | 'SHARDED' | 'GEOSHARDED';
54
- geoSharding?: {
55
- selfManagedSharding?: boolean;
74
+ supports: {
75
+ /**
76
+ * True if cluster is geo sharded and not self managed
77
+ */
78
+ globalWrites: boolean;
79
+ /**
80
+ * True for dedicated clusters
81
+ */
82
+ rollingIndexes: boolean;
56
83
  };
57
84
  }
58
85
  export interface ConnectionInfo {
@@ -78,7 +105,7 @@ export interface ConnectionInfo {
78
105
  */
79
106
  connectionOptions: ConnectionOptions;
80
107
  /**
81
- * The metdata for the Atlas cluster
108
+ * The metadata for the Atlas cluster. Set from Atlas control plane when using compass-web.
82
109
  */
83
110
  atlasMetadata?: AtlasClusterMetadata;
84
111
  }
@@ -1 +1 @@
1
- {"version":3,"file":"connection-info.d.ts","sourceRoot":"","sources":["../src/connection-info.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAE9D,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;;;;;;OAOG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;;;;;;;;;;;;OAaG;IACH,WAAW,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS,GAAG,YAAY,GAAG,MAAM,CAAC;IACvE;;;OAGG;IACH,eAAe,EAAE,MAAM,CAAC;IAMxB,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;;OAIG;IACH,WAAW,EAAE,YAAY,GAAG,SAAS,GAAG,YAAY,CAAC;IAErD,WAAW,CAAC,EAAE;QACZ,mBAAmB,CAAC,EAAE,OAAO,CAAC;KAC/B,CAAC;CACH;AAED,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,QAAQ,CAAC,EAAE,IAAI,CAAC;IAEhB;;OAEG;IACH,QAAQ,CAAC,EAAE,yBAAyB,CAAC;IAErC;;;OAGG;IACH,mBAAmB,CAAC,EAAE,UAAU,GAAG,QAAQ,CAAC;IAE5C;;OAEG;IACH,iBAAiB,EAAE,iBAAiB,CAAC;IAErC;;OAEG;IACH,aAAa,CAAC,EAAE,oBAAoB,CAAC;CACtC;AAED,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
1
+ {"version":3,"file":"connection-info.d.ts","sourceRoot":"","sources":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H,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
package/package.json CHANGED
@@ -13,7 +13,7 @@
13
13
  "email": "compass@mongodb.com"
14
14
  },
15
15
  "homepage": "https://github.com/mongodb-js/compass",
16
- "version": "0.11.7",
16
+ "version": "0.11.9",
17
17
  "repository": {
18
18
  "type": "git",
19
19
  "url": "https://github.com/mongodb-js/compass.git"
@@ -54,13 +54,13 @@
54
54
  "lodash": "^4.17.21",
55
55
  "mongodb": "^6.14.1",
56
56
  "mongodb-connection-string-url": "^3.0.1",
57
- "mongodb-data-service": "^22.25.7"
57
+ "mongodb-data-service": "^22.25.8"
58
58
  },
59
59
  "devDependencies": {
60
- "@mongodb-js/eslint-config-compass": "^1.3.7",
61
- "@mongodb-js/mocha-config-compass": "^1.6.7",
62
- "@mongodb-js/prettier-config-compass": "^1.2.7",
63
- "@mongodb-js/tsconfig-compass": "^1.2.7",
60
+ "@mongodb-js/eslint-config-compass": "^1.3.8",
61
+ "@mongodb-js/mocha-config-compass": "^1.6.8",
62
+ "@mongodb-js/prettier-config-compass": "^1.2.8",
63
+ "@mongodb-js/tsconfig-compass": "^1.2.8",
64
64
  "@types/chai": "^4.2.21",
65
65
  "@types/mocha": "^9.0.0",
66
66
  "@types/sinon-chai": "^3.2.5",
@@ -73,5 +73,5 @@
73
73
  "sinon": "^17.0.1",
74
74
  "typescript": "^5.0.4"
75
75
  },
76
- "gitHead": "510ac7689cbd747465f8504c205d7ffa33393784"
76
+ "gitHead": "96699b4b12341030ed0922e594c8e9307cd94207"
77
77
  }