sqerge 1.0.3 → 1.1.0

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.
package/bin.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- require('./dist/bootstrap.js');
2
+ require('./dist/bootstrap.js').default();
@@ -1 +1 @@
1
- export {};
1
+ export default function bootstrap(): Promise<void>;
package/dist/bootstrap.js CHANGED
@@ -26,7 +26,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
26
26
  const node_path_1 = require("node:path");
27
27
  const postgres_1 = __importStar(require("postgres"));
28
28
  const index_1 = __importStar(require("./index"));
29
- (async function main() {
29
+ async function bootstrap() {
30
30
  const log = (message, ...args) => console.log(`\u001b[35m[\u001b[39m\u001b[36msqerge\u001b[39m\u001b[35m]\u001b[39m ${message}`, ...args);
31
31
  const logError = (message, ...args) => log(`\u001b[1m\u001b[31m(error)\u001b[39m\u001b[22m ${message}`, ...args);
32
32
  try {
@@ -38,7 +38,7 @@ const index_1 = __importStar(require("./index"));
38
38
  await sql.end();
39
39
  });
40
40
  await (0, index_1.default)(sql, dir, log);
41
- process.exit(0);
41
+ await sql.end();
42
42
  }
43
43
  catch (error) {
44
44
  if (isNodeError(error, Error)) {
@@ -60,7 +60,8 @@ const index_1 = __importStar(require("./index"));
60
60
  }
61
61
  process.exit(1);
62
62
  }
63
- })();
63
+ }
64
+ exports.default = bootstrap;
64
65
  function isNodeError(value, errorType) {
65
66
  return value instanceof errorType;
66
67
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sqerge",
3
- "version": "1.0.3",
3
+ "version": "1.1.0",
4
4
  "description": "A forward only PostgreSQL migration tool.",
5
5
  "keywords": [
6
6
  "postgres",