Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@mongosh/service-provider-core

Package Overview
Dependencies
Maintainers
8
Versions
123
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mongosh/service-provider-core - npm Package Compare versions

Comparing version 0.0.7 to 0.0.8

3

lib/connect-info.d.ts

@@ -5,2 +5,3 @@ interface ConnectInfo {

server_version: string;
mongosh_version: string;
server_os?: string;

@@ -17,3 +18,3 @@ server_arch?: string;

}
export default function getConnectInfo(uri: string, buildInfo: any, cmdLineOpts: any, topology: any): ConnectInfo;
export default function getConnectInfo(uri: string, mongoshVersion: string, buildInfo: any, cmdLineOpts: any, topology: any): ConnectInfo;
export {};

@@ -7,3 +7,3 @@ "use strict";

var mongodb_build_info_1 = __importDefault(require("mongodb-build-info"));
function getConnectInfo(uri, buildInfo, cmdLineOpts, topology) {
function getConnectInfo(uri, mongoshVersion, buildInfo, cmdLineOpts, topology) {
var _a = mongodb_build_info_1.default.getGenuineMongoDB(buildInfo, cmdLineOpts), is_genuine = _a.isGenuine, non_genuine_server_name = _a.serverName;

@@ -18,2 +18,4 @@ var _b = mongodb_build_info_1.default.getDataLake(buildInfo), is_data_lake = _b.isDataLake, dl_version = _b.dlVersion;

server_version: buildInfo.version,
node_version: process.version,
mongosh_version: mongoshVersion,
server_os: server_os,

@@ -26,3 +28,2 @@ uri: uri,

dl_version: dl_version,
node_version: process.version,
is_genuine: is_genuine,

@@ -29,0 +30,0 @@ non_genuine_server_name: non_genuine_server_name

{
"name": "@mongosh/service-provider-core",
"version": "0.0.7",
"version": "0.0.8",
"description": "MongoDB Shell Core Service Provider Package",

@@ -17,2 +17,4 @@ "main": "lib/index.js",

"prepublish": "npm run compile-ts",
"test": "mocha -r \"../../scripts/import-expansions.js\" --timeout 60000 --colors -r ts-node/register \"./src/**/*.spec.ts\"",
"test-ci": "mocha -r \"../../scripts/import-expansions.js\" --timeout 60000 -r ts-node/register \"./src/**/*.spec.ts\"",
"lint": "eslint \"**/*.{js,ts,tsx}\"",

@@ -29,3 +31,3 @@ "check": "npm run lint"

"dependencies": {
"@mongosh/i18n": "^0.0.7",
"@mongosh/i18n": "^0.0.8",
"mongodb-build-info": "^1.0.0"

@@ -45,3 +47,3 @@ },

},
"gitHead": "b545071bd3c742c2954ce1b609d6c7ce4fa29d8c"
"gitHead": "ca72bca50bd9654910ea8f36bb6eb3c823cd8a49"
}

@@ -81,2 +81,3 @@ /* eslint camelcase: 0, @typescript-eslint/camelcase: 0 */

server_version: '3.2.0-rc2',
mongosh_version: '0.0.6',
is_enterprise: true,

@@ -95,2 +96,3 @@ auth_type: 'LDAP',

ATLAS_URI,
'0.0.6',
BUILD_INFO,

@@ -106,2 +108,3 @@ CMD_LINE_OPTS,

server_version: '3.2.0-rc2',
mongosh_version: '0.0.6',
is_enterprise: true,

@@ -120,2 +123,3 @@ auth_type: null,

ATLAS_URI,
'0.0.6',
BUILD_INFO,

@@ -125,2 +129,27 @@ CMD_LINE_OPTS,

});
it('reports correct information when an empty uri is passed', function() {
const output = {
is_atlas: false,
is_localhost: false,
server_version: '3.2.0-rc2',
mongosh_version: '0.0.6',
is_enterprise: true,
auth_type: 'LDAP',
is_data_lake: false,
dl_version: null,
is_genuine: true,
non_genuine_server_name: 'mongodb',
server_arch: 'x86_64',
node_version: process.version,
server_os: 'osx',
uri: ''
};
expect(getConnectInfo(
'',
'0.0.6',
BUILD_INFO,
CMD_LINE_OPTS,
TOPOLOGY_WITH_CREDENTIALS)).to.deep.equal(output);
});
});

@@ -10,2 +10,3 @@ /* eslint camelcase: 0, @typescript-eslint/camelcase: 0 */

server_version: string;
mongosh_version: string;
server_os?: string;

@@ -23,3 +24,3 @@ server_arch?: string;

export default function getConnectInfo(uri: string, buildInfo: any, cmdLineOpts: any, topology: any): ConnectInfo {
export default function getConnectInfo(uri: string, mongoshVersion: string, buildInfo: any, cmdLineOpts: any, topology: any): ConnectInfo {
const { isGenuine: is_genuine, serverName: non_genuine_server_name } =

@@ -41,2 +42,4 @@ getBuildInfo.getGenuineMongoDB(buildInfo, cmdLineOpts);

server_version: buildInfo.version,
node_version: process.version,
mongosh_version: mongoshVersion,
server_os,

@@ -49,3 +52,2 @@ uri,

dl_version,
node_version: process.version,
is_genuine,

@@ -52,0 +54,0 @@ non_genuine_server_name

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc