Socket
Socket
Sign inDemoInstall

mongodb-memory-server-core

Package Overview
Dependencies
Maintainers
2
Versions
270
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mongodb-memory-server-core - npm Package Compare versions

Comparing version 8.13.0 to 8.14.0-beta.1

2

lib/util/MongoBinaryDownload.d.ts

@@ -17,3 +17,3 @@ /// <reference types="node" />

_downloadingUrl?: string;
/**These options are kind of raw, they are not run through DryMongoBinary.generateOptions */
/** These options are kind of raw, they are not run through DryMongoBinary.generateOptions */
binaryOpts: Required<MongoBinaryOpts>;

@@ -20,0 +20,0 @@ get checkMD5(): boolean;

@@ -42,2 +42,6 @@ import { AnyOS, LinuxOS } from './getos';

/**
* Parse and apply config option DISTRO
*/
protected overwriteDistro(): void;
/**
* Get the version string (with distro)

@@ -44,0 +48,0 @@ * @param os LinuxOS Object

@@ -130,5 +130,8 @@ "use strict";

if (this.arch !== 'i686') {
if (!this.os) {
if (!this.os && (0, resolveConfig_1.resolveConfig)(resolveConfig_1.ResolveConfigVariables.DISTRO)) {
this.os = yield (0, getos_1.getOS)();
}
if ((0, resolveConfig_1.resolveConfig)(resolveConfig_1.ResolveConfigVariables.DISTRO)) {
this.overwriteDistro();
}
osString = this.getLinuxOSVersionString(this.os);

@@ -146,2 +149,25 @@ }

/**
* Parse and apply config option DISTRO
*/
overwriteDistro() {
const env = (0, resolveConfig_1.resolveConfig)(resolveConfig_1.ResolveConfigVariables.DISTRO);
if ((0, utils_1.isNullOrUndefined)(env)) {
return;
}
const split = env.split('-');
const distro = split[0];
const release = split[1];
if ((0, utils_1.isNullOrUndefined)(distro)) {
throw new errors_1.GenericMMSError('Expected DISTRO option to have a distro like "ubuntu-18.04"');
}
if ((0, utils_1.isNullOrUndefined)(release)) {
throw new errors_1.GenericMMSError('Expected DISTRO option to have a release like "ubuntu-18.04" (delimited by "-")');
}
this.os = {
os: 'linux',
dist: distro,
release: release,
};
}
/**
* Get the version string (with distro)

@@ -148,0 +174,0 @@ * @param os LinuxOS Object

@@ -18,3 +18,4 @@ /** Enum of all possible config options */

SYSTEM_BINARY_VERSION_CHECK = "SYSTEM_BINARY_VERSION_CHECK",
USE_ARCHIVE_NAME_FOR_BINARY_NAME = "USE_ARCHIVE_NAME_FOR_BINARY_NAME"
USE_ARCHIVE_NAME_FOR_BINARY_NAME = "USE_ARCHIVE_NAME_FOR_BINARY_NAME",
DISTRO = "DISTRO"
}

@@ -21,0 +22,0 @@ /** The Prefix for Environmental values */

@@ -31,2 +31,3 @@ "use strict";

ResolveConfigVariables["USE_ARCHIVE_NAME_FOR_BINARY_NAME"] = "USE_ARCHIVE_NAME_FOR_BINARY_NAME";
ResolveConfigVariables["DISTRO"] = "DISTRO";
})(ResolveConfigVariables = exports.ResolveConfigVariables || (exports.ResolveConfigVariables = {}));

@@ -33,0 +34,0 @@ /** The Prefix for Environmental values */

{
"name": "mongodb-memory-server-core",
"version": "8.13.0",
"version": "8.14.0-beta.1",
"description": "MongoDB Server for testing (core package, without autodownload). The server will allow you to connect your favourite ODM or client library to the MongoDB Server and run parallel integration tests isolated from each other.",

@@ -54,5 +54,5 @@ "main": "lib/index",

"new-find-package-json": "^2.0.0",
"semver": "^7.5.1",
"semver": "^7.5.3",
"tar-stream": "^2.1.4",
"tslib": "^2.5.3",
"tslib": "^2.6.0",
"uuid": "^9.0.0",

@@ -59,0 +59,0 @@ "yauzl": "^2.10.0"

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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