@jahia/jahia-cli 0.3.1 → 0.5.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.
Files changed (67) hide show
  1. package/dist/commands/environment/create.d.ts.map +1 -1
  2. package/dist/commands/environment/create.js +1 -0
  3. package/dist/commands/environment/create.js.map +1 -1
  4. package/dist/commands/environment/list.d.ts.map +1 -1
  5. package/dist/commands/environment/list.js +1 -0
  6. package/dist/commands/environment/list.js.map +1 -1
  7. package/dist/commands/jahia/alive.d.ts.map +1 -1
  8. package/dist/commands/jahia/alive.js +28 -10
  9. package/dist/commands/jahia/alive.js.map +1 -1
  10. package/dist/commands/tests/build.d.ts +1 -0
  11. package/dist/commands/tests/build.d.ts.map +1 -1
  12. package/dist/commands/tests/build.js +8 -0
  13. package/dist/commands/tests/build.js.map +1 -1
  14. package/dist/commands/tests/run.d.ts +17 -2
  15. package/dist/commands/tests/run.d.ts.map +1 -1
  16. package/dist/commands/tests/run.js +70 -6
  17. package/dist/commands/tests/run.js.map +1 -1
  18. package/dist/commands/workflow/run.d.ts.map +1 -1
  19. package/dist/commands/workflow/run.js +26 -18
  20. package/dist/commands/workflow/run.js.map +1 -1
  21. package/dist/lib/components/index.d.ts.map +1 -1
  22. package/dist/lib/components/index.js +3 -0
  23. package/dist/lib/components/index.js.map +1 -1
  24. package/dist/lib/components/types.d.ts +16 -0
  25. package/dist/lib/components/types.d.ts.map +1 -1
  26. package/dist/lib/config/parser.d.ts.map +1 -1
  27. package/dist/lib/config/parser.js +11 -0
  28. package/dist/lib/config/parser.js.map +1 -1
  29. package/dist/lib/config/types.d.ts +1 -0
  30. package/dist/lib/config/types.d.ts.map +1 -1
  31. package/dist/lib/output/formatter.d.ts +2 -0
  32. package/dist/lib/output/formatter.d.ts.map +1 -1
  33. package/dist/lib/output/formatter.js +58 -21
  34. package/dist/lib/output/formatter.js.map +1 -1
  35. package/dist/lib/providers/docker/container.d.ts +16 -0
  36. package/dist/lib/providers/docker/container.d.ts.map +1 -1
  37. package/dist/lib/providers/docker/container.js +22 -0
  38. package/dist/lib/providers/docker/container.js.map +1 -1
  39. package/dist/lib/providers/docker/index.d.ts.map +1 -1
  40. package/dist/lib/providers/docker/index.js +12 -2
  41. package/dist/lib/providers/docker/index.js.map +1 -1
  42. package/dist/lib/providers/types.d.ts +6 -1
  43. package/dist/lib/providers/types.d.ts.map +1 -1
  44. package/dist/lib/state/types.d.ts +18 -0
  45. package/dist/lib/state/types.d.ts.map +1 -1
  46. package/dist/lib/tests/build-image.d.ts +1 -0
  47. package/dist/lib/tests/build-image.d.ts.map +1 -1
  48. package/dist/lib/tests/build-image.js +2 -5
  49. package/dist/lib/tests/build-image.js.map +1 -1
  50. package/dist/lib/workflow/format-workflow-sources.d.ts +1 -1
  51. package/dist/lib/workflow/format-workflow-sources.d.ts.map +1 -1
  52. package/dist/lib/workflow/format-workflow-sources.js +19 -19
  53. package/dist/lib/workflow/format-workflow-sources.js.map +1 -1
  54. package/dist/lib/workflow/merge-workflow-sources.d.ts +4 -1
  55. package/dist/lib/workflow/merge-workflow-sources.d.ts.map +1 -1
  56. package/dist/lib/workflow/merge-workflow-sources.js +4 -4
  57. package/dist/lib/workflow/merge-workflow-sources.js.map +1 -1
  58. package/dist/lib/workflow/resolve-workflows-file-path.d.ts +14 -5
  59. package/dist/lib/workflow/resolve-workflows-file-path.d.ts.map +1 -1
  60. package/dist/lib/workflow/resolve-workflows-file-path.js +13 -7
  61. package/dist/lib/workflow/resolve-workflows-file-path.js.map +1 -1
  62. package/dist/lib/workflow/types.d.ts +3 -0
  63. package/dist/lib/workflow/types.d.ts.map +1 -1
  64. package/dist/lib/workflow/types.js +8 -3
  65. package/dist/lib/workflow/types.js.map +1 -1
  66. package/oclif.manifest.json +287 -278
  67. package/package.json +1 -1
@@ -553,14 +553,15 @@
553
553
  "stop.js"
554
554
  ]
555
555
  },
