@databases/mysql-test
Advanced tools
@@ -6,2 +6,7 @@ #! /usr/bin/env nod | ||
var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { | ||
function adopt(value) { | ||
return value instanceof P ? value : new P(function (resolve) { | ||
resolve(value); | ||
}); | ||
} | ||
return new (P || (P = Promise))(function (resolve, reject) { | ||
@@ -23,5 +28,3 @@ function fulfilled(value) { | ||
function step(result) { | ||
result.done ? resolve(result.value) : new P(function (resolve) { | ||
resolve(result.value); | ||
}).then(fulfilled, rejected); | ||
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); | ||
} | ||
@@ -36,3 +39,3 @@ step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||
// TODO: take options as CLI parameters | ||
}, argv => __awaiter(undefined, void 0, void 0, function* () { | ||
}, argv => __awaiter(void 0, void 0, void 0, function* () { | ||
try { | ||
@@ -47,3 +50,3 @@ const { databaseURL } = yield _1.default({ detached: true }); | ||
// TODO: take options as CLI parameters | ||
}, argv => __awaiter(undefined, void 0, void 0, function* () { | ||
}, argv => __awaiter(void 0, void 0, void 0, function* () { | ||
try { | ||
@@ -50,0 +53,0 @@ yield _1.killDatabase(); |
"use strict"; | ||
var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { | ||
function adopt(value) { | ||
return value instanceof P ? value : new P(function (resolve) { | ||
resolve(value); | ||
}); | ||
} | ||
return new (P || (P = Promise))(function (resolve, reject) { | ||
@@ -20,5 +25,3 @@ function fulfilled(value) { | ||
function step(result) { | ||
result.done ? resolve(result.value) : new P(function (resolve) { | ||
resolve(result.value); | ||
}).then(fulfilled, rejected); | ||
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); | ||
} | ||
@@ -126,3 +129,3 @@ step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||
rawOptions = __rest(_a, ["mysqlUser", "mysqlPassword", "mysqlDb", "environment"]); | ||
const { proc, externalPort, kill } = yield with_container_1.default(Object.assign({}, rawOptions, { internalPort: DEFAULT_MYSQL_PORT, environment: Object.assign({ MYSQL_ALLOW_EMPTY_PASSWORD: 'true', MYSQL_HOST: '127.0.0.1', MYSQL_ROOT_HOST: '%' }, environment, { MYSQL_USER: mysqlUser, MYSQL_PASSWORD: mysqlPassword, MYSQL_DATABASE: mysqlDb }) })); | ||
const { proc, externalPort, kill } = yield with_container_1.default(Object.assign(Object.assign({}, rawOptions), { internalPort: DEFAULT_MYSQL_PORT, environment: Object.assign(Object.assign({ MYSQL_ALLOW_EMPTY_PASSWORD: 'true', MYSQL_HOST: '127.0.0.1', MYSQL_ROOT_HOST: '%' }, environment), { MYSQL_USER: mysqlUser, MYSQL_PASSWORD: mysqlPassword, MYSQL_DATABASE: mysqlDb }) })); | ||
const databaseURL = `mysql://${mysqlUser}:${mysqlPassword}@localhost:${externalPort}/${mysqlDb}`; | ||
@@ -129,0 +132,0 @@ yield waitForConnection(databaseURL, rawOptions.connectTimeoutSeconds); |
@@ -5,2 +5,7 @@ "use strict"; | ||
var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { | ||
function adopt(value) { | ||
return value instanceof P ? value : new P(function (resolve) { | ||
resolve(value); | ||
}); | ||
} | ||
return new (P || (P = Promise))(function (resolve, reject) { | ||
@@ -22,5 +27,3 @@ function fulfilled(value) { | ||
function step(result) { | ||
result.done ? resolve(result.value) : new P(function (resolve) { | ||
resolve(result.value); | ||
}).then(fulfilled, rejected); | ||
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); | ||
} | ||
@@ -27,0 +30,0 @@ step((generator = generator.apply(thisArg, _arguments || [])).next()); |
@@ -5,2 +5,7 @@ "use strict"; | ||
var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { | ||
function adopt(value) { | ||
return value instanceof P ? value : new P(function (resolve) { | ||
resolve(value); | ||
}); | ||
} | ||
return new (P || (P = Promise))(function (resolve, reject) { | ||
@@ -22,5 +27,3 @@ function fulfilled(value) { | ||
function step(result) { | ||
result.done ? resolve(result.value) : new P(function (resolve) { | ||
resolve(result.value); | ||
}).then(fulfilled, rejected); | ||
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); | ||
} | ||
@@ -27,0 +30,0 @@ step((generator = generator.apply(thisArg, _arguments || [])).next()); |
@@ -1,5 +0,21 @@ | ||
Copyright (c) Forbes Lindesay | ||
# The MIT License (MIT) | ||
@databases is an Open Source project licensed under the terms of | ||
the GPLv3 license. Please see <http://www.gnu.org/licenses/gpl-3.0.html> | ||
for license text. | ||
Copyright (c) 2019 Forbes Lindesay | ||
> Permission is hereby granted, free of charge, to any person obtaining a copy | ||
> of this software and associated documentation files (the "Software"), to deal | ||
> in the Software without restriction, including without limitation the rights | ||
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
> copies of the Software, and to permit persons to whom the Software is | ||
> furnished to do so, subject to the following conditions: | ||
> | ||
> The above copyright notice and this permission notice shall be included in | ||
> all copies or substantial portions of the Software. | ||
> | ||
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
> SOFTWARE. |
{ | ||
"name": "@databases/mysql-test", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "", | ||
@@ -8,4 +8,4 @@ "main": "./lib/index.js", | ||
"dependencies": { | ||
"@databases/mysql-config": "^1.0.0", | ||
"@databases/with-container": "^0.0.1", | ||
"@databases/mysql-config": "^1.0.1", | ||
"@databases/with-container": "^0.0.2", | ||
"mysql2": "^1.6.4", | ||
@@ -17,7 +17,14 @@ "yargs": "^12.0.5" | ||
"bugs": "https://github.com/ForbesLindesay/atdatabases/issues", | ||
"license": "GPL-3.0", | ||
"license": "MIT", | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"homepage": "https://www.atdatabases.org/docs/mysql-test" | ||
"homepage": "https://www.atdatabases.org/docs/mysql-test", | ||
"files": [ | ||
"lib/", | ||
"jest/globalSetup.js", | ||
"jest/globalSetup.d.ts", | ||
"jest/globalTeardown.js", | ||
"jest/globalTeardown.d.ts" | ||
] | ||
} |
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
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
Copyleft License
License(Experimental) Copyleft license information was found.
Found 1 instance in 1 package
Non-permissive License
License(Experimental) A license not known to be considered permissive was found.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
1
-66.67%80
14.29%22528
-21.21%19
-26.92%328
-41.32%