@oliasoft-open-source/node-json-migrator 2.3.1-beta-3 → 2.3.1

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.
@@ -60,6 +60,7 @@ const getExecutedMigrationsFromVersion = async (database, pgpHelpers, entity, di
60
60
  return migrationsFromHistory;
61
61
  }
62
62
  } else {
63
+ console.error(_chalk.default.red(_git.historyError));
63
64
  throw new Error(`Unable to migrate, could not find version history`);
64
65
  }
65
66
  }
package/dist/git/git.js CHANGED
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.terminals = exports.isWindows = exports.gitAvailable = exports.getTerminal = exports.getPlanRevisionsFromGit = exports.getPlanFromGit = exports.getHistoricalPlansFromGit = exports.exec = exports.commandAvailable = exports.cmdAvailable = exports.bashAvailable = void 0;
6
+ exports.terminals = exports.isWindows = exports.historyError = exports.gitAvailable = exports.getTerminal = exports.getPlanRevisionsFromGit = exports.getPlanFromGit = exports.getHistoricalPlansFromGit = exports.exec = exports.commandAvailable = exports.cmdAvailable = exports.bashAvailable = void 0;
7
7
  var _chalk = _interopRequireDefault(require("chalk"));
8
8
  var _process = _interopRequireDefault(require("process"));
9
9
  var _child_process = require("child_process");
@@ -26,6 +26,7 @@ const historyError = `Unable to fetch git history. Possible reasons:
26
26
  - Not allowed to export datasets generated from migration feature branches into TEST, PROD or master ENVs
27
27
  - On Windows? Do you have git and a terminal (bash or cmd) in your PATH? Try cmder.app, gitforwindows.org, or WSL
28
28
  `;
29
+ exports.historyError = historyError;
29
30
  const commandAvailable = command => {
30
31
  try {
31
32
  const exists = isWindows ? 'where' : 'which';
@@ -123,7 +124,6 @@ const getHistoricalPlansFromGit = async planFilePath => {
123
124
  };
124
125
  } catch (error) {
125
126
  console.error(_chalk.default.red(error));
126
- console.error(historyError);
127
127
  throw new Error('Unable to fetch plan.json history from git');
128
128
  }
129
129
  };
@@ -83,6 +83,7 @@ const printVersionHistory = async ({
83
83
  console.log(JSON.stringify(output, null, 2));
84
84
  } catch (error) {
85
85
  console.error(_chalk.default.red(error));
86
+ console.error(_chalk.default.red(_git.historyError));
86
87
  throw new Error('Unable to print debug history');
87
88
  }
88
89
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oliasoft-open-source/node-json-migrator",
3
- "version": "2.3.1-beta-3",
3
+ "version": "2.3.1",
4
4
  "description": "A library for JSON migrations",
5
5
  "scripts": {
6
6
  "build": "npx babel src --ignore 'src/**/*.test.js' --out-dir dist --copy-files --no-copy-ignored",
File without changes