DBGATE_TOOLS => DBGATE_PACKAGES

This commit is contained in:
Jan Prochazka
2024-08-20 12:18:55 +02:00
parent 8a69e94d79
commit 968e69c7f2
32 changed files with 58 additions and 43 deletions

View File

@@ -2,7 +2,7 @@ const csv = require('csv');
const fs = require('fs');
const stream = require('stream');
const { getLogger } = global.DBGATE_TOOLS;
const { getLogger } = global.DBGATE_PACKAGES['dbgate-tools'];
const logger = getLogger('csvWriter');

View File

@@ -17,7 +17,7 @@ var config = {
plugins: [
new webpack.DefinePlugin({
'global.DBGATE_TOOLS': 'window.DBGATE_TOOLS',
'global.DBGATE_PACKAGES': 'window.DBGATE_PACKAGES',
}),
],

View File

@@ -17,7 +17,7 @@ var config = {
plugins: [
new webpack.DefinePlugin({
'global.DBGATE_TOOLS': 'window.DBGATE_TOOLS',
'global.DBGATE_PACKAGES': 'window.DBGATE_PACKAGES',
}),
],

View File

@@ -1,5 +1,5 @@
const ObjectId = require('mongodb').ObjectId;
const { getLogger } = global.DBGATE_TOOLS;
const { getLogger } = global.DBGATE_PACKAGES['dbgate-tools'];
const logger = getLogger('mongoBulkInsert');

View File

@@ -1,4 +1,4 @@
const { SqlDumper } = global.DBGATE_TOOLS;
const { SqlDumper } = global.DBGATE_PACKAGES['dbgate-tools'];
class Dumper extends SqlDumper {}

View File

@@ -1,4 +1,4 @@
const { driverBase } = global.DBGATE_TOOLS;
const { driverBase } = global.DBGATE_PACKAGES['dbgate-tools'];
const { convertToMongoCondition } = require('./convertToMongoCondition');
const Dumper = require('./Dumper');
const { mongoSplitterOptions } = require('dbgate-query-splitter/lib/options');

View File

@@ -17,7 +17,7 @@ var config = {
plugins: [
new webpack.DefinePlugin({
'global.DBGATE_TOOLS': 'window.DBGATE_TOOLS',
'global.DBGATE_PACKAGES': 'window.DBGATE_PACKAGES',
}),
],

View File

@@ -1,4 +1,4 @@
const { SqlDumper, testEqualColumns, arrayToHexString } = global.DBGATE_TOOLS;
const { SqlDumper, testEqualColumns, arrayToHexString } = global.DBGATE_PACKAGES['dbgate-tools'];
class MsSqlDumper extends SqlDumper {
constructor(driver, options) {

View File

@@ -1,4 +1,4 @@
const { driverBase } = global.DBGATE_TOOLS;
const { driverBase } = global.DBGATE_PACKAGES['dbgate-tools'];
const MsSqlDumper = require('./MsSqlDumper');
const { mssqlSplitterOptions } = require('dbgate-query-splitter/lib/options');

View File

@@ -17,7 +17,7 @@ var config = {
plugins: [
new webpack.DefinePlugin({
'global.DBGATE_TOOLS': 'window.DBGATE_TOOLS',
'global.DBGATE_PACKAGES': 'window.DBGATE_PACKAGES',
}),
],

View File

@@ -5,7 +5,7 @@ const Analyser = require('./Analyser');
const mysql2 = require('mysql2');
const { createBulkInsertStreamBase, makeUniqueColumnNames } = require('dbgate-tools');
const { MySqlDumper } = require('antares-mysql-dumper');
const { getLogger } = global.DBGATE_TOOLS;
const { getLogger } = global.DBGATE_PACKAGES['dbgate-tools'];
const logger = getLogger('mysqlDriver');

View File

@@ -1,4 +1,4 @@
const { SqlDumper, arrayToHexString } = global.DBGATE_TOOLS;
const { SqlDumper, arrayToHexString } = global.DBGATE_PACKAGES['dbgate-tools'];
const _isArray = require('lodash/isArray');
class Dumper extends SqlDumper {

View File

@@ -1,4 +1,4 @@
const { driverBase } = global.DBGATE_TOOLS;
const { driverBase } = global.DBGATE_PACKAGES['dbgate-tools'];
const { mysqlSplitterOptions } = require('dbgate-query-splitter/lib/options');
const Dumper = require('./Dumper');

View File

@@ -17,7 +17,7 @@ var config = {
plugins: [
new webpack.DefinePlugin({
'global.DBGATE_TOOLS': 'window.DBGATE_TOOLS',
'global.DBGATE_PACKAGES': 'window.DBGATE_PACKAGES',
}),
],

View File

@@ -1,4 +1,4 @@
const { SqlDumper, arrayToHexString, testEqualTypes } = global.DBGATE_TOOLS;
const { SqlDumper, arrayToHexString, testEqualTypes } = global.DBGATE_PACKAGES['dbgate-tools'];
class Dumper extends SqlDumper {
createDatabase(name) {

View File

@@ -1,4 +1,4 @@
const { driverBase } = global.DBGATE_TOOLS;
const { driverBase } = global.DBGATE_PACKAGES['dbgate-tools'];
const Dumper = require('./Dumper');
const { oracleSplitterOptions } = require('dbgate-query-splitter/lib/options');

View File

@@ -17,7 +17,7 @@ var config = {
plugins: [
new webpack.DefinePlugin({
'global.DBGATE_TOOLS': 'window.DBGATE_TOOLS',
'global.DBGATE_PACKAGES': 'window.DBGATE_PACKAGES',
}),
],

View File

@@ -5,7 +5,7 @@ const driverBases = require('../frontend/drivers');
const Analyser = require('./Analyser');
const pg = require('pg');
const { createBulkInsertStreamBase, makeUniqueColumnNames } = require('dbgate-tools');
const { getLogger } = global.DBGATE_TOOLS;
const { getLogger } = global.DBGATE_PACKAGES['dbgate-tools'];
const logger = getLogger('postreDriver');

View File

@@ -1,4 +1,4 @@
const { SqlDumper, arrayToHexString, testEqualTypes } = global.DBGATE_TOOLS;
const { SqlDumper, arrayToHexString, testEqualTypes } = global.DBGATE_PACKAGES['dbgate-tools'];
class Dumper extends SqlDumper {
/** @param type {import('dbgate-types').TransformType} */

View File

@@ -1,4 +1,4 @@
const { driverBase } = global.DBGATE_TOOLS;
const { driverBase } = global.DBGATE_PACKAGES['dbgate-tools'];
const Dumper = require('./Dumper');
const { postgreSplitterOptions } = require('dbgate-query-splitter/lib/options');

View File

@@ -17,7 +17,7 @@ var config = {
plugins: [
new webpack.DefinePlugin({
'global.DBGATE_TOOLS': 'window.DBGATE_TOOLS',
'global.DBGATE_PACKAGES': 'window.DBGATE_PACKAGES',
}),
],

View File

@@ -1,4 +1,4 @@
const { driverBase } = global.DBGATE_TOOLS;
const { driverBase } = global.DBGATE_PACKAGES['dbgate-tools'];
const { redisSplitterOptions } = require('dbgate-query-splitter/lib/options');
const Dumper = require('./Dumper');

View File

@@ -4,7 +4,7 @@ const driverBase = require('../frontend/driver');
const Analyser = require('./Analyser');
const { splitQuery, sqliteSplitterOptions } = require('dbgate-query-splitter');
const { createBulkInsertStreamBase, makeUniqueColumnNames } = require('dbgate-tools');
const { getLogger } = global.DBGATE_TOOLS;
const { getLogger } = global.DBGATE_PACKAGES['dbgate-tools'];
const logger = getLogger('sqliteDriver');

View File

@@ -1,4 +1,4 @@
const { SqlDumper, arrayToHexString } = global.DBGATE_TOOLS;
const { SqlDumper, arrayToHexString } = global.DBGATE_PACKAGES['dbgate-tools'];
class Dumper extends SqlDumper {
renameColumn(column, newcol) {

View File

@@ -1,4 +1,4 @@
const { driverBase } = global.DBGATE_TOOLS;
const { driverBase } = global.DBGATE_PACKAGES['dbgate-tools'];
const Dumper = require('./Dumper');
const { sqliteSplitterOptions, noSplitSplitterOptions } = require('dbgate-query-splitter/lib/options');

View File

@@ -17,7 +17,7 @@ var config = {
plugins: [
new webpack.DefinePlugin({
'global.DBGATE_TOOLS': 'window.DBGATE_TOOLS',
'global.DBGATE_PACKAGES': 'window.DBGATE_PACKAGES',
}),
],

View File

@@ -1,7 +1,7 @@
const fs = require('fs');
const stream = require('stream');
const NodeXmlStream = require('node-xml-stream-parser');
const { getLogger } = global.DBGATE_TOOLS;
const { getLogger } = global.DBGATE_PACKAGES['dbgate-tools'];
const logger = getLogger('xmlReader');

View File

@@ -1,6 +1,6 @@
const fs = require('fs');
const stream = require('stream');
const { getLogger } = global.DBGATE_TOOLS;
const { getLogger } = global.DBGATE_PACKAGES['dbgate-tools'];
const logger = getLogger('xmlWriter');