@mongosh/service-provider-server
Advanced tools
Comparing version 0.0.2-alpha.0 to 0.0.3
import CliServiceProvider from './cli-service-provider'; | ||
import { MongoClient } from 'mongodb'; | ||
interface DataService { | ||
client: { | ||
client: MongoClient; | ||
}; | ||
} | ||
declare class CompassServiceProvider extends CliServiceProvider { | ||
static fromDataService(dataService: DataService): CompassServiceProvider; | ||
} | ||
export default CompassServiceProvider; |
@@ -20,2 +20,3 @@ "use strict"; | ||
var cli_service_provider_1 = __importDefault(require("./cli-service-provider")); | ||
var mongosh_transport_server_1 = require("mongosh-transport-server"); | ||
var CompassServiceProvider = (function (_super) { | ||
@@ -26,2 +27,7 @@ __extends(CompassServiceProvider, _super); | ||
} | ||
CompassServiceProvider.fromDataService = function (dataService) { | ||
var mongoClient = dataService.client.client; | ||
var nodeTransport = new mongosh_transport_server_1.NodeTransport(mongoClient); | ||
return new CompassServiceProvider(nodeTransport); | ||
}; | ||
return CompassServiceProvider; | ||
@@ -28,0 +34,0 @@ }(cli_service_provider_1.default)); |
{ | ||
"name": "@mongosh/service-provider-server", | ||
"version": "0.0.2-alpha.0", | ||
"version": "0.0.3", | ||
"description": "MongoDB Shell Server Service Provider Package", | ||
@@ -15,4 +15,4 @@ "main": "lib/index.js", | ||
"compile-ts": "tsc -p tsconfig.json", | ||
"test": "mocha --timeout 15000 --colors -r ts-node/register \"./src/**/*.spec.ts\"", | ||
"test-ci": "mocha --timeout 15000 -r ts-node/register \"./src/**/*.spec.ts\"", | ||
"test": "mocha --timeout 60000 --colors -r ts-node/register \"./src/**/*.spec.ts\"", | ||
"test-ci": "mocha --timeout 60000 -r ts-node/register \"./src/**/*.spec.ts\"", | ||
"prepublish": "npm run compile-ts", | ||
@@ -42,4 +42,4 @@ "lint": "eslint \"**/*.{js,ts,tsx}\"", | ||
"dependencies": { | ||
"@mongosh/errors": "^0.0.2-alpha.0", | ||
"@mongosh/service-provider-core": "^0.0.2-alpha.0", | ||
"@mongosh/errors": "^0.0.3", | ||
"@mongosh/service-provider-core": "^0.0.3", | ||
"@types/sinon": "^7.5.1", | ||
@@ -49,3 +49,3 @@ "@types/sinon-chai": "^3.2.3", | ||
}, | ||
"gitHead": "3f50f9f68db36b72dc4e01138a0e43be99d24271" | ||
"gitHead": "29ddcc8ed4d16fe7eeb8d17f0faf23eacaf619be" | ||
} |
import CliServiceProvider from './cli-service-provider'; | ||
import { expect } from 'chai'; | ||
import { MongoClient } from 'mongodb'; | ||
import { startTestServer } from '../../../testing/integration-testing-hooks'; | ||
describe('CliServiceProvider [integration]', function() { | ||
this.timeout(5000); | ||
const connectionString = startTestServer(); | ||
const port = 27018; | ||
const connectionString = `mongodb://localhost:${port}`; | ||
before(require('mongodb-runner/mocha/before')({ port, timeout: 60000 })); | ||
after(require('mongodb-runner/mocha/after')({ port })); | ||
let serviceProvider: CliServiceProvider; | ||
@@ -574,3 +569,3 @@ let client: MongoClient; | ||
result | ||
).to.deep.equal({ | ||
).to.deep.include({ | ||
nIndexesWas: 1, | ||
@@ -577,0 +572,0 @@ nIndexes: 1, |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
240232
59
5021
1
+ Added@mongosh/errors@0.0.3(transitive)
+ Added@mongosh/service-provider-core@0.0.3(transitive)
- Removed@mongosh/errors@0.0.2-alpha.0(transitive)
- Removed@mongosh/service-provider-core@0.0.2-alpha.0(transitive)
Updated@mongosh/errors@^0.0.3