alsmanager_lib 1.0.70 → 1.0.71

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/modules.js +11 -10
  2. package/package.json +1 -1
package/lib/modules.js CHANGED
@@ -7893,19 +7893,20 @@ function getPackageJsVersion() {
7893
7893
 
7894
7894
  // Export DB
7895
7895
 
7896
- function exportDBSQLSQLite(db_path, dump_path, dump_source, dump_date) {
7897
- var datestring = "";
7898
- if (!dump_date) {
7896
+ function exportDBSQLSQLite(db_path, dump_path, dump_filename) {
7897
+ var fileName = "";
7898
+ var path = require('path');
7899
+ if (!dump_filename) {
7899
7900
  var d = new Date();
7900
7901
  datestring = d.getFullYear() + ("0" + d.getDate()).slice(-2) + ("0"+(d.getMonth()+1)).slice(-2) +
7901
7902
  "_" + ("0" + d.getHours()).slice(-2) + ("0" + d.getMinutes()).slice(-2) + ("0" + d.getSeconds()).slice(-2);
7903
+ fileName = "ALSnr_" + dump_source + datestring + ".sql";
7902
7904
  }
7903
7905
  else {
7904
- datestring = dump_date;
7906
+ fileName = dump_filename;
7905
7907
  }
7906
7908
 
7907
- var path = require('path');
7908
- var fileOut = path.join(dump_path, "ALSnr_" + dump_source + datestring + ".sql");
7909
+ var fileOut = path.join(dump_path, fileName);
7909
7910
 
7910
7911
  let cmd = "sqlite3 " + db_path + " ";
7911
7912
  cmd += "\"" + ".output " + fileOut + "\"";
@@ -7924,18 +7925,18 @@ function exportDBSQLSQLite(db_path, dump_path, dump_source, dump_date) {
7924
7925
 
7925
7926
  return cmd;
7926
7927
  }
7927
- function exportDBSQLMySQL(db_path, dump_path, dump_source, dump_date) {
7928
+ function exportDBSQLMySQL(db_path, dump_path, dump_filename) {
7928
7929
 
7929
7930
  }
7930
- function exportDBSQL(db_used, db_path, dump_path, dump_source, dump_date) {
7931
+ function exportDBSQL(db_used, db_path, dump_path, dump_filename) {
7931
7932
  var query = "";
7932
7933
  if (db_used) {
7933
7934
  switch (db_used) {
7934
7935
  case 'SQLITE':
7935
- query = exportDBSQLSQLite(db_path, dump_path, dump_source, dump_date);
7936
+ query = exportDBSQLSQLite(db_path, db_path, dump_path, dump_filename);
7936
7937
  break;
7937
7938
  case 'MYSQL':
7938
- query = exportDBSQLMySQL(db_path, dump_path, dump_source, dump_date);
7939
+ query = exportDBSQLMySQL(db_path, db_path, dump_path, dump_filename);
7939
7940
  break;
7940
7941
  }
7941
7942
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "alsmanager_lib",
3
- "version": "1.0.70",
3
+ "version": "1.0.71",
4
4
  "description": "Funzioni per ALSManager",
5
5
  "license": "ISC",
6
6
  "author": "Luca Cattani",