@mongodb-js/connection-info 0.11.6 → 0.11.8
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.
- package/dist/connection-info.d.ts +41 -14
- package/dist/connection-info.d.ts.map +1 -1
- package/package.json +9 -11
|
@@ -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
|
|
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
|
|
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: '
|
|
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:
|
|
69
|
+
regionalBaseUrl: null;
|
|
47
70
|
instanceSize?: string;
|
|
48
71
|
/**
|
|
49
|
-
*
|
|
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
|
-
|
|
54
|
-
|
|
55
|
-
|
|
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 {
|
|
@@ -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;
|
|
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;;;;;GAKG;AACH,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;;;OAKG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;;OAIG;IACH,WAAW,EAAE,YAAY,GAAG,SAAS,GAAG,YAAY,CAAC;IAErD;;;;;OAKG;IACH,YAAY,EACR,UAAU,GACV,UAAU,GACV,QAAQ,GACR,MAAM,GACN,UAAU,GACV,UAAU,GACV,SAAS,CAAC;IAEd;;;;;;;OAOG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;;;;;;;;;OAYG;IACH,WAAW,EAAE,YAAY,GAAG,SAAS,GAAG,YAAY,GAAG,MAAM,CAAC;IAE9D;;;;OAIG;IACH,eAAe,EAAE,IAAI,CAAC;IAQtB,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,QAAQ,EAAE;QACR;;WAEG;QACH,YAAY,EAAE,OAAO,CAAC;QAEtB;;WAEG;QACH,cAAc,EAAE,OAAO,CAAC;KACzB,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"}
|
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.
|
|
16
|
+
"version": "0.11.8",
|
|
17
17
|
"repository": {
|
|
18
18
|
"type": "git",
|
|
19
19
|
"url": "https://github.com/mongodb-js/compass.git"
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"prepublishOnly": "npm run compile && compass-scripts check-exports-exist",
|
|
39
39
|
"compile": "tsc -p tsconfig.json && gen-esm-wrapper . ./dist/.esm-wrapper.mjs",
|
|
40
40
|
"typecheck": "tsc -p tsconfig-lint.json --noEmit",
|
|
41
|
-
"eslint": "eslint",
|
|
42
|
-
"prettier": "prettier",
|
|
41
|
+
"eslint": "eslint-compass",
|
|
42
|
+
"prettier": "prettier-compass",
|
|
43
43
|
"lint": "npm run eslint . && npm run prettier -- --check .",
|
|
44
44
|
"depcheck": "compass-scripts check-peer-deps && depcheck",
|
|
45
45
|
"check": "npm run typecheck && npm run lint && npm run depcheck",
|
|
@@ -54,26 +54,24 @@
|
|
|
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.
|
|
57
|
+
"mongodb-data-service": "^22.25.8"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
|
-
"@mongodb-js/eslint-config-compass": "^1.3.
|
|
61
|
-
"@mongodb-js/mocha-config-compass": "^1.6.
|
|
62
|
-
"@mongodb-js/prettier-config-compass": "^1.2.
|
|
63
|
-
"@mongodb-js/tsconfig-compass": "^1.2.
|
|
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",
|
|
67
67
|
"bson": "^6.10.3",
|
|
68
68
|
"chai": "^4.3.6",
|
|
69
69
|
"depcheck": "^1.4.1",
|
|
70
|
-
"eslint": "^7.25.0",
|
|
71
70
|
"gen-esm-wrapper": "^1.1.0",
|
|
72
71
|
"mocha": "^10.2.0",
|
|
73
72
|
"nyc": "^15.1.0",
|
|
74
|
-
"prettier": "^2.7.1",
|
|
75
73
|
"sinon": "^17.0.1",
|
|
76
74
|
"typescript": "^5.0.4"
|
|
77
75
|
},
|
|
78
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "d6e9dc2456869b8b0c3052dde8b79952c14372e4"
|
|
79
77
|
}
|