postman-cli-completion 1.46.1 → 1.47.2

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.
@@ -1,4 +1,4 @@
1
- # Bash completion for Postman CLI (postman v1.46.1)
1
+ # Bash completion for Postman CLI (postman v1.47.2)
2
2
  # Auto-generated by scripts/generate.mjs — DO NOT EDIT
3
3
  # Source: spec/commands.json
4
4
  # https://github.com/yokawasa/postman-cli-completion
@@ -143,7 +143,7 @@ _postman_collection_ai_readiness() {
143
143
 
144
144
  _postman_collection_run() {
145
145
  if [[ "$cur" == -* ]]; then
146
- COMPREPLY=( $(compgen -W "-e --environment -g --globals -r --reporters --output --reporter-json-structure -n --iteration-count -d --iteration-data --iteration-data-dataset --iteration-data-view --dataset -i --global-var --env-var --integration-id --postman-api-key --alias --bail --ignore-redirects -x --suppress-exit-code --silent --disable-unicode --delay-request --timeout --timeout-request --timeout-script --working-dir --no-insecure-file-read -k --insecure --ssl-client-cert-list --ssl-client-cert --ssl-client-key --ssl-client-passphrase --ssl-extra-ca-certs --cookie-jar --export-cookie-jar --verbose --mock --simulate --report-events -h --help --reporter-json-export --reporter-junit-export --reporter-html-export --reporter-json-omitRequestBodies --reporter-html-omitRequestBodies --reporter-json-omitResponseBodies --reporter-html-omitResponseBodies --reporter-json-omitHeaders --reporter-html-omitHeaders --reporter-json-omitAllHeadersAndBody --reporter-html-omitAllHeadersAndBody" -- "$cur") )
146
+ COMPREPLY=( $(compgen -W "-e --environment -g --globals -r --reporters --output --reporter-json-structure -n --iteration-count -d --iteration-data --iteration-data-dataset --iteration-data-view --dataset -i --global-var --env-var --integration-id --postman-api-key --alias --bail --ignore-redirects -x --suppress-exit-code --silent --disable-unicode --delay-request --timeout --timeout-request --timeout-script --working-dir --no-insecure-file-read -k --insecure --ssl-client-cert-list --ssl-client-cert --ssl-client-key --ssl-client-passphrase --ssl-extra-ca-certs --cookie-jar --export-cookie-jar --verbose --mock --port --simulate --report-events -h --help --reporter-json-export --reporter-junit-export --reporter-html-export --reporter-json-omitRequestBodies --reporter-html-omitRequestBodies --reporter-json-omitResponseBodies --reporter-html-omitResponseBodies --reporter-json-omitHeaders --reporter-html-omitHeaders --reporter-json-omitAllHeadersAndBody --reporter-html-omitAllHeadersAndBody" -- "$cur") )
147
147
  return 0
148
148
  fi
149
149
  case "$prev" in
@@ -692,18 +692,34 @@ _postman_mock() {
692
692
  if [[ "$cur" == -* ]]; then
693
693
  COMPREPLY=( $(compgen -W "-h --help" -- "$cur") )
694
694
  else
695
- COMPREPLY=( $(compgen -W "run" -- "$cur") )
695
+ COMPREPLY=( $(compgen -W "generate run" -- "$cur") )
696
696
  fi
697
697
  return 0
698
698
  fi
699
699
  case "$subcmd" in
700
+ generate) _postman_mock_generate ;;
700
701
  run) _postman_mock_run ;;
701
702
  esac
702
703
  }
703
704
 
