stepwise-migrations 1.0.23 → 1.0.24

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/README.md CHANGED
@@ -3,8 +3,8 @@
3
3
  A JavaScript CLI tool for managing Raw SQL migrations in a Postgres database.
4
4
  Loosely based on flyway.
5
5
 
6
- [![npm version](https://badge.fury.io/js/stepwise-migrations.svg?icon=si%3Anpm&)](https://badge.fury.io/js/stepwise-migrations)
7
- ![test workflow](https://github.com/github/docs/actions/workflows/test.yml/badge.svg)
6
+ ![NPM Version](https://img.shields.io/npm/v/stepwise-migrations)
7
+ ![Test Workflow](https://github.com/github/docs/actions/workflows/test.yml/badge.svg)
8
8
 
9
9
  ## Table of Contents
10
10
 
package/dist/src/utils.js CHANGED
@@ -52,7 +52,8 @@ Example:
52
52
  --path=./test/migrations-template/
53
53
  `;
54
54
  const parseArgs = (argv) => {
55
- const schema = argv.schema;
55
+ var _a;
56
+ const schema = (_a = argv.schema) !== null && _a !== void 0 ? _a : "public";
56
57
  const command = argv._[0];
57
58
  const napply = argv.napply || Infinity;
58
59
  const nundo = argv.nundo || 1;
@@ -61,7 +62,7 @@ const parseArgs = (argv) => {
61
62
  };
62
63
  exports.parseArgs = parseArgs;
63
64
  const validateArgs = (argv) => {
64
- const required = ["connection", "schema", "path", "_"];
65
+ const required = ["connection", "path", "_"];
65
66
  if (required.some((key) => !(key in argv))) {
66
67
  console.error("Missing required arguments", required.filter((key) => !(key in argv)));
67
68
  console.log(exports.usage);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stepwise-migrations",
3
- "version": "1.0.23",
3
+ "version": "1.0.24",
4
4
  "description": "A JavaScript CLI tool for managing Raw SQL migrations in a Postgres database. Loosely based on flyway.",
5
5
  "main": "./dist/src/index.js",
6
6
  "scripts": {
package/src/utils.ts CHANGED
@@ -46,7 +46,7 @@ Example:
46
46
  `;
47
47
 
48
48
  export const parseArgs = (argv: any) => {
49
- const schema = argv.schema;
49
+ const schema = argv.schema ?? "public";
50
50
  const command = argv._[0];
51
51
  const napply = argv.napply || Infinity;
52
52
  const nundo = argv.nundo || 1;
@@ -56,7 +56,7 @@ export const parseArgs = (argv: any) => {
56
56
  };
57
57
 
58
58
  export const validateArgs = (argv: any) => {
59
- const required = ["connection", "schema", "path", "_"];
59
+ const required = ["connection", "path", "_"];
60
60
  if (required.some((key) => !(key in argv))) {
61
61
  console.error(
62
62
  "Missing required arguments",