@wpmoo/toolkit 0.9.11 → 0.9.12

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.
Files changed (2) hide show
  1. package/dist/templates.js +34 -1
  2. package/package.json +1 -1
package/dist/templates.js CHANGED
@@ -463,6 +463,21 @@ usage() {
463
463
  esac
464
464
  }
465
465
 
466
+ show_help() {
467
+ cat <<'HELP'
468
+ Usage: ./moo <command> [args]
469
+
470
+ Daily commands:
471
+ start, stop, logs, restart, shell, psql
472
+ install, update, test, resetdb, snapshot, restore-snapshot, lint, pot
473
+
474
+ Management commands:
475
+ status, source, add-repo, remove-repo, add-module, remove-module, reset, doctor
476
+
477
+ Run ./moo <command> with invalid arguments to see command-specific usage.
478
+ HELP
479
+ }
480
+
466
481
  fail_usage() {
467
482
  usage "$1" >&2
468
483
  exit 2
@@ -599,8 +614,24 @@ run_script() {
599
614
  exec "$script" "$@"
600
615
  }
601
616
 
617
+ run_package_command() {
618
+ exec npx --yes ${fallbackPackageSpec()} "$@"
619
+ }
620
+
602
621
  command="\${1:-}"
603
622
  case "$command" in
623
+ "")
624
+ run_package_command "$@"
625
+ ;;
626
+ "--help"|"-h"|"help")
627
+ show_help
628
+ ;;
629
+ "--version"|"-v"|"version")
630
+ run_package_command "$@"
631
+ ;;
632
+ "create"|"status"|"add-repo"|"remove-repo"|"add-module"|"remove-module"|"source"|"reset"|"doctor")
633
+ run_package_command "$@"
634
+ ;;
604
635
  "start")
605
636
  shift
606
637
  require_no_args "$command" "$@"
@@ -685,7 +716,9 @@ case "$command" in
685
716
  run_script ./scripts/pot.sh "$@"
686
717
  ;;
687
718
  *)
688
- exec npx --yes ${fallbackPackageSpec()} "$@"
719
+ echo "Unknown ./moo command: $command" >&2
720
+ echo "Run ./moo --help to see supported commands." >&2
721
+ exit 2
689
722
  ;;
690
723
  esac
691
724
  `;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wpmoo/toolkit",
3
- "version": "0.9.11",
3
+ "version": "0.9.12",
4
4
  "description": "WPMoo Toolkit for development, staging, and production lifecycle workflows.",
5
5
  "type": "module",
6
6
  "repository": {