listpage_cli 0.0.189 → 0.0.190

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/cli.js CHANGED
@@ -14,6 +14,16 @@ function printHelp() {
14
14
  ].join("\n");
15
15
  console.log(h);
16
16
  }
17
+ function printVersion() {
18
+ try {
19
+ const p = path_1.default.join(__dirname, "..", "package.json");
20
+ const pkg = JSON.parse(fs_1.default.readFileSync(p, "utf8"));
21
+ console.log(pkg.version || "");
22
+ }
23
+ catch {
24
+ console.log("");
25
+ }
26
+ }
17
27
  function safePkgName(name) {
18
28
  return name
19
29
  .toLowerCase()
@@ -205,7 +215,12 @@ function renderVars(str, vars) {
205
215
  return out;
206
216
  }
207
217
  async function main() {
208
- const cmd = process.argv[2];
218
+ const args = process.argv.slice(2);
219
+ if (args.includes("--version") || args.includes("-V")) {
220
+ printVersion();
221
+ return;
222
+ }
223
+ const cmd = args[0];
209
224
  if (cmd === "init")
210
225
  return initCmd();
211
226
  printHelp();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "listpage_cli",
3
- "version": "0.0.189",
3
+ "version": "0.0.190",
4
4
  "private": false,
5
5
  "bin": {
6
6
  "listpage_cli": "bin/cli.js"
@@ -12,7 +12,7 @@
12
12
  "dependencies": {
13
13
  "react": "^19.2.0",
14
14
  "react-dom": "^19.2.0",
15
- "listpage-next": "~0.0.189",
15
+ "listpage-next": "~0.0.190",
16
16
  "react-router-dom": ">=6.0.0",
17
17
  "@ant-design/v5-patch-for-react-19": "~1.0.3",
18
18
  "ahooks": "^3.9.5",