Compare commits

...

4 Commits

Author SHA1 Message Date
Guillermo Bonet 6318a58f24 fix: refs #7759 mockDate 2025-02-21 10:30:41 +01:00
Alex Moreno f05cc498cc 1.6.12 2024-10-03 12:27:15 +00:00
Alex Moreno 2b6a97c243 Merge pull request 'feat: use the connection if it is passed as a parameter' (!7) from useCustomNetwork into master
Reviewed-on: #7
Reviewed-by: Juan Ferrer <juan@verdnatura.es>
2024-10-03 12:25:36 +00:00
Alex Moreno 5e6353688f feat: use the connection if it is passed as a parameter 2024-10-03 12:12:47 +02:00
5 changed files with 14 additions and 6 deletions

View File

@ -7,6 +7,9 @@ mockFunctions:
- mockUtcTime - mockUtcTime
sumViews: true sumViews: true
defaultDefiner: root@localhost defaultDefiner: root@localhost
localRemotes:
- local
- docker
deprecMarkRegex: __$ deprecMarkRegex: __$
deprecCommentRegex: ^@deprecated [0-9]{4}-[0-9]{2}-[0-9]{2} deprecCommentRegex: ^@deprecated [0-9]{4}-[0-9]{2}-[0-9]{2}
deprecDateRegex: '[0-9]{4}-[0-9]{2}-[0-9]{2}' deprecDateRegex: '[0-9]{4}-[0-9]{2}-[0-9]{2}'

View File

@ -371,9 +371,12 @@ class Push extends Command {
const oldSql = await engine.fetchRoutine(type, schema, name); const oldSql = await engine.fetchRoutine(type, schema, name);
const oldSum = engine.getShaSum(type, schema, name); const oldSum = engine.getShaSum(type, schema, name);
const localRemote = opts.remote == null
|| opts.localRemotes?.indexOf(opts.remote) !== -1;
const isMockFn = type == 'function' const isMockFn = type == 'function'
&& schema == opts.versionSchema && schema == opts.versionSchema
&& opts.remote == 'local' && localRemote
&& opts.mockDate && opts.mockDate
&& opts.mockFunctions && opts.mockFunctions
&& opts.mockFunctions.indexOf(name) !== -1; && opts.mockFunctions.indexOf(name) !== -1;

View File

@ -125,13 +125,14 @@ class Run extends Command {
try { try {
const server = new Server(ct, dbConfig); const server = new Server(ct, dbConfig);
if (isRandom) { const useCustom = opts.ci || opts.network
if (isRandom || useCustom) {
try { try {
const netSettings = await ct.inspect({ const netSettings = await ct.inspect({
format: '{{json .NetworkSettings}}' format: '{{json .NetworkSettings}}'
}); });
if (opts.ci || opts.network) { if (useCustom) {
dbConfig.host = opts.network dbConfig.host = opts.network
? netSettings.Networks[opts.network].IPAddress ? netSettings.Networks[opts.network].IPAddress
: netSettings.Gateway; : netSettings.Gateway;

5
package-lock.json generated
View File

@ -1,12 +1,12 @@
{ {
"name": "@verdnatura/myt", "name": "@verdnatura/myt",
"version": "1.6.10", "version": "1.6.13",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "@verdnatura/myt", "name": "@verdnatura/myt",
"version": "1.6.10", "version": "1.6.13",
"license": "GPL-3.0", "license": "GPL-3.0",
"dependencies": { "dependencies": {
"@sqltools/formatter": "^1.2.5", "@sqltools/formatter": "^1.2.5",
@ -1169,6 +1169,7 @@
"resolved": "https://registry.npmjs.org/nodegit/-/nodegit-0.27.0.tgz", "resolved": "https://registry.npmjs.org/nodegit/-/nodegit-0.27.0.tgz",
"integrity": "sha512-E9K4gPjWiA0b3Tx5lfWCzG7Cvodi2idl3V5UD2fZrOrHikIfrN7Fc2kWLtMUqqomyoToYJLeIC8IV7xb1CYRLA==", "integrity": "sha512-E9K4gPjWiA0b3Tx5lfWCzG7Cvodi2idl3V5UD2fZrOrHikIfrN7Fc2kWLtMUqqomyoToYJLeIC8IV7xb1CYRLA==",
"hasInstallScript": true, "hasInstallScript": true,
"license": "MIT",
"dependencies": { "dependencies": {
"fs-extra": "^7.0.0", "fs-extra": "^7.0.0",
"got": "^10.7.0", "got": "^10.7.0",

View File

@ -1,6 +1,6 @@
{ {
"name": "@verdnatura/myt", "name": "@verdnatura/myt",
"version": "1.6.11", "version": "1.6.13",
"author": "Verdnatura Levante SL", "author": "Verdnatura Levante SL",
"description": "MySQL version control", "description": "MySQL version control",
"license": "GPL-3.0", "license": "GPL-3.0",