556
- "tests:artifacts": {
556
+ "jahia:alive": {
557
557
  "aliases": [],
558
558
  "args": {},
559
- "description": "Collect test artifacts (container logs and diagnostic files) from the active environment. Fetches logs from VictoriaLogs (with docker logs fallback) and copies container artifact paths defined in component definitions or config overrides.",
559
+ "description": "Wait until the Jahia environment is fully alive and responding GREEN. Polls the Server Availability Manager (SAM) healthcheck endpoint and requires N consecutive GREEN responses before declaring the environment ready.",
560
560
  "examples": [
561
- "<%= config.bin %> tests artifacts",
562
- "<%= config.bin %> tests artifacts --output ./ci-results/",
563
- "<%= config.bin %> tests artifacts --state /ci/workspace/state.json --json"
561
+ "<%= config.bin %> jahia alive",
562
+ "<%= config.bin %> jahia alive --count 10 --timeout 600",
563
+ "<%= config.bin %> jahia alive --url http://localhost:8080 --json",
564
+ "<%= config.bin %> jahia alive --state /ci/workspace/state.json"
564
565
  ],
565
566
  "flags": {
566
567
  "state": {
@@ -571,10 +572,61 @@
571
572
  "multiple": false,
572
573
  "type": "option"
573
574
  },
574
- "output": {
575
- "char": "o",
576
- "description": "Output directory for collected artifacts (default: ./results/)",
577
- "name": "output",
575
+ "url": {
576
+ "description": "Jahia base URL (default: from state, or http://localhost:8080)",
577
+ "name": "url",
578
+ "hasDynamicHelp": false,
579
+ "multiple": false,
580
+ "type": "option"
581
+ },
582
+ "username": {
583
+ "char": "u",
584
+ "description": "Jahia username for SAM authentication (default: from state, or root)",
585
+ "name": "username",
586
+ "hasDynamicHelp": false,
587
+ "multiple": false,
588
+ "type": "option"
589
+ },
590
+ "password": {
591
+ "char": "P",
592
+ "description": "Jahia password for SAM authentication (default: from state, or root1234)",
593
+ "name": "password",
594
+ "hasDynamicHelp": false,
595
+ "multiple": false,
596
+ "type": "option"
597
+ },
598
+ "severity": {
599
+ "char": "s",
600
+ "description": "SAM probe severity to evaluate (LOW, MEDIUM, HIGH, CRITICAL)",
601
+ "name": "severity",
602
+ "default": "MEDIUM",
603
+ "hasDynamicHelp": false,
604
+ "multiple": false,
605
+ "type": "option"
606
+ },
607
+ "interval": {
608
+ "char": "i",
609
+ "description": "Seconds between health checks",
610
+ "name": "interval",
611
+ "default": 2,
612
+ "hasDynamicHelp": false,
613
+ "multiple": false,
614
+ "type": "option"
615
+ },
616
+ "timeout": {
617
+ "char": "t",
618
+ "description": "Maximum seconds to wait before failing",
619
+ "name": "timeout",
620
+ "default": 300,
621
+ "hasDynamicHelp": false,
622
+ "multiple": false,
623
+ "type": "option"
624
+ },
625
+ "count": {
626
+ "char": "c",
627
+ "description": "Number of consecutive GREEN responses required",
628
+ "name": "count",
629
+ "default": 5,
578
630
  "hasDynamicHelp": false,
579
631
  "multiple": false,
580
632
  "type": "option"
@@ -588,7 +640,7 @@
588
640
  },
589
641
  "hasDynamicHelp": false,
590
642
  "hiddenAliases": [],
591
- "id": "tests:artifacts",
643
+ "id": "jahia:alive",
592
644
  "pluginAlias": "@jahia/jahia-cli",
593
645
  "pluginName": "@jahia/jahia-cli",
594
646
  "pluginType": "core",
@@ -598,37 +650,118 @@
598
650
  "relativePath": [
599
651
  "dist",
600
652
  "commands",
601
- "tests",
602
- "artifacts.js"
653
+ "jahia",
654
+ "alive.js"
603
655
  ]
604
656
  },
605
- "tests:build": {
657
+ "jahia:provision": {
606
658
  "aliases": [],
607
659
  "args": {},
608
- "description": "Build the test Docker image using docker buildx. All build parameters (dockerfile, image, tag, platform, buildArgs) are read from the config file under tests.container. The image stays local (no push) and can be run with \"tests run\".",
660
+ "description": "Execute provisioning operations against a running Jahia instance. Three modes are available (exactly one per invocation):\n --manifest: Submit a YAML provisioning manifest with optional file attachments.\n --modules: Upload module files (JARs) from a directory, one at a time.\n --scripts: Execute provisioning scripts from a directory, one at a time.\nUse --filter to limit which files are processed (glob pattern, matched against filename).",
609
661
  "examples": [
610
- "<%= config.bin %> tests build -c config.yml",
611
- "<%= config.bin %> tests build -c config.yml --no-cache",
612
- "<%= config.bin %> tests build -c config.yml --json"
662
+ "<%= config.bin %> jahia provision --manifest ./provisioning/setup.yaml",
663
+ "<%= config.bin %> jahia provision --manifest ./setup.yaml --assets ./artifacts",
664
+ "<%= config.bin %> jahia provision --manifest ./setup.yaml --assets ./artifacts --filter \"*.jar\"",
665
+ "<%= config.bin %> jahia provision --modules ./modules/",
666
+ "<%= config.bin %> jahia provision --modules ./modules/ --filter \"*-SNAPSHOT.jar\"",
667
+ "<%= config.bin %> jahia provision --scripts ./scripts/",
668
+ "<%= config.bin %> jahia provision --scripts ./scripts/ --filter \"*.groovy\""
613
669
  ],
614
670
  "flags": {
615
- "config": {
616
- "char": "c",
617
- "description": "Path to jahia-cli config file",
618
- "name": "config",
619
- "required": true,
671
+ "state": {
672
+ "description": "Path to the state JSON file. Overrides JAHIA_CLI_STATE env var. Defaults to ~/.jahia-cli/state.json",
673
+ "env": "JAHIA_CLI_STATE",
674
+ "name": "state",
620
675
  "hasDynamicHelp": false,
621
676
  "multiple": false,
622
677
  "type": "option"
623
678
  },
624
- "no-cache": {
625
- "description": "Build without using cache",
626
- "name": "no-cache",
627
- "allowNo": false,
628
- "type": "boolean"
679
+ "manifest": {
680
+ "char": "m",
681
+ "description": "Path to a local YAML file or a public URL of the provisioning manifest",
682
+ "exclusive": [
683
+ "modules",
684
+ "scripts"
685
+ ],
686
+ "name": "manifest",
687
+ "hasDynamicHelp": false,
688
+ "multiple": false,
689
+ "type": "option"
690
+ },
691
+ "modules": {
692
+ "description": "Path to a directory of module files to install (one at a time via installOrUpgradeBundle)",
693
+ "exclusive": [
694
+ "manifest",
695
+ "scripts",
696
+ "assets",
697
+ "file"
698
+ ],
699
+ "name": "modules",
700
+ "hasDynamicHelp": false,
701
+ "multiple": false,
702
+ "type": "option"
703
+ },
704
+ "scripts": {
705
+ "description": "Path to a directory of provisioning scripts to execute (one at a time via executeScript)",
706
+ "exclusive": [
707
+ "manifest",
708
+ "modules",
709
+ "assets",
710
+ "file"
711
+ ],
712
+ "name": "scripts",
713
+ "hasDynamicHelp": false,
714
+ "multiple": false,
715
+ "type": "option"
716
+ },
717
+ "filter": {
718
+ "description": "Glob pattern to filter files in --assets, --modules, or --scripts directories (default: all files). Example: \"*-SNAPSHOT.jar\"",
719
+ "name": "filter",
720
+ "hasDynamicHelp": false,
721
+ "multiple": false,
722
+ "type": "option"
723
+ },
724
+ "url": {
725
+ "description": "Jahia base URL (default: from state, or http://localhost:8080)",
726
+ "name": "url",
727
+ "hasDynamicHelp": false,
728
+ "multiple": false,
729
+ "type": "option"
730
+ },
731
+ "username": {
732
+ "char": "u",
733
+ "description": "Jahia admin username (default: from state, or root)",
734
+ "name": "username",
735
+ "hasDynamicHelp": false,
736
+ "multiple": false,
737
+ "type": "option"
738
+ },
739
+ "password": {
740
+ "char": "P",
741
+ "description": "Jahia admin password (default: from state, or root1234)",
742
+ "name": "password",
743
+ "hasDynamicHelp": false,
744
+ "multiple": false,
745
+ "type": "option"
746
+ },
747
+ "file": {
748
+ "char": "f",
749
+ "description": "File attachment to include with --manifest (can be specified multiple times)",
750
+ "name": "file",
751
+ "hasDynamicHelp": false,
752
+ "multiple": true,
753
+ "type": "option"
754
+ },
755
+ "assets": {
756
+ "char": "a",
757
+ "description": "Directory whose files are attached to the --manifest provisioning request",
758
+ "name": "assets",
759
+ "hasDynamicHelp": false,
760
+ "multiple": false,
761
+ "type": "option"
629
762
  },
630
763
  "json": {
631
- "description": "Output result as structured JSON",
764
+ "description": "Output result as structured JSON (for AI agents and scripting)",
632
765
  "name": "json",
633
766
  "allowNo": false,
634
767
  "type": "boolean"
@@ -636,7 +769,7 @@
636
769
  },
637
770
  "hasDynamicHelp": false,
638
771
  "hiddenAliases": [],
639
- "id": "tests:build",
772
+ "id": "jahia:provision",
640
773
  "pluginAlias": "@jahia/jahia-cli",
641
774
  "pluginName": "@jahia/jahia-cli",
642
775
  "pluginType": "core",
@@ -646,36 +779,36 @@
646
779
  "relativePath": [
647
780
  "dist",
648
781
  "commands",
649
- "tests",
650
- "build.js"
782
+ "jahia",
783
+ "provision.js"
651
784
  ]
652
785
  },
653
- "tests:init": {
786
+ "workflow:init": {
654
787
  "aliases": [],
655
788
  "args": {},
656
- "description": "Initialize local test scaffolding from a remote repository. Syncs missing files from the configured scaffolding source and manages .gitignore so that remotely-sourced files are not accidentally committed.",
789
+ "description": "Add sample workflows section to a configuration file. Generates a named \"main\" workflow with representative steps (init, create, alive, test, cleanup) to help get started. Preserves existing environment and tests sections.",
657
790
  "examples": [
658
- "<%= config.bin %> tests init",
659
- "<%= config.bin %> tests init --config ./my-config.yml",
660
- "<%= config.bin %> tests init --path ./tests --json"
791
+ "<%= config.bin %> workflow init",
792
+ "<%= config.bin %> workflow init --config ./my-config.yml",
793
+ "<%= config.bin %> workflow init --force",
794
+ "<%= config.bin %> workflow init --json"
661
795
  ],
662
796
  "flags": {
663
797
  "config": {
664
798
  "char": "c",
665
- "description": "Path to config file (default: jahia-cli.config.yml)",
666
- "env": "JAHIA_CLI_CONFIG",
799
+ "description": "Path to the YAML configuration file",
667
800
  "name": "config",
801
+ "default": "jahia-cli.config.yml",
668
802
  "hasDynamicHelp": false,
669
803
  "multiple": false,
670
804
  "type": "option"
671
805
  },
672
- "path": {
673
- "char": "p",
674
- "description": "Override destination directory for scaffolding files",
675
- "name": "path",
676
- "hasDynamicHelp": false,
677
- "multiple": false,
678
- "type": "option"
806
+ "force": {
807
+ "char": "f",
808
+ "description": "Overwrite existing workflows section if already present",
809
+ "name": "force",
810
+ "allowNo": false,
811
+ "type": "boolean"
679
812
  },
680
813
  "json": {
681
814
  "description": "Output result as structured JSON (for AI agents and scripting)",
@@ -686,7 +819,7 @@
686
819
  },
687
820
  "hasDynamicHelp": false,
688
821
  "hiddenAliases": [],
689
- "id": "tests:init",
822
+ "id": "workflow:init",
690
823
  "pluginAlias": "@jahia/jahia-cli",
691
824
  "pluginName": "@jahia/jahia-cli",
692
825
  "pluginType": "core",
@@ -696,55 +829,64 @@
696
829
  "relativePath": [
697
830
  "dist",
698
831
  "commands",
699
- "tests",
832
+ "workflow",
700
833
  "init.js"
701
834
  ]
702
835
  },
703
- "tests:run": {
836
+ "workflow:run": {
704
837
  "aliases": [],
705
838
  "args": {},
706
- "description": "Run the test Docker image against an active environment. The container attaches to the environment network, streams output in real-time, and the CLI exits with the container exit code. Container is kept after completion for debugging.",
839
+ "description": "Execute a named workflow defined in a configuration file. Supports loading shared workflows from a dedicated workflows file (via --workflows-file flag or workflowsFile config key, defaults to jahia-cli.workflows.global.yml in CWD). Config workflows override workflow file ones with the same name. Runs steps sequentially — shell commands via execa, jahia-cli commands via subprocess. Stops on first failure. Use --name to select a workflow, or omit to run the default.",
707
840
  "examples": [
708
- "<%= config.bin %> tests run -c config.yml",
709
- "<%= config.bin %> tests run -c config.yml --env CYPRESS_SPEC=cypress/e2e/login.cy.ts",
710
- "<%= config.bin %> tests run -c config.yml --state /ci/workspace/state.json --json"
841
+ "<%= config.bin %> workflow run --config jahia-cli.config.yml",
842
+ "<%= config.bin %> workflow run --config jahia-cli.config.yml --name setup",
843
+ "<%= config.bin %> workflow run --config jahia-cli.config.yml --workflows-file shared.yml",
844
+ "<%= config.bin %> workflow run --config ./my-config.yml --json"
711
845
  ],
712
846
  "flags": {
713
847
  "config": {
714
848
  "char": "c",
715
- "description": "Path to jahia-cli config file",
849
+ "description": "Path to the YAML configuration file",
716
850
  "name": "config",
717
851
  "required": true,
718
852
  "hasDynamicHelp": false,
719
853
  "multiple": false,
720
854
  "type": "option"
721
855
  },
722
- "state": {
723
- "description": "Path to the state JSON file. Overrides JAHIA_CLI_STATE env var. Defaults to ~/.jahia-cli/state.json",
724
- "env": "JAHIA_CLI_STATE",
725
- "name": "state",
856
+ "name": {
857
+ "char": "n",
858
+ "description": "Name of the workflow to run (runs default workflow if omitted)",
859
+ "name": "name",
726
860
  "hasDynamicHelp": false,
727
861
  "multiple": false,
728
862
  "type": "option"
729
863
  },
730
- "env": {
731
- "char": "e",
732
- "description": "Additional env var for test container (KEY=VALUE, repeatable). Supports ${VAR:-default}.",
733
- "name": "env",
864
+ "workflows-file": {
865
+ "char": "w",
866
+ "description": "Path to a dedicated workflows YAML file. Merged with config workflows (config takes precedence). Resolved relative to CWD. Overrides the workflowsFile config key. Defaults to jahia-cli.workflows.global.yml in CWD.",
867
+ "name": "workflows-file",
734
868
  "hasDynamicHelp": false,
735
- "multiple": true,
869
+ "multiple": false,
736
870
  "type": "option"
737
871
  },
738
872
  "json": {
739
- "description": "Output result as structured JSON",
873
+ "description": "Output result as structured JSON (for AI agents and scripting)",
740
874
  "name": "json",
741
875
  "allowNo": false,
742
876
  "type": "boolean"
877
+ },
878
+ "state": {
879
+ "char": "s",
880
+ "description": "Path to the state file (auto-passed to jahia-cli subcommands)",
881
+ "name": "state",
882
+ "hasDynamicHelp": false,
883
+ "multiple": false,
884
+ "type": "option"
743
885
  }
744
886
  },
745
887
  "hasDynamicHelp": false,
746
888
  "hiddenAliases": [],
747
- "id": "tests:run",
889
+ "id": "workflow:run",
748
890
  "pluginAlias": "@jahia/jahia-cli",
749
891
  "pluginName": "@jahia/jahia-cli",
750
892
  "pluginType": "core",
@@ -754,37 +896,36 @@
754
896
  "relativePath": [
755
897
  "dist",
756
898
  "commands",
757
- "tests",
899
+ "workflow",
758
900
  "run.js"
759
901
  ]
760
902
  },
761
- "workflow:init": {
903
+ "tests:artifacts": {
762
904
  "aliases": [],
763
905
  "args": {},
764
- "description": "Add sample workflows section to a configuration file. Generates a named \"main\" workflow with representative steps (init, create, alive, test, cleanup) to help get started. Preserves existing environment and tests sections.",
906
+ "description": "Collect test artifacts (container logs and diagnostic files) from the active environment. Fetches logs from VictoriaLogs (with docker logs fallback) and copies container artifact paths defined in component definitions or config overrides.",
765
907
  "examples": [
766
- "<%= config.bin %> workflow init",
767
- "<%= config.bin %> workflow init --config ./my-config.yml",
768
- "<%= config.bin %> workflow init --force",
769
- "<%= config.bin %> workflow init --json"
908
+ "<%= config.bin %> tests artifacts",
909
+ "<%= config.bin %> tests artifacts --output ./ci-results/",
910
+ "<%= config.bin %> tests artifacts --state /ci/workspace/state.json --json"
770
911
  ],
771
912
  "flags": {
772
- "config": {
773
- "char": "c",
774
- "description": "Path to the YAML configuration file",
775
- "name": "config",
776
- "default": "jahia-cli.config.yml",
913
+ "state": {
914
+ "description": "Path to the state JSON file. Overrides JAHIA_CLI_STATE env var. Defaults to ~/.jahia-cli/state.json",
915
+ "env": "JAHIA_CLI_STATE",
916
+ "name": "state",
917
+ "hasDynamicHelp": false,
918
+ "multiple": false,
919
+ "type": "option"
920
+ },
921
+ "output": {
922
+ "char": "o",
923
+ "description": "Output directory for collected artifacts (default: ./results/)",
924
+ "name": "output",
777
925
  "hasDynamicHelp": false,
778
926
  "multiple": false,
779
927
  "type": "option"
780
928
  },
781
- "force": {
782
- "char": "f",
783
- "description": "Overwrite existing workflows section if already present",
784
- "name": "force",
785
- "allowNo": false,
786
- "type": "boolean"
787
- },
788
929
  "json": {
789
930
  "description": "Output result as structured JSON (for AI agents and scripting)",
790
931
  "name": "json",
@@ -794,7 +935,7 @@
794
935
  },
795
936
  "hasDynamicHelp": false,
796
937
  "hiddenAliases": [],
797
- "id": "workflow:init",
938
+ "id": "tests:artifacts",
798
939
  "pluginAlias": "@jahia/jahia-cli",
799
940
  "pluginName": "@jahia/jahia-cli",
800
941
  "pluginType": "core",
@@ -804,64 +945,54 @@
804
945
  "relativePath": [
805
946
  "dist",
806
947
  "commands",
807
- "workflow",
808
- "init.js"
948
+ "tests",
949
+ "artifacts.js"
809
950
  ]
810
951
  },
811
- "workflow:run": {
952
+ "tests:build": {
812
953
  "aliases": [],
813
954
  "args": {},
814
- "description": "Execute a named workflow defined in a configuration file. Supports loading shared workflows from a global workflows file (via --workflows-file flag or workflowsFile config key). Local workflows override global ones with the same name. Runs steps sequentially — shell commands via execa, jahia-cli commands via subprocess. Stops on first failure. Use --name to select a workflow, or omit to run the default.",
955
+ "description": "Build the test Docker image using docker buildx. All build parameters (dockerfile, image, tag, platform, buildArgs) are read from the config file under tests.container. The image stays local (no push) and can be run with \"tests run\".",
815
956
  "examples": [
816
- "<%= config.bin %> workflow run --config jahia-cli.config.yml",
817
- "<%= config.bin %> workflow run --config jahia-cli.config.yml --name setup",
818
- "<%= config.bin %> workflow run --config jahia-cli.config.yml --workflows-file shared.yml",
819
- "<%= config.bin %> workflow run --config ./my-config.yml --json"
957
+ "<%= config.bin %> tests build -c config.yml",
958
+ "<%= config.bin %> tests build -c config.yml --no-cache",
959
+ "<%= config.bin %> tests build -c config.yml --context /path/to/test/root",
960
+ "<%= config.bin %> tests build -c config.yml --json"
820
961
  ],
821
962
  "flags": {
822
963
  "config": {
823
964
  "char": "c",
824
- "description": "Path to the YAML configuration file",
965
+ "description": "Path to jahia-cli config file",
825
966
  "name": "config",
826
967
  "required": true,
827
968
  "hasDynamicHelp": false,
828
969
  "multiple": false,
829
970
  "type": "option"
830
971
  },
831
- "name": {
832
- "char": "n",
833
- "description": "Name of the workflow to run (runs default workflow if omitted)",
834
- "name": "name",
972
+ "context": {
973
+ "description": "Docker build context directory (default: current working directory)",
974
+ "name": "context",
975
+ "default": ".",
835
976
  "hasDynamicHelp": false,
836
977
  "multiple": false,
837
978
  "type": "option"
838
979
  },
839
- "workflows-file": {
840
- "char": "w",
841
- "description": "Path to a global workflows YAML file. Merged with local config workflows (local takes precedence). Resolved relative to CWD. Overrides the workflowsFile config key.",
842
- "name": "workflows-file",
843
- "hasDynamicHelp": false,
844
- "multiple": false,
845
- "type": "option"
980
+ "no-cache": {
981
+ "description": "Build without using cache",
982
+ "name": "no-cache",
983
+ "allowNo": false,
984
+ "type": "boolean"
846
985
  },
847
986
  "json": {
848
- "description": "Output result as structured JSON (for AI agents and scripting)",
987
+ "description": "Output result as structured JSON",
849
988
  "name": "json",
850
989
  "allowNo": false,
851
990
  "type": "boolean"
852
- },
853
- "state": {
854
- "char": "s",
855
- "description": "Path to the state file (auto-passed to jahia-cli subcommands)",
856
- "name": "state",
857
- "hasDynamicHelp": false,
858
- "multiple": false,
859
- "type": "option"
860
991
  }
861
992
  },
862
993
  "hasDynamicHelp": false,
863
994
  "hiddenAliases": [],
864
- "id": "workflow:run",
995
+ "id": "tests:build",
865
996
  "pluginAlias": "@jahia/jahia-cli",
866
997
  "pluginName": "@jahia/jahia-cli",
867
998
  "pluginType": "core",
@@ -871,84 +1002,33 @@
871
1002
  "relativePath": [
872
1003
  "dist",
873
1004
  "commands",
874
- "workflow",
875
- "run.js"
1005
+ "tests",
1006
+ "build.js"
876
1007
  ]
877
1008
  },
878
- "jahia:alive": {
1009
+ "tests:init": {
879
1010
  "aliases": [],
880
1011
  "args": {},
881
- "description": "Wait until the Jahia environment is fully alive and responding GREEN. Polls the Server Availability Manager (SAM) healthcheck endpoint and requires N consecutive GREEN responses before declaring the environment ready.",
1012
+ "description": "Initialize local test scaffolding from a remote repository. Syncs missing files from the configured scaffolding source and manages .gitignore so that remotely-sourced files are not accidentally committed.",
882
1013
  "examples": [
883
- "<%= config.bin %> jahia alive",
884
- "<%= config.bin %> jahia alive --count 10 --timeout 600",
885
- "<%= config.bin %> jahia alive --url http://localhost:8080 --json",
886
- "<%= config.bin %> jahia alive --state /ci/workspace/state.json"
1014
+ "<%= config.bin %> tests init",
1015
+ "<%= config.bin %> tests init --config ./my-config.yml",
1016
+ "<%= config.bin %> tests init --path ./tests --json"
887
1017
  ],
888
1018
  "flags": {
889
- "state": {
890
- "description": "Path to the state JSON file. Overrides JAHIA_CLI_STATE env var. Defaults to ~/.jahia-cli/state.json",
891
- "env": "JAHIA_CLI_STATE",
892
- "name": "state",
893
- "hasDynamicHelp": false,
894
- "multiple": false,
895
- "type": "option"
896
- },
897
- "url": {
898
- "description": "Jahia base URL (default: from state, or http://localhost:8080)",
899
- "name": "url",
900
- "hasDynamicHelp": false,
901
- "multiple": false,
902
- "type": "option"
903
- },
904
- "username": {
905
- "char": "u",
906
- "description": "Jahia username for SAM authentication (default: from state, or root)",
907
- "name": "username",
908
- "hasDynamicHelp": false,
909
- "multiple": false,
910
- "type": "option"
911
- },
912
- "password": {
913
- "char": "P",
914
- "description": "Jahia password for SAM authentication (default: from state, or root1234)",
915
- "name": "password",
916
- "hasDynamicHelp": false,
917
- "multiple": false,
918
- "type": "option"
919
- },
920
- "severity": {
921
- "char": "s",
922
- "description": "SAM probe severity to evaluate (LOW, MEDIUM, HIGH, CRITICAL)",
923
- "name": "severity",
924
- "default": "MEDIUM",
925
- "hasDynamicHelp": false,
926
- "multiple": false,
927
- "type": "option"
928
- },
929
- "interval": {
930
- "char": "i",
931
- "description": "Seconds between health checks",
932
- "name": "interval",
933
- "default": 2,
934
- "hasDynamicHelp": false,
935
- "multiple": false,
936
- "type": "option"
937
- },
938
- "timeout": {
939
- "char": "t",
940
- "description": "Maximum seconds to wait before failing",
941
- "name": "timeout",
942
- "default": 300,
1019
+ "config": {
1020
+ "char": "c",
1021
+ "description": "Path to config file (default: jahia-cli.config.yml)",
1022
+ "env": "JAHIA_CLI_CONFIG",
1023
+ "name": "config",
943
1024
  "hasDynamicHelp": false,
944
1025
  "multiple": false,
945
1026
  "type": "option"
946
1027
  },
947
- "count": {
948
- "char": "c",
949
- "description": "Number of consecutive GREEN responses required",
950
- "name": "count",
951
- "default": 5,
1028
+ "path": {
1029
+ "char": "p",
1030
+ "description": "Override destination directory for scaffolding files",
1031
+ "name": "path",
952
1032
  "hasDynamicHelp": false,
953
1033
  "multiple": false,
954
1034
  "type": "option"
@@ -962,7 +1042,7 @@
962
1042
  },
963
1043
  "hasDynamicHelp": false,
964
1044
  "hiddenAliases": [],
965
- "id": "jahia:alive",
1045
+ "id": "tests:init",
966
1046
  "pluginAlias": "@jahia/jahia-cli",
967
1047
  "pluginName": "@jahia/jahia-cli",
968
1048
  "pluginType": "core",
@@ -972,118 +1052,47 @@
972
1052
  "relativePath": [
973
1053
  "dist",
974
1054
  "commands",
975
- "jahia",
976
- "alive.js"
1055
+ "tests",
1056
+ "init.js"
977
1057
  ]
978
1058
  },
979
- "jahia:provision": {
1059
+ "tests:run": {
980
1060
  "aliases": [],
981
1061
  "args": {},
982
- "description": "Execute provisioning operations against a running Jahia instance. Three modes are available (exactly one per invocation):\n --manifest: Submit a YAML provisioning manifest with optional file attachments.\n --modules: Upload module files (JARs) from a directory, one at a time.\n --scripts: Execute provisioning scripts from a directory, one at a time.\nUse --filter to limit which files are processed (glob pattern, matched against filename).",
1062
+ "description": "Run the test Docker image against an active environment. The container attaches to the environment network, streams output in real-time, and the CLI exits with the container exit code. Container is kept after completion for debugging.",
983
1063
  "examples": [
984
- "<%= config.bin %> jahia provision --manifest ./provisioning/setup.yaml",
985
- "<%= config.bin %> jahia provision --manifest ./setup.yaml --assets ./artifacts",
986
- "<%= config.bin %> jahia provision --manifest ./setup.yaml --assets ./artifacts --filter \"*.jar\"",
987
- "<%= config.bin %> jahia provision --modules ./modules/",
988
- "<%= config.bin %> jahia provision --modules ./modules/ --filter \"*-SNAPSHOT.jar\"",
989
- "<%= config.bin %> jahia provision --scripts ./scripts/",
990
- "<%= config.bin %> jahia provision --scripts ./scripts/ --filter \"*.groovy\""
1064
+ "<%= config.bin %> tests run -c config.yml",
1065
+ "<%= config.bin %> tests run -c config.yml --env CYPRESS_SPEC=cypress/e2e/login.cy.ts",
1066
+ "<%= config.bin %> tests run -c config.yml --state /ci/workspace/state.json --json"
991
1067
  ],
992
1068
  "flags": {
993
- "state": {
994
- "description": "Path to the state JSON file. Overrides JAHIA_CLI_STATE env var. Defaults to ~/.jahia-cli/state.json",
995
- "env": "JAHIA_CLI_STATE",
996
- "name": "state",
997
- "hasDynamicHelp": false,
998
- "multiple": false,
999
- "type": "option"
1000
- },
1001
- "manifest": {
1002
- "char": "m",
1003
- "description": "Path to a local YAML file or a public URL of the provisioning manifest",
1004
- "exclusive": [
1005
- "modules",
1006
- "scripts"
1007
- ],
1008
- "name": "manifest",
1009
- "hasDynamicHelp": false,
1010
- "multiple": false,
1011
- "type": "option"
1012
- },
1013
- "modules": {
1014
- "description": "Path to a directory of module files to install (one at a time via installOrUpgradeBundle)",
1015
- "exclusive": [
1016
- "manifest",
1017
- "scripts",
1018
- "assets",
1019
- "file"
1020
- ],
1021
- "name": "modules",
1022
- "hasDynamicHelp": false,
1023
- "multiple": false,
1024
- "type": "option"
1025
- },
1026
- "scripts": {
1027
- "description": "Path to a directory of provisioning scripts to execute (one at a time via executeScript)",
1028
- "exclusive": [
1029
- "manifest",
1030
- "modules",
1031
- "assets",
1032
- "file"
1033
- ],
1034
- "name": "scripts",
1035
- "hasDynamicHelp": false,
1036
- "multiple": false,
1037
- "type": "option"
1038
- },
1039
- "filter": {
1040
- "description": "Glob pattern to filter files in --assets, --modules, or --scripts directories (default: all files). Example: \"*-SNAPSHOT.jar\"",
1041
- "name": "filter",
1042
- "hasDynamicHelp": false,
1043
- "multiple": false,
1044
- "type": "option"
1045
- },
1046
- "url": {
1047
- "description": "Jahia base URL (default: from state, or http://localhost:8080)",
1048
- "name": "url",
1049
- "hasDynamicHelp": false,
1050
- "multiple": false,
1051
- "type": "option"
1052
- },
1053
- "username": {
1054
- "char": "u",
1055
- "description": "Jahia admin username (default: from state, or root)",
1056
- "name": "username",
1069
+ "config": {
1070
+ "char": "c",
1071
+ "description": "Path to jahia-cli config file",
1072
+ "name": "config",
1073
+ "required": true,
1057
1074
  "hasDynamicHelp": false,
1058
1075
  "multiple": false,
1059
1076
  "type": "option"
1060
1077
  },
1061
- "password": {
1062
- "char": "P",
1063
- "description": "Jahia admin password (default: from state, or root1234)",
1064
- "name": "password",
1078
+ "state": {
1079
+ "description": "Path to the state JSON file. Overrides JAHIA_CLI_STATE env var. Defaults to ~/.jahia-cli/state.json",
1080
+ "env": "JAHIA_CLI_STATE",
1081
+ "name": "state",
1065
1082
  "hasDynamicHelp": false,
1066
1083
  "multiple": false,
1067
1084
  "type": "option"
1068
1085
  },
1069
- "file": {
1070
- "char": "f",
1071
- "description": "File attachment to include with --manifest (can be specified multiple times)",
1072
- "name": "file",
1086
+ "env": {
1087
+ "char": "e",
1088
+ "description": "Additional env var for test container (KEY=VALUE, repeatable). Supports ${VAR:-default}.",
1089
+ "name": "env",
1073
1090
  "hasDynamicHelp": false,
1074
1091
  "multiple": true,
1075
1092
  "type": "option"
1076
1093
  },
1077
- "assets": {
1078
- "char": "a",
1079
- "description": "Directory whose files are attached to the --manifest provisioning request",
1080
- "name": "assets",
1081
- "hasDynamicHelp": false,
1082
- "multiple": false,
1083
- "type": "option"
1084
- },
1085
1094
  "json": {
1086
- "description": "Output result as structured JSON (for AI agents and scripting)",
1095
+ "description": "Output result as structured JSON",
1087
1096
  "name": "json",
1088
1097
  "allowNo": false,
1089
1098
  "type": "boolean"
@@ -1091,7 +1100,7 @@
1091
1100
  },
1092
1101
  "hasDynamicHelp": false,
1093
1102
  "hiddenAliases": [],
1094
- "id": "jahia:provision",
1103
+ "id": "tests:run",
1095
1104
  "pluginAlias": "@jahia/jahia-cli",
1096
1105
  "pluginName": "@jahia/jahia-cli",
1097
1106
  "pluginType": "core",
@@ -1101,10 +1110,10 @@
1101
1110
  "relativePath": [
1102
1111
  "dist",
1103
1112
  "commands",
1104
- "jahia",
1105
- "provision.js"
1113
+ "tests",
1114
+ "run.js"
1106
1115
  ]
1107
1116
  }
1108
1117
  },
1109
- "version": "0.3.1"
1118
+ "version": "0.5.1"
1110
1119
  }