705
+ _postman_mock_generate() {
706
+ if [[ "$cur" == -* ]]; then
707
+ COMPREPLY=( $(compgen -W "-o --output --name --port --force -u --update -x --suppress-exit-code -h --help" -- "$cur") )
708
+ return 0
709
+ fi
710
+ case "$prev" in
711
+ -o|--output)
712
+ _postman_filematch '!*.@(json)' "$cur"
713
+ return 0 ;;
714
+ -u|--update)
715
+ _postman_filematch '!*.@(json)' "$cur"
716
+ return 0 ;;
717
+ esac
718
+ }
719
+
704
720
  _postman_mock_run() {
705
721
  if [[ "$cur" == -* ]]; then
706
- COMPREPLY=( $(compgen -W "-e --environment -g --globals -h --help" -- "$cur") )
722
+ COMPREPLY=( $(compgen -W "-e --environment -g --globals -p --port -h --help" -- "$cur") )
707
723
  return 0
708
724
  fi
709
725
  case "$prev" in
@@ -1,4 +1,4 @@
1
- # Fish completion for Postman CLI (postman v1.46.1)
1
+ # Fish completion for Postman CLI (postman v1.47.2)
2
2
  # Auto-generated by scripts/generate.mjs — DO NOT EDIT
3
3
  # Source: spec/commands.json
4
4
  # https://github.com/yokawasa/postman-cli-completion
@@ -115,6 +115,7 @@ complete -c postman -n '__fish_seen_subcommand_from collection; and __fish_seen_
115
115
  complete -c postman -n '__fish_seen_subcommand_from collection; and __fish_seen_subcommand_from run' -l export-cookie-jar -d 'Exports the cookie jar to a file after completing the run' -r
116
116
  complete -c postman -n '__fish_seen_subcommand_from collection; and __fish_seen_subcommand_from run' -l verbose -d 'Show detailed information of collection run and each request sent'
117
117
  complete -c postman -n '__fish_seen_subcommand_from collection; and __fish_seen_subcommand_from run' -l mock -d 'Start a mock server from manifest (.json, .yaml or .yml) file' -r
118
+ complete -c postman -n '__fish_seen_subcommand_from collection; and __fish_seen_subcommand_from run' -l port -d 'Port for the --mock server; pass "auto" for an OS-assigned ephemeral port (default: configured port, falls back to an ephemeral one if busy). Only valid with --mock.' -x
118
119
  complete -c postman -n '__fish_seen_subcommand_from collection; and __fish_seen_subcommand_from run' -l simulate -d 'Start mock servers with fault-injection scenarios from a .sim.yaml file' -r
119
120
  complete -c postman -n '__fish_seen_subcommand_from collection; and __fish_seen_subcommand_from run' -l report-events -d 'Send run results and analytics to Postman'
120
121
  complete -c postman -n '__fish_seen_subcommand_from collection; and __fish_seen_subcommand_from run' -s h -l help -d 'display help for command'
@@ -446,11 +447,21 @@ complete -c postman -n '__fish_seen_subcommand_from sdk; and __fish_seen_subcomm
446
447
  complete -c postman -n '__fish_seen_subcommand_from sdk; and __fish_seen_subcommand_from connections; and __fish_seen_subcommand_from delete' -s h -l help -d 'display help for command'
447
448
 
448
449
  # ---------- mock ----------
449
- complete -c postman -n '__postman_using_subcommand mock run' -a run -d 'Start a local mock server given a manifest file (JSON or YAML).'
450
+ complete -c postman -n '__postman_using_subcommand mock generate run' -a generate -d 'Generate a local, runnable mock from a Postman collection (v2.0/v2.1/v3 file, or a git-native v3 collection directory) or an OpenAPI 3.0/3.1 spec file. The source type is auto-detected.'
451
+ complete -c postman -n '__postman_using_subcommand mock generate run' -a run -d 'Start a local mock server given a manifest file (JSON or YAML).'
450
452
  complete -c postman -n '__fish_seen_subcommand_from mock' -s h -l help -d 'display help for command'
453
+ # ---------- mock generate ----------
454
+ complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from generate' -s o -l output -d 'Output directory for the mock (default: postman/mocks/<slug>)' -r
455
+ complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from generate' -l name -d 'Display name for the generated mock' -x
456
+ complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from generate' -l port -d 'Port the mock server should listen on (default: 4500)' -x
457
+ complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from generate' -l force -d 'Overwrite the config.yaml/default.js in the output directory if it already exists'
458
+ complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from generate' -s u -l update -d 'Update an existing mock in place from the source: path to its config.yaml (or the directory containing it). Regenerates the default scenario handler and preserves the existing name/port/scenarios. Cannot be combined with --output.' -r
459
+ complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from generate' -s x -l suppress-exit-code -d 'Always exit with code 0, even on failure'
460
+ complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from generate' -s h -l help -d 'display help for command'
451
461
  # ---------- mock run ----------
452
462
  complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from run' -s e -l environment -d 'Path to an environment file (JSON or YAML) for pm.environment' -r
453
463
  complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from run' -s g -l globals -d 'Path to a globals file (JSON or YAML) for pm.globals' -r
464
+ complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from run' -s p -l port -d 'Mock server port, or "auto" for an ephemeral one (default: configured port, falls back to an ephemeral one if busy).' -x
454
465
  complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from run' -s h -l help -d 'display help for command'
455
466
 
456
467
  # ---------- application ----------
@@ -1,6 +1,6 @@
1
1
  #compdef postman
2
2
  compdef _postman postman
3
- # Zsh completion for Postman CLI (postman v1.46.1)
3
+ # Zsh completion for Postman CLI (postman v1.47.2)
4
4
  # Auto-generated by scripts/generate.mjs — DO NOT EDIT
5
5
  # Source: spec/commands.json
6
6
  # https://github.com/yokawasa/postman-cli-completion
@@ -184,6 +184,7 @@ _postman_collection_run() {
184
184
  '--export-cookie-jar[Exports the cookie jar to a file after completing the run]:path:_files -g "*.json"' \
185
185
  '--verbose[Show detailed information of collection run and each request sent]' \
186
186
  '--mock[Start a mock server from manifest (.json, .yaml or .yml) file]:path:_files -g "*.json"' \
187
+ '--port[Port for the --mock server; pass "auto" for an OS-assigned ephemeral port (default\: configured port, falls back to an ephemeral one if busy). Only valid with --mock.]:port' \
187
188
  '--simulate[Start mock servers with fault-injection scenarios from a .sim.yaml file]:path:_files -g "*.(sim.yaml|yaml|yml)"' \
188
189
  '--report-events[Send run results and analytics to Postman]' \
189
190
  '(-h --help)'{-h,--help}'[display help for command]' \
@@ -861,6 +862,7 @@ _postman_mock() {
861
862
  case $state in
862
863
  args)
863
864
  case $words[1] in
865
+ generate) _postman_mock_generate ;;
864
866
  run) _postman_mock_run ;;
