@tryghost/ghst 0.14.1 → 0.15.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.
- package/README.md +2 -0
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/package.json +19 -19
package/README.md
CHANGED
|
@@ -79,6 +79,7 @@ ghst post create --title "Launch" --markdown-file ./launch.md
|
|
|
79
79
|
5. Get help:
|
|
80
80
|
|
|
81
81
|
```bash
|
|
82
|
+
ghst -v
|
|
82
83
|
ghst --help
|
|
83
84
|
ghst <resource> --help
|
|
84
85
|
ghst <resource> <action> --help
|
|
@@ -152,6 +153,7 @@ Interactive destructive confirmations also emit `GHST_AGENT_NOTICE:` lines on st
|
|
|
152
153
|
|
|
153
154
|
| Flag | Purpose |
|
|
154
155
|
| --- | --- |
|
|
156
|
+
| `-v`, `--version` | Print the installed `ghst` version |
|
|
155
157
|
| `--json` | Emit JSON output for automation |
|
|
156
158
|
| `--jq <filter>` | Apply jq-style extraction to JSON output |
|
|
157
159
|
| `--site <alias>` | Use configured site alias |
|
package/dist/index.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
// src/index.ts
|
|
4
4
|
import { realpathSync } from "fs";
|
|
5
|
+
import { createRequire } from "module";
|
|
5
6
|
import { fileURLToPath, pathToFileURL } from "url";
|
|
6
7
|
import { Command, CommanderError } from "commander";
|
|
7
8
|
|
|
@@ -14515,9 +14516,13 @@ function registerWebhookCommands(program) {
|
|
|
14515
14516
|
}
|
|
14516
14517
|
|
|
14517
14518
|
// src/index.ts
|
|
14519
|
+
var require2 = createRequire(import.meta.url);
|
|
14520
|
+
var packageJson = require2("../package.json");
|
|
14521
|
+
var PACKAGE_VERSION = packageJson.version ?? "0.0.0";
|
|
14518
14522
|
function buildProgram() {
|
|
14519
14523
|
const program = new Command();
|
|
14520
|
-
program.name("ghst").description(
|
|
14524
|
+
program.name("ghst").description(`A modern CLI for Ghost CMS
|
|
14525
|
+
Version: ${PACKAGE_VERSION}`).version(PACKAGE_VERSION, "-v, --version", "Output version").showHelpAfterError().showSuggestionAfterError(true).option("--json", "Output JSON").option("--jq <filter>", "Apply jq-style field extraction to JSON output").option("--site <site>", "Configured site alias").option("--url <url>", "Ghost site URL override").option("--staff-token <token>", "Ghost staff access token override").option("--enable-destructive-actions", "Allow destructive operations such as deletes").option("--debug [level]", "Enable debug output").option("--no-color", "Disable color output");
|
|
14521
14526
|
registerAuthCommands(program);
|
|
14522
14527
|
registerCommentCommands(program);
|
|
14523
14528
|
registerPostCommands(program);
|