@schemic/cli 0.1.0-alpha.2 → 0.1.0-alpha.3
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/lib/cli.js +6 -1
- package/package.json +1 -1
- package/src/cli/index.ts +4 -1
package/lib/cli.js
CHANGED
|
@@ -9,6 +9,11 @@ import {
|
|
|
9
9
|
} from "fs";
|
|
10
10
|
import { dirname as dirname2, join as join3, relative as relative2 } from "path";
|
|
11
11
|
import { createInterface } from "readline/promises";
|
|
12
|
+
|
|
13
|
+
// package.json
|
|
14
|
+
var version = "0.1.0-alpha.3";
|
|
15
|
+
|
|
16
|
+
// src/cli/index.ts
|
|
12
17
|
import {
|
|
13
18
|
actionLabel,
|
|
14
19
|
applyPull,
|
|
@@ -730,7 +735,7 @@ var dbFlags = (cmd) => configFlag(cmd).option(
|
|
|
730
735
|
var program = new Command();
|
|
731
736
|
program.name("schemic").description(
|
|
732
737
|
"Schema-as-code migrations for any database \u2014 generate DDL, diff, and migrate via drivers"
|
|
733
|
-
).version(
|
|
738
|
+
).version(version).showHelpAfterError("(run `schemic --help` for usage)").addHelpText(
|
|
734
739
|
"after",
|
|
735
740
|
`
|
|
736
741
|
Examples:
|
package/package.json
CHANGED
package/src/cli/index.ts
CHANGED
|
@@ -6,6 +6,9 @@ import {
|
|
|
6
6
|
} from "node:fs";
|
|
7
7
|
import { dirname, join, relative } from "node:path";
|
|
8
8
|
import { createInterface } from "node:readline/promises";
|
|
9
|
+
// The CLI's own version — sourced from package.json (inlined at build) so it never drifts from the
|
|
10
|
+
// published package version the way a hardcoded string does.
|
|
11
|
+
import { version as CLI_VERSION } from "../../package.json";
|
|
9
12
|
import {
|
|
10
13
|
actionLabel,
|
|
11
14
|
applyPull,
|
|
@@ -284,7 +287,7 @@ program
|
|
|
284
287
|
.description(
|
|
285
288
|
"Schema-as-code migrations for any database — generate DDL, diff, and migrate via drivers",
|
|
286
289
|
)
|
|
287
|
-
.version(
|
|
290
|
+
.version(CLI_VERSION)
|
|
288
291
|
.showHelpAfterError("(run `schemic --help` for usage)")
|
|
289
292
|
.addHelpText(
|
|
290
293
|
"after",
|