865
867
  esac
866
868
  ;;
@@ -870,15 +872,29 @@ _postman_mock() {
870
872
  _postman_mock_commands() {
871
873
  local -a sub
872
874
  sub=(
875
+ 'generate:Generate a local, runnable mock from a Postman collection (v2.0/v2.1/v3 file, or a git-native v3 collection directory) or an OpenAPI 3.0/3.1 spec file. The source type is auto-detected.'
873
876
  'run:Start a local mock server given a manifest file (JSON or YAML).'
874
877
  )
875
878
  _describe -t commands 'mock command' sub
876
879
  }
877
880
 
881
+ _postman_mock_generate() {
882
+ _arguments \
883
+ '(-o --output)'{-o,--output}'[Output directory for the mock (default\: postman/mocks/<slug>)]:dir:_files -g "*.json"' \
884
+ '--name[Display name for the generated mock]:name' \
885
+ '--port[Port the mock server should listen on (default\: 4500)]:port' \
886
+ '--force[Overwrite the config.yaml/default.js in the output directory if it already exists]' \
887
+ '(-u --update)'{-u,--update}'[Update an existing mock in place from the source\: path to its config.yaml (or the directory containing it). Regenerates the default scenario handler and preserves the existing name/port/scenarios. Cannot be combined with --output.]:mockPath:_files -g "*.json"' \
888
+ '(-x --suppress-exit-code)'{-x,--suppress-exit-code}'[Always exit with code 0, even on failure]' \
889
+ '(-h --help)'{-h,--help}'[display help for command]' \
890
+ '*:sourcePath:'
891
+ }
892
+
878
893
  _postman_mock_run() {
879
894
  _arguments \
880
895
  '(-e --environment)'{-e,--environment}'[Path to an environment file (JSON or YAML) for pm.environment]:path:_files -g "*.json"' \
881
896
  '(-g --globals)'{-g,--globals}'[Path to a globals file (JSON or YAML) for pm.globals]:path:_files -g "*.json"' \
897
+ '(-p --port)'{-p,--port}'[Mock server port, or "auto" for an ephemeral one (default\: configured port, falls back to an ephemeral one if busy).]:port' \
882
898
  '(-h --help)'{-h,--help}'[display help for command]' \
883
899
  '*:manifestPath:'
884
900
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "postman-cli-completion",
3
- "version": "1.46.1",
3
+ "version": "1.47.2",
4
4
  "description": "Shell completions for the Postman CLI (zsh, bash, fish)",
5
5
  "type": "module",
6
6
  "bin": {