@mongodb-js/compass-web 0.4.2 → 0.4.4
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/atlas-auth-service.d.ts +5 -0
- package/dist/atlas-auth-service.d.ts.map +1 -0
- package/dist/connection-storage.d.ts +62 -0
- package/dist/connection-storage.d.ts.map +1 -0
- package/dist/entrypoint.d.ts +9 -7
- package/dist/entrypoint.d.ts.map +1 -1
- package/dist/index.js +116 -116
- package/package.json +23 -23
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"atlas-auth-service.d.ts","sourceRoot":"","sources":["../src/atlas-auth-service.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AA2B1B,wBAAgB,6BAA6B,CAAC,EAC5C,QAAQ,GACT,EAAE;IACD,QAAQ,EAAE,KAAK,CAAC,UAAU,CAAC;CAC5B,eAMA"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ConnectionInfo } from '@mongodb-js/connection-storage/provider';
|
|
3
|
+
type ClusterDescription = {
|
|
4
|
+
'@provider': string;
|
|
5
|
+
uniqueId: string;
|
|
6
|
+
groupId: string;
|
|
7
|
+
name: string;
|
|
8
|
+
clusterType: string;
|
|
9
|
+
srvAddress: string;
|
|
10
|
+
state: string;
|
|
11
|
+
deploymentItemName: string;
|
|
12
|
+
};
|
|
13
|
+
type ClusterDescriptionWithDataProcessingRegion = ClusterDescription & {
|
|
14
|
+
dataProcessingRegion: {
|
|
15
|
+
regionalUrl: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
type ReplicaSetDeploymentItem = {
|
|
19
|
+
_id: string;
|
|
20
|
+
state: {
|
|
21
|
+
clusterId: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
type ShardingDeploymentItem = {
|
|
25
|
+
name: string;
|
|
26
|
+
state: {
|
|
27
|
+
clusterId: string;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
type Deployment = {
|
|
31
|
+
replicaSets?: ReplicaSetDeploymentItem[];
|
|
32
|
+
sharding?: ShardingDeploymentItem[];
|
|
33
|
+
};
|
|
34
|
+
export declare function buildConnectionInfoFromClusterDescription(driverProxyEndpoint: string, orgId: string, projectId: string, description: ClusterDescriptionWithDataProcessingRegion, deployment: Deployment): {
|
|
35
|
+
id: string;
|
|
36
|
+
connectionOptions: {
|
|
37
|
+
connectionString: string;
|
|
38
|
+
lookup: () => {
|
|
39
|
+
wsURL: string;
|
|
40
|
+
projectId: string;
|
|
41
|
+
clusterName: string;
|
|
42
|
+
srvAddress: string;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
atlasMetadata: {
|
|
46
|
+
clusterId: string;
|
|
47
|
+
clusterType: "serverless" | "replicaSet" | "cluster";
|
|
48
|
+
orgId: string;
|
|
49
|
+
projectId: string;
|
|
50
|
+
clusterName: string;
|
|
51
|
+
regionalBaseUrl: string;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
export declare const SandboxAutoconnectProvider: React.Provider<ConnectionInfo | null>;
|
|
55
|
+
export declare const AtlasCloudConnectionStorageProvider: ({ orgId, projectId, autoConnectConnectionId, children, }: {
|
|
56
|
+
orgId: string;
|
|
57
|
+
projectId: string;
|
|
58
|
+
autoConnectConnectionId?: string | undefined;
|
|
59
|
+
children: React.ReactChild;
|
|
60
|
+
}) => JSX.Element;
|
|
61
|
+
export {};
|
|
62
|
+
//# sourceMappingURL=connection-storage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connection-storage.d.ts","sourceRoot":"","sources":["../src/connection-storage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwC,MAAM,OAAO,CAAC;AAC7D,OAAO,KAAK,EAEV,cAAc,EACf,MAAM,yCAAyC,CAAC;AAWjD,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,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,kBAAkB,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF,KAAK,0CAA0C,GAAG,kBAAkB,GAAG;IACrE,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;AAoDF,wBAAgB,yCAAyC,CACvD,mBAAmB,EAAE,MAAM,EAC3B,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,0CAA0C,EACvD,UAAU,EAAE,UAAU;;;;;;;;;;;;;;;;;;;EA6CvB;AAgHD,eAAO,MAAM,0BAA0B,uCAAqC,CAAC;AAE7E,eAAO,MAAM,mCAAmC;WAOrC,MAAM;eACF,MAAM;;cAEP,MAAM,UAAU;iBAsB7B,CAAC"}
|
package/dist/entrypoint.d.ts
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type ConnectionInfo } from '@mongodb-js/compass-connections/provider';
|
|
3
|
+
import type { OpenWorkspaceOptions } from '@mongodb-js/compass-workspaces';
|
|
3
4
|
import WorkspacesPlugin from '@mongodb-js/compass-workspaces';
|
|
4
5
|
import type { AllPreferences } from 'compass-preferences-model/provider';
|
|
5
|
-
type CompassWorkspaceProps = Pick<React.ComponentProps<typeof WorkspacesPlugin>, 'initialWorkspaceTabs' | 'onActiveWorkspaceTabChange'> & {
|
|
6
|
-
connectionInfo: ConnectionInfo;
|
|
7
|
-
};
|
|
8
6
|
type CompassWebProps = {
|
|
9
7
|
appName?: string;
|
|
8
|
+
orgId: string;
|
|
9
|
+
projectId: string;
|
|
10
10
|
darkMode?: boolean;
|
|
11
|
-
stackedElementsZIndex?: number;
|
|
12
|
-
onAutoconnectInfoRequest: () => Promise<ConnectionInfo>;
|
|
13
11
|
renderConnecting?: (connectionInfo: ConnectionInfo | null) => React.ReactNode;
|
|
14
12
|
renderError?: (connectionInfo: ConnectionInfo | null, err: any) => React.ReactNode;
|
|
13
|
+
initialWorkspace: Extract<OpenWorkspaceOptions, {
|
|
14
|
+
type: 'Databases' | 'Collections' | 'Collection';
|
|
15
|
+
}>;
|
|
16
|
+
onActiveWorkspaceTabChange: React.ComponentProps<typeof WorkspacesPlugin>['onActiveWorkspaceTabChange'];
|
|
15
17
|
initialPreferences?: Partial<AllPreferences>;
|
|
16
|
-
}
|
|
17
|
-
declare const CompassWeb: ({ appName,
|
|
18
|
+
};
|
|
19
|
+
declare const CompassWeb: ({ appName, orgId, projectId, darkMode, initialWorkspace, onActiveWorkspaceTabChange, initialPreferences, renderConnecting, renderError, __TEST_MONGODB_DATA_SERVICE_CONNECT_FN, }: CompassWebProps) => JSX.Element;
|
|
18
20
|
export { CompassWeb };
|
|
19
21
|
//# sourceMappingURL=entrypoint.d.ts.map
|
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,KAAwC,MAAM,OAAO,CAAC;AAK7D,OAAO,EAGL,KAAK,cAAc,EAEpB,M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