alsmanager_lib 1.0.67 → 1.0.69

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 +7 -6
  2. package/package.json +1 -1
package/lib/modules.js CHANGED
@@ -7896,8 +7896,9 @@ function getPackageJsVersion() {
7896
7896
  function exportDBSQLSQLite(db_path, dump_path, dump_source, dump_date) {
7897
7897
  var datestring = "";
7898
7898
  if (!dump_date) {
7899
+ var d = new Date();
7899
7900
  datestring = d.getFullYear() + ("0" + d.getDate()).slice(-2) + ("0"+(d.getMonth()+1)).slice(-2) +
7900
- "_" + ("0" + d.getHours()).slice(-2) + ":" + ("0" + d.getMinutes()).slice(-2);
7901
+ "_" + ("0" + d.getHours()).slice(-2) + ("0" + d.getMinutes()).slice(-2) + ("0" + d.getSeconds()).slice(-2);
7901
7902
  }
7902
7903
  else {
7903
7904
  datestring = dump_date;
@@ -7905,11 +7906,11 @@ function exportDBSQLSQLite(db_path, dump_path, dump_source, dump_date) {
7905
7906
 
7906
7907
  var path = require('path');
7907
7908
  var fileOut = path.join(dump_path, "ALSnr_" + dump_source + datestring + ".sql");
7908
- var query = ".output " + fileOut + ";";
7909
- query += ".dump;";
7910
- query += ".exit;";
7911
7909
 
7912
- let cmd = "sqlite3 " + db_path + "\"" + query + "\"";
7910
+ let cmd = "sqlite3 " + db_path + " ";
7911
+ cmd += "\"" + ".output " + fileOut + "\"";
7912
+ cmd += "\"" + ".dump" + "\"";
7913
+ cmd += "\"" + ".quit" + "\"";
7913
7914
 
7914
7915
  const exec = require('child_process').exec;
7915
7916
  const child = exec(cmd,
@@ -7921,7 +7922,7 @@ function exportDBSQLSQLite(db_path, dump_path, dump_source, dump_date) {
7921
7922
  }
7922
7923
  });
7923
7924
 
7924
- return query;
7925
+ return cmd;
7925
7926
  }
7926
7927
  function exportDBSQLMySQL(db_path, dump_path, dump_source, dump_date) {
7927
7928
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "alsmanager_lib",
3
- "version": "1.0.67",
3
+ "version": "1.0.69",
4
4
  "description": "Funzioni per ALSManager",
5
5
  "license": "ISC",
6
6
  "author": "Luca Cattani",