@mongodb-js/compass-web 0.7.0 → 0.8.1
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-storage.d.ts +11 -3
- package/dist/connection-storage.d.ts.map +1 -1
- package/dist/entrypoint.d.ts +48 -0
- package/dist/entrypoint.d.ts.map +1 -1
- package/dist/index.js +116 -116
- package/package.json +36 -36
|
@@ -10,12 +10,13 @@ type RegionConfig = {
|
|
|
10
10
|
type ReplicationSpec = {
|
|
11
11
|
regionConfigs: RegionConfig[];
|
|
12
12
|
};
|
|
13
|
+
type ClusterType = 'REPLICASET' | 'SHARDED' | 'GEOSHARDED';
|
|
13
14
|
type ClusterDescription = {
|
|
14
15
|
'@provider': string;
|
|
15
16
|
uniqueId: string;
|
|
16
17
|
groupId: string;
|
|
17
18
|
name: string;
|
|
18
|
-
clusterType:
|
|
19
|
+
clusterType: ClusterType;
|
|
19
20
|
srvAddress: string;
|
|
20
21
|
state: string;
|
|
21
22
|
deploymentItemName: string;
|
|
@@ -55,14 +56,21 @@ export declare function buildConnectionInfoFromClusterDescription(driverProxyEnd
|
|
|
55
56
|
};
|
|
56
57
|
atlasMetadata: {
|
|
57
58
|
instanceSize: string | undefined;
|
|
58
|
-
|
|
59
|
-
|
|
59
|
+
clusterType: ClusterType;
|
|
60
|
+
metricsId: string;
|
|
61
|
+
metricsType: "serverless" | "replicaSet" | "cluster";
|
|
60
62
|
orgId: string;
|
|
61
63
|
projectId: string;
|
|
64
|
+
clusterUniqueId: string;
|
|
62
65
|
clusterName: string;
|
|
63
66
|
regionalBaseUrl: string;
|
|
64
67
|
};
|
|
65
68
|
};
|
|
69
|
+
/**
|
|
70
|
+
* Only used in the sandbox to provide connection info when connecting to the
|
|
71
|
+
* non-Atlas deployment
|
|
72
|
+
* @internal
|
|
73
|
+
*/
|
|
66
74
|
export declare const SandboxConnectionStorageProviver: React.Provider<ConnectionStorage | null>;
|
|
67
75
|
export declare const AtlasCloudConnectionStorageProvider: ({ orgId, projectId, children, }: {
|
|
68
76
|
orgId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connection-storage.d.ts","sourceRoot":"","sources":["../src/connection-storage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAClD,OAAO,KAAK,EACV,iBAAiB,EAElB,MAAM,yCAAyC,CAAC;AAUjD,KAAK,cAAc,GAAG;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,KAAK,YAAY,GAAG;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,cAAc,CAAC;CAChC,CAAC;AAEF,KAAK,eAAe,GAAG;IACrB,aAAa,EAAE,YAAY,EAAE,CAAC;CAC/B,CAAC;AAEF,KAAK,kBAAkB,GAAG;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"connection-storage.d.ts","sourceRoot":"","sources":["../src/connection-storage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAClD,OAAO,KAAK,EACV,iBAAiB,EAElB,MAAM,yCAAyC,CAAC;AAUjD,KAAK,cAAc,GAAG;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,KAAK,YAAY,GAAG;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,cAAc,CAAC;CAChC,CAAC;AAEF,KAAK,eAAe,GAAG;IACrB,aAAa,EAAE,YAAY,EAAE,CAAC;CAC/B,CAAC;AAEF,KAAK,WAAW,GAAG,YAAY,GAAG,SAAS,GAAG,YAAY,CAAC;AAE3D,KAAK,kBAAkB,GAAG;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,WAAW,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,kBAAkB,EAAE,MAAM,CAAC;IAC3B,mBAAmB,CAAC,EAAE,eAAe,EAAE,CAAC;CACzC,CAAC;AAEF,MAAM,MAAM,0CAA0C,GAAG,kBAAkB,GAAG;IAC5E,oBAAoB,EAAE;QAAE,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC;CAC/C,CAAC;AAEF,KAAK,wBAAwB,GAAG;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE;QACL,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;CACH,CAAC;AAEF,KAAK,sBAAsB,GAAG;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE;QACL,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;CACH,CAAC;AAEF,KAAK,UAAU,GAAG;IAChB,WAAW,CAAC,EAAE,wBAAwB,EAAE,CAAC;IACzC,QAAQ,CAAC,EAAE,sBAAsB,EAAE,CAAC;CACrC,CAAC;AAqFF,wBAAgB,yCAAyC,CACvD,mBAAmB,EAAE,MAAM,EAC3B,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,0CAA0C,EACvD,UAAU,EAAE,UAAU;;;;;;;;;;;;;;;;;;;;;;EAmDvB;AA6FD;;;;GAIG;AACH,eAAO,MAAM,gCAAgC,0CACH,CAAC;AAE3C,eAAO,MAAM,mCAAmC;WAMrC,MAAM;eACF,MAAM;cACP,MAAM,UAAU;iBAiB7B,CAAC"}
|
package/dist/entrypoint.d.ts
CHANGED
|
@@ -5,17 +5,65 @@ import WorkspacesPlugin from '@mongodb-js/compass-workspaces';
|
|
|
5
5
|
import type { AllPreferences } from 'compass-preferences-model/provider';
|
|
6
6
|
import type { TrackFunction, LogFunction, DebugFunction } from './logger-and-telemetry';
|
|
7
7
|
type CompassWebProps = {
|
|
8
|
+
/**
|
|
9
|
+
* App name to be passed with the connection string when connection to a
|
|
10
|
+
* cluster (default: "Compass Web")
|
|
11
|
+
*/
|
|
8
12
|
appName?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Atlas Cloud organization id
|
|
15
|
+
*/
|
|
9
16
|
orgId: string;
|
|
17
|
+
/**
|
|
18
|
+
* Atlas Cloud project id (sometimes called group id)
|
|
19
|
+
*/
|
|
10
20
|
projectId: string;
|
|
21
|
+
/**
|
|
22
|
+
* Whether or not darkMode should be active for the app
|
|
23
|
+
*/
|
|
11
24
|
darkMode?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Optional. If passed, compass-web will try to find connection info with that
|
|
27
|
+
* id in connection storage and pass it as autoconnect info to the
|
|
28
|
+
* compass-connections
|
|
29
|
+
*/
|
|
12
30
|
initialAutoconnectId?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Optional. If passed, compass-web will open provided workspace right away.
|
|
33
|
+
* If workspace requires active connection, the connectionId from the
|
|
34
|
+
* workspace will be used for the autoconnect info getter. In that case
|
|
35
|
+
* connectionId from the workspace takes precedence over
|
|
36
|
+
* `initialAutoconnectId`
|
|
37
|
+
*/
|
|
13
38
|
initialWorkspace?: OpenWorkspaceOptions;
|
|
39
|
+
/**
|
|
40
|
+
* Callback prop called when current active workspace changes. Can be used to
|
|
41
|
+
* communicate current workspace back to the parent component for example to
|
|
42
|
+
* sync router with the current active workspace
|
|
43
|
+
*/
|
|
14
44
|
onActiveWorkspaceTabChange: React.ComponentProps<typeof WorkspacesPlugin>['onActiveWorkspaceTabChange'];
|
|
45
|
+
/**
|
|
46
|
+
* Set of initial preferences to override default values
|
|
47
|
+
*/
|
|
15
48
|
initialPreferences?: Partial<AllPreferences>;
|
|
49
|
+
/**
|
|
50
|
+
* Callback prop called every time any code inside Compass logs something
|
|
51
|
+
*/
|
|
16
52
|
onLog?: LogFunction;
|
|
53
|
+
/**
|
|
54
|
+
* Callback prop called every time any code inside Compass prints a debug
|
|
55
|
+
* statement
|
|
56
|
+
*/
|
|
17
57
|
onDebug?: DebugFunction;
|
|
58
|
+
/**
|
|
59
|
+
* Callback prop called for every track event inside Compass
|
|
60
|
+
*/
|
|
18
61
|
onTrack?: TrackFunction;
|
|
62
|
+
/**
|
|
63
|
+
* Callback prop that will be called with atlas metadata for a certain cluster
|
|
64
|
+
* when the action is selected from the sidebar actions. Should be used to
|
|
65
|
+
* show the Atlas Cloud "Connect" modal
|
|
66
|
+
*/
|
|
19
67
|
onOpenConnectViaModal?: (atlasMetadata: ConnectionInfo['atlasMetadata']) => void;
|
|
20
68
|
};
|
|
21
69
|
declare const CompassWeb: ({ appName, orgId, projectId, darkMode, initialAutoconnectId, initialWorkspace, onActiveWorkspaceTabChange, initialPreferences, onLog, onDebug, onTrack, onOpenConnectViaModal, }: CompassWebProps) => JSX.Element;
|
package/dist/entrypoint.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entrypoint.d.ts","sourceRoot":"","sources":["../src/entrypoint.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAKjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAG/E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,gBAEN,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"entrypoint.d.ts","sourceRoot":"","sources":["../src/entrypoint.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAKjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAG/E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,gBAEN,MAAM,gCAAgC,CAAC;AAgCxC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM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