diff --git a/CHANGELOG.md b/CHANGELOG.md index 35ce52b3..b8fef450 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,18 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how ## Unreleased +## 1.2.0 - 2021-05-26 + +### Added + +- ([GH-306](https://github.com/puppetlabs/puppet-editor-services/issues/306)) Add a code folding range provider for Manifests + +### Fixed + +- ([GH-300](https://github.com/puppetlabs/puppet-editor-services/issues/300)) Return nil for bad hover requests +- ([Commit](https://github.com/puppetlabs/puppet-editor-services/commit/b9a0d98f377e8a7b083a285e88cb538b6a9c45b1)) FixedP typo ([Juan vStone](https://github.com/vStone)) + + ## 1.1.0 - 2021-01-27 ### Added diff --git a/lib/puppet-languageserver/static_data/bolt-boltlib.json b/lib/puppet-languageserver/static_data/bolt-boltlib.json index 50600e55..0e8f9a51 100644 --- a/lib/puppet-languageserver/static_data/bolt-boltlib.json +++ b/lib/puppet-languageserver/static_data/bolt-boltlib.json @@ -1 +1 @@ -{"datatypes":[{"key":"ResultSet","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"","alias_of":null,"attributes":[{"key":"results","default_value":null,"doc":"","types":"Array[Variant[Result, ApplyResult]]"}],"is_type_alias":false},{"key":"Target","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"","alias_of":null,"attributes":[{"key":"uri","default_value":null,"doc":"","types":"Optional[String[1]]"},{"key":"name","default_value":null,"doc":"","types":"Optional[String[1]]"},{"key":"safe_name","default_value":null,"doc":"","types":"Optional[String[1]]"},{"key":"target_alias","default_value":null,"doc":"","types":"Optional[Variant[String[1], Array[String[1]]]]"},{"key":"config","default_value":null,"doc":"","types":"Optional[Hash[String[1], Data]]"},{"key":"vars","default_value":null,"doc":"","types":"Optional[Hash[String[1], Data]]"},{"key":"facts","default_value":null,"doc":"","types":"Optional[Hash[String[1], Data]]"},{"key":"features","default_value":null,"doc":"","types":"Optional[Array[String[1]]]"},{"key":"plugin_hooks","default_value":null,"doc":"","types":"Optional[Hash[String[1], Data]]"},{"key":"resources","default_value":null,"doc":"","types":"Optional[Hash[String[1], ResourceInstance]]"}],"is_type_alias":false},{"key":"ResourceInstance","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"","alias_of":null,"attributes":[{"key":"target","default_value":null,"doc":"","types":"Target"},{"key":"type","default_value":null,"doc":"","types":"Variant[String[1], Type[Resource]]"},{"key":"title","default_value":null,"doc":"","types":"String[1]"},{"key":"state","default_value":null,"doc":"","types":"Optional[Hash[String[1], Data]]"},{"key":"desired_state","default_value":null,"doc":"","types":"Optional[Hash[String[1], Data]]"},{"key":"events","default_value":null,"doc":"","types":"Optional[Array[Hash[String[1], Data]]]"}],"is_type_alias":false},{"key":"Result","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"","alias_of":null,"attributes":[{"key":"value","default_value":null,"doc":"","types":"Hash[String[1], Data]"},{"key":"target","default_value":null,"doc":"","types":"Target"}],"is_type_alias":false},{"key":"ApplyResult","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"","alias_of":null,"attributes":[{"key":"report","default_value":null,"doc":"","types":"Hash[String[1], Data]"},{"key":"target","default_value":null,"doc":"","types":"Target"}],"is_type_alias":false},{"key":"Boltlib::PlanResult","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"","alias_of":"Variant[Boolean, Numeric, String, Undef, Error, Result, ApplyResult, ResultSet, Target, ResourceInstance, Array[Boltlib::PlanResult], Hash[String, Boltlib::PlanResult]]","attributes":[],"is_type_alias":true},{"key":"Boltlib::TargetSpec","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"A TargetSpec represents any String, Target or combination thereof that can be\npassed to get_targets() to return an Array[Target]. Generally, users\nshouldn't need to worry about the distinction between TargetSpec and\nTarget/Array[Target], since the run_* functions will all handle them both\nautomatically. But for use cases that need to deal with the exact list of\nTargets that will be used, get_targets() will return that.","alias_of":"Variant[String[1], Target, Array[Boltlib::TargetSpec]]","attributes":[],"is_type_alias":true}],"functions":[{"key":"resolve_references","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Evaluates all `_plugin` references in a hash and returns the resolved reference data.","function_version":4,"signatures":[{"key":"resolve_references(Data $references)","doc":"Evaluates all `_plugin` references in a hash and returns the resolved reference data.","return_types":["Data"],"parameters":[{"name":"references","doc":"A hash of reference data to resolve.","types":["Data"],"signature_key_offset":24,"signature_key_length":11}]}]},{"key":"puppetdb_query","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Makes a query to [puppetdb](https://puppet.com/docs/puppetdb/latest/index.html)\nusing Bolt's PuppetDB client.","function_version":4,"signatures":[{"key":"puppetdb_query(Variant[String, Array[Data]] $query)","doc":"Makes a query to [puppetdb](https://puppet.com/docs/puppetdb/latest/index.html)\nusing Bolt's PuppetDB client.","return_types":["Array[Data]"],"parameters":[{"name":"query","doc":"A PQL query.\nLearn more about [Puppet's query language](https://puppet.com/docs/puppetdb/latest/api/query/tutorial-pql.html), PQL.","types":["Variant[String, Array[Data]]"],"signature_key_offset":44,"signature_key_length":6}]}]},{"key":"upload_file","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Uploads the given file or directory to the given set of targets and returns the result from each upload.\nThis function does nothing if the list of targets is empty.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"upload_file(String[1] $source, String[1] $destination, Boltlib::TargetSpec $targets, Optional[Hash[String[1], Any]] $options)","doc":"Upload a file or directory.","return_types":["ResultSet"],"parameters":[{"name":"source","doc":"A source path, either an absolute path or a modulename/filename selector for a\nfile or directory in $MODULEROOT/files.","types":["String[1]"],"signature_key_offset":22,"signature_key_length":7},{"name":"destination","doc":"An absolute path on the target(s).","types":["String[1]"],"signature_key_offset":41,"signature_key_length":12},{"name":"targets","doc":"A pattern identifying zero or more targets. See {get_targets} for accepted patterns.","types":["Boltlib::TargetSpec"],"signature_key_offset":75,"signature_key_length":8},{"name":"options","doc":"A hash of additional options.","types":["Optional[Hash[String[1], Any]]"],"signature_key_offset":116,"signature_key_length":8}]},{"key":"upload_file(String[1] $source, String[1] $destination, Boltlib::TargetSpec $targets, String $description, Optional[Hash[String[1], Any]] $options)","doc":"Upload a file or directory, logging the provided description.","return_types":["ResultSet"],"parameters":[{"name":"source","doc":"A source path, either an absolute path or a modulename/filename selector for a\nfile or directory in $MODULEROOT/files.","types":["String[1]"],"signature_key_offset":22,"signature_key_length":7},{"name":"destination","doc":"An absolute path on the target(s).","types":["String[1]"],"signature_key_offset":41,"signature_key_length":12},{"name":"targets","doc":"A pattern identifying zero or more targets. See {get_targets} for accepted patterns.","types":["Boltlib::TargetSpec"],"signature_key_offset":75,"signature_key_length":8},{"name":"description","doc":"A description to be output when calling this function.","types":["String"],"signature_key_offset":92,"signature_key_length":12},{"name":"options","doc":"A hash of additional options.","types":["Optional[Hash[String[1], Any]]"],"signature_key_offset":137,"signature_key_length":8}]}]},{"key":"puppetdb_fact","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Collects facts based on a list of certnames.\n\nIf a node is not found in PuppetDB, it's included in the returned hash with an empty facts hash.\nOtherwise, the node is included in the hash with a value that is a hash of its facts.","function_version":4,"signatures":[{"key":"puppetdb_fact(Array[String] $certnames)","doc":"Collects facts based on a list of certnames.\n\nIf a node is not found in PuppetDB, it's included in the returned hash with an empty facts hash.\nOtherwise, the node is included in the hash with a value that is a hash of its facts.","return_types":["Hash[String, Data]"],"parameters":[{"name":"certnames","doc":"Array of certnames.","types":["Array[String]"],"signature_key_offset":28,"signature_key_length":10}]}]},{"key":"get_targets","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Parses common ways of referring to targets and returns an array of Targets.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"get_targets(Boltlib::TargetSpec $names)","doc":"Parses common ways of referring to targets and returns an array of Targets.\n\n> **Note:** Not available in apply block","return_types":["Array[Target]"],"parameters":[{"name":"names","doc":"A pattern or array of patterns identifying a set of targets.","types":["Boltlib::TargetSpec"],"signature_key_offset":32,"signature_key_length":6}]}]},{"key":"run_task","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Runs a given instance of a `Task` on the given set of targets and returns the result from each.\nThis function does nothing if the list of targets is empty.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"run_task(String[1] $task_name, Boltlib::TargetSpec $targets, Optional[Hash[String[1], Any]] $args)","doc":"Run a task.","return_types":["ResultSet"],"parameters":[{"name":"task_name","doc":"The task to run.","types":["String[1]"],"signature_key_offset":19,"signature_key_length":10},{"name":"targets","doc":"A pattern identifying zero or more targets. See {get_targets} for accepted patterns.","types":["Boltlib::TargetSpec"],"signature_key_offset":51,"signature_key_length":8},{"name":"args","doc":"A hash of arguments to the task. Can also include additional options.","types":["Optional[Hash[String[1], Any]]"],"signature_key_offset":92,"signature_key_length":5}]},{"key":"run_task(String[1] $task_name, Boltlib::TargetSpec $targets, Optional[String] $description, Optional[Hash[String[1], Any]] $args)","doc":"Run a task, logging the provided description.","return_types":["ResultSet"],"parameters":[{"name":"task_name","doc":"The task to run.","types":["String[1]"],"signature_key_offset":19,"signature_key_length":10},{"name":"targets","doc":"A pattern identifying zero or more targets. See {get_targets} for accepted patterns.","types":["Boltlib::TargetSpec"],"signature_key_offset":51,"signature_key_length":8},{"name":"description","doc":"A description to be output when calling this function.","types":["Optional[String]"],"signature_key_offset":78,"signature_key_length":12},{"name":"args","doc":"A hash of arguments to the task. Can also include additional options.","types":["Optional[Hash[String[1], Any]]"],"signature_key_offset":123,"signature_key_length":5}]}]},{"key":"get_target","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Get a single target from inventory if it exists, otherwise create a new Target.\n\n> **Note:** Calling `get_target('all')` returns an empty array.","function_version":4,"signatures":[{"key":"get_target(Boltlib::TargetSpec $name)","doc":"Get a single target from inventory if it exists, otherwise create a new Target.\n\n> **Note:** Calling `get_target('all')` returns an empty array.","return_types":["Target"],"parameters":[{"name":"name","doc":"A Target name.","types":["Boltlib::TargetSpec"],"signature_key_offset":31,"signature_key_length":5}]}]},{"key":"run_plan","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Runs the `plan` referenced by its name. A plan is autoloaded from `$MODULEROOT/plans`.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"run_plan(String $plan_name, Optional[Hash] $args)","doc":"Run a plan","return_types":["Boltlib::PlanResult"],"parameters":[{"name":"plan_name","doc":"The plan to run.","types":["String"],"signature_key_offset":16,"signature_key_length":10},{"name":"args","doc":"A hash of arguments to the plan. Can also include additional options.","types":["Optional[Hash]"],"signature_key_offset":43,"signature_key_length":5}]},{"key":"run_plan(String $plan_name, Boltlib::TargetSpec $targets, Optional[Hash] $args)","doc":"Run a plan, specifying `$nodes` or `$targets` as a positional argument.\n\n> **Note:** When running a plan with both a `$nodes` and `$targets` parameter, and using the second\npositional argument, the plan will fail.","return_types":["Boltlib::PlanResult"],"parameters":[{"name":"plan_name","doc":"The plan to run.","types":["String"],"signature_key_offset":16,"signature_key_length":10},{"name":"targets","doc":"A pattern identifying zero or more targets. See {get_targets} for accepted patterns.","types":["Boltlib::TargetSpec"],"signature_key_offset":48,"signature_key_length":8},{"name":"args","doc":"A hash of arguments to the plan. Can also include additional options.","types":["Optional[Hash]"],"signature_key_offset":73,"signature_key_length":5}]}]},{"key":"without_default_logging","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Define a block where default logging is suppressed.\n\nMessages for actions within this block will be logged at `info` level instead\nof `notice`, so they will not be seen normally but will still be present\nwhen `verbose` logging is requested.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"without_default_logging(Callable[0, 0] &$block)","doc":"Define a block where default logging is suppressed.\n\nMessages for actions within this block will be logged at `info` level instead\nof `notice`, so they will not be seen normally but will still be present\nwhen `verbose` logging is requested.\n\n> **Note:** Not available in apply block","return_types":["Undef"],"parameters":[{"name":"&block","doc":"The block where action logging is suppressed.","types":["Callable[0, 0]"],"signature_key_offset":39,"signature_key_length":7}]}]},{"key":"facts","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Returns the facts hash for a target.\n\nUsing the `facts` function does not automatically collect facts for a target,\nand will only return facts that are currently set in the inventory. To collect\nfacts from a target and set them in the inventory, run the\n[facts](writing_plans.md#collect-facts-from-targets) plan or\n[puppetdb_fact](writing_plans.md#collect-facts-from-puppetdb) plan.","function_version":4,"signatures":[{"key":"facts(Target $target)","doc":"Returns the facts hash for a target.\n\nUsing the `facts` function does not automatically collect facts for a target,\nand will only return facts that are currently set in the inventory. To collect\nfacts from a target and set them in the inventory, run the\n[facts](writing_plans.md#collect-facts-from-targets) plan or\n[puppetdb_fact](writing_plans.md#collect-facts-from-puppetdb) plan.","return_types":["Hash[String, Data]"],"parameters":[{"name":"target","doc":"A target.","types":["Target"],"signature_key_offset":13,"signature_key_length":7}]}]},{"key":"run_task_with","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Runs a given instance of a `Task` with target-specific parameters on the given set of targets and\nreturns the result from each. This function differs from {run_task} by accepting a block that returns\na `Hash` of target-specific parameters that are passed to the task. This can be used to send parameters\nbased on a target's attributes, such as its `facts`, or to use conditional logic to determine the\nparameters a task should receive for a specific target.\n\nThis function does nothing if the list of targets is empty.\n\n> **Note:** Not available in apply block\n\n> **Note:** Not available to targets using the pcp transport","function_version":4,"signatures":[{"key":"run_task_with(String[1] $task_name, Boltlib::TargetSpec $targets, Optional[Hash[String[1], Any]] $options, Callable[Target] &$block)","doc":"Run a task with target-specific parameters.","return_types":["ResultSet"],"parameters":[{"name":"task_name","doc":"The task to run.","types":["String[1]"],"signature_key_offset":24,"signature_key_length":10},{"name":"targets","doc":"A pattern identifying zero or more targets. See {get_targets} for accepted patterns.","types":["Boltlib::TargetSpec"],"signature_key_offset":56,"signature_key_length":8},{"name":"options","doc":"A hash of additional options.","types":["Optional[Hash[String[1], Any]]"],"signature_key_offset":97,"signature_key_length":8},{"name":"&block","doc":"A block that returns a `Hash` of target-specific parameters for the task.","types":["Callable[Target]"],"signature_key_offset":124,"signature_key_length":7}]},{"key":"run_task_with(String[1] $task_name, Boltlib::TargetSpec $targets, Optional[String] $description, Optional[Hash[String[1], Any]] $options, Callable[Target] &$block)","doc":"Run a task with target-specific parameters, logging the provided description.","return_types":["ResultSet"],"parameters":[{"name":"task_name","doc":"The task to run.","types":["String[1]"],"signature_key_offset":24,"signature_key_length":10},{"name":"targets","doc":"A pattern identifying zero or more targets. See {get_targets} for accepted patterns.","types":["Boltlib::TargetSpec"],"signature_key_offset":56,"signature_key_length":8},{"name":"description","doc":"A description to be output when calling this function.","types":["Optional[String]"],"signature_key_offset":83,"signature_key_length":12},{"name":"options","doc":"A hash of additional options.","types":["Optional[Hash[String[1], Any]]"],"signature_key_offset":128,"signature_key_length":8},{"name":"&block","doc":"A block that returns a `Hash` of target-specific parameters for the task.","types":["Callable[Target]"],"signature_key_offset":155,"signature_key_length":7}]}]},{"key":"download_file","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Downloads the given file or directory from the given set of targets and saves it to a directory\nmatching the target's name under the given destination directory. Returns the result from each\ndownload. This does nothing if the list of targets is empty.\n\n> **Note:** Existing content in the destination directory is deleted before downloading from\n> the targets.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"download_file(String[1] $source, String[1] $destination, Boltlib::TargetSpec $targets, Optional[Hash[String[1], Any]] $options)","doc":"Download a file or directory.","return_types":["ResultSet"],"parameters":[{"name":"source","doc":"The absolute path to the file or directory on the target(s).","types":["String[1]"],"signature_key_offset":24,"signature_key_length":7},{"name":"destination","doc":"The relative path to the destination directory on the local system. Expands\nrelative to `/downloads/`.","types":["String[1]"],"signature_key_offset":43,"signature_key_length":12},{"name":"targets","doc":"A pattern identifying zero or more targets. See {get_targets} for accepted patterns.","types":["Boltlib::TargetSpec"],"signature_key_offset":77,"signature_key_length":8},{"name":"options","doc":"A hash of additional options.","types":["Optional[Hash[String[1], Any]]"],"signature_key_offset":118,"signature_key_length":8}]},{"key":"download_file(String[1] $source, String[1] $destination, Boltlib::TargetSpec $targets, String $description, Optional[Hash[String[1], Any]] $options)","doc":"Download a file or directory, logging the provided description.","return_types":["ResultSet"],"parameters":[{"name":"source","doc":"The absolute path to the file or directory on the target(s).","types":["String[1]"],"signature_key_offset":24,"signature_key_length":7},{"name":"destination","doc":"The relative path to the destination directory on the local system. Expands\nrelative to `/downloads/`.","types":["String[1]"],"signature_key_offset":43,"signature_key_length":12},{"name":"targets","doc":"A pattern identifying zero or more targets. See {get_targets} for accepted patterns.","types":["Boltlib::TargetSpec"],"signature_key_offset":77,"signature_key_length":8},{"name":"description","doc":"A description to be output when calling this function.","types":["String"],"signature_key_offset":94,"signature_key_length":12},{"name":"options","doc":"A hash of additional options.","types":["Optional[Hash[String[1], Any]]"],"signature_key_offset":139,"signature_key_length":8}]}]},{"key":"wait_until_available","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Wait until all targets accept connections.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"wait_until_available(Boltlib::TargetSpec $targets, Optional[Hash[String[1], Any]] $options)","doc":"Wait until all targets accept connections.\n\n> **Note:** Not available in apply block","return_types":["ResultSet"],"parameters":[{"name":"targets","doc":"A pattern identifying zero or more targets. See {get_targets} for accepted patterns.","types":["Boltlib::TargetSpec"],"signature_key_offset":41,"signature_key_length":8},{"name":"options","doc":"A hash of additional options.","types":["Optional[Hash[String[1], Any]]"],"signature_key_offset":82,"signature_key_length":8}]}]},{"key":"resource","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Lookup a resource in the target's data.\n\nFor more information about resources see [the\ndocumentation](https://puppet.com/docs/puppet/latest/lang_resources.html).\n\n> **Note:** The `ResourceInstance` data type is under active development and is subject to\n change. You can read more about the data type in the [experimental features\n documentation](experimental_features.md#resourceinstance-data-type).","function_version":4,"signatures":[{"key":"resource(Target $target, Type[Resource] $type, String[1] $title)","doc":"Lookup a resource in the target's data.","return_types":["Optional[ResourceInstance]"],"parameters":[{"name":"target","doc":"The Target object to add resources to. See {get_targets}.","types":["Target"],"signature_key_offset":16,"signature_key_length":7},{"name":"type","doc":"The type of the resource","types":["Type[Resource]"],"signature_key_offset":40,"signature_key_length":5},{"name":"title","doc":"The title of the resource","types":["String[1]"],"signature_key_offset":57,"signature_key_length":6}]},{"key":"resource(Target $target, String[1] $type, String[1] $title)","doc":"Lookup a resource in the target's data, referring to resource as a string","return_types":["Optional[ResourceInstance]"],"parameters":[{"name":"target","doc":"The Target object to add resources to. See {get_targets}.","types":["Target"],"signature_key_offset":16,"signature_key_length":7},{"name":"type","doc":"The type of the resource","types":["String[1]"],"signature_key_offset":35,"signature_key_length":5},{"name":"title","doc":"The title of the resource","types":["String[1]"],"signature_key_offset":52,"signature_key_length":6}]}]},{"key":"set_resources","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Sets one or more ResourceInstances on a Target. This function does not apply or modify\nresources on a target.\n\nFor more information about resources see [the\ndocumentation](https://puppet.com/docs/puppet/latest/lang_resources.html).\n\n> **Note:** The `ResourceInstance` data type is under active development and is subject to\n change. You can read more about the data type in the [experimental features\n documentation](experimental_features.md#resourceinstance-data-type).\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"set_resources(Target $target, Hash $resource)","doc":"Set a single resource from a data hash.","return_types":["Array[ResourceInstance]"],"parameters":[{"name":"target","doc":"The `Target` object to add a resource to. See {get_targets}.","types":["Target"],"signature_key_offset":21,"signature_key_length":7},{"name":"resource","doc":"The resource data hash used to set a resource on the target.","types":["Hash"],"signature_key_offset":35,"signature_key_length":9}]},{"key":"set_resources(Target $target, ResourceInstance $resource)","doc":"Set a single resource from a `ResourceInstance` object","return_types":["Array[ResourceInstance]"],"parameters":[{"name":"target","doc":"The `Target` object to add a resource to. See {get_targets}.","types":["Target"],"signature_key_offset":21,"signature_key_length":7},{"name":"resource","doc":"The `ResourceInstance` object to set on the target.","types":["ResourceInstance"],"signature_key_offset":47,"signature_key_length":9}]},{"key":"set_resources(Target $target, Array[Variant[Hash, ResourceInstance]] $resources)","doc":"Set multiple resources from an array of data hashes and `ResourceInstance` objects.","return_types":["Array[ResourceInstance]"],"parameters":[{"name":"target","doc":"The `Target` object to add resources to. See {get_targets}.","types":["Target"],"signature_key_offset":21,"signature_key_length":7},{"name":"resources","doc":"The resource data hashes and `ResourceInstance` objects to set on the target.","types":["Array[Variant[Hash, ResourceInstance]]"],"signature_key_offset":69,"signature_key_length":10}]}]},{"key":"catch_errors","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Catches errors in a given block and returns them. This will return the\noutput of the block if no errors are raised. Accepts an optional list of\nerror kinds to catch.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"catch_errors(Optional[Array[String[1]]] $error_types, Callable[0, 0] &$block)","doc":"Catches errors in a given block and returns them. This will return the\noutput of the block if no errors are raised. Accepts an optional list of\nerror kinds to catch.\n\n> **Note:** Not available in apply block","return_types":["Any"],"parameters":[{"name":"error_types","doc":"An array of error types to catch","types":["Optional[Array[String[1]]]"],"signature_key_offset":40,"signature_key_length":12},{"name":"&block","doc":"The block of steps to catch errors on","types":["Callable[0, 0]"],"signature_key_offset":69,"signature_key_length":7}]}]},{"key":"write_file","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Write contents to a file on the given set of targets.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"write_file(String $content, String[1] $destination, Boltlib::TargetSpec $targets, Optional[Hash[String[1], Any]] $options)","doc":"Write contents to a file on the given set of targets.\n\n> **Note:** Not available in apply block","return_types":["ResultSet"],"parameters":[{"name":"content","doc":"File content to write.","types":["String"],"signature_key_offset":18,"signature_key_length":8},{"name":"destination","doc":"An absolute path on the target(s).","types":["String[1]"],"signature_key_offset":38,"signature_key_length":12},{"name":"targets","doc":"A pattern identifying zero or more targets. See {get_targets} for accepted patterns.","types":["Boltlib::TargetSpec"],"signature_key_offset":72,"signature_key_length":8},{"name":"options","doc":"","types":["Optional[Hash[String[1], Any]]"],"signature_key_offset":113,"signature_key_length":8}]}]},{"key":"set_var","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Sets a variable `{ key => value }` for a target.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"set_var(Target $target, String $key, Data $value)","doc":"Sets a variable `{ key => value }` for a target.\n\n> **Note:** Not available in apply block","return_types":["Target"],"parameters":[{"name":"target","doc":"The Target object to set the variable for. See {get_targets}.","types":["Target"],"signature_key_offset":15,"signature_key_length":7},{"name":"key","doc":"The key for the variable.","types":["String"],"signature_key_offset":31,"signature_key_length":4},{"name":"value","doc":"The value of the variable.","types":["Data"],"signature_key_offset":42,"signature_key_length":6}]}]},{"key":"vars","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Returns a hash of the 'vars' (variables) assigned to a target.\n\nVars can be assigned through the inventory file or `set_var` function.\nPlan authors can call this function on a target to get the variable hash\nfor that target.","function_version":4,"signatures":[{"key":"vars(Target $target)","doc":"Returns a hash of the 'vars' (variables) assigned to a target.\n\nVars can be assigned through the inventory file or `set_var` function.\nPlan authors can call this function on a target to get the variable hash\nfor that target.","return_types":["Hash[String, Data]"],"parameters":[{"name":"target","doc":"The Target object to get variables from. See {get_targets}.","types":["Target"],"signature_key_offset":12,"signature_key_length":7}]}]},{"key":"set_config","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Set configuration options on a target.\n\n> **Note:** Not available in apply block\n\n> **Note:** Only compatible with inventory v2","function_version":4,"signatures":[{"key":"set_config(Target $target, Variant[String, Array[String]] $key_or_key_path, Any $value)","doc":"Set configuration options on a target.\n\n> **Note:** Not available in apply block\n\n> **Note:** Only compatible with inventory v2","return_types":["Target"],"parameters":[{"name":"target","doc":"The Target object to configure. See {get_targets}.","types":["Target"],"signature_key_offset":18,"signature_key_length":7},{"name":"key_or_key_path","doc":"The configuration setting to update.","types":["Variant[String, Array[String]]"],"signature_key_offset":58,"signature_key_length":16},{"name":"value","doc":"The configuration value","types":["Any"],"signature_key_offset":80,"signature_key_length":6}]}]},{"key":"add_to_group","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Adds a target to specified inventory group.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"add_to_group(Boltlib::TargetSpec $targets, String[1] $group)","doc":"Adds a target to specified inventory group.\n\n> **Note:** Not available in apply block","return_types":["Any"],"parameters":[{"name":"targets","doc":"A pattern or array of patterns identifying a set of targets.","types":["Boltlib::TargetSpec"],"signature_key_offset":33,"signature_key_length":8},{"name":"group","doc":"The name of the group to add targets to.","types":["String[1]"],"signature_key_offset":53,"signature_key_length":6}]}]},{"key":"run_command","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Runs a command on the given set of targets and returns the result from each command execution.\nThis function does nothing if the list of targets is empty.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"run_command(String[1] $command, Boltlib::TargetSpec $targets, Optional[Hash[String[1], Any]] $options)","doc":"Run a command.","return_types":["ResultSet"],"parameters":[{"name":"command","doc":"A command to run on target.","types":["String[1]"],"signature_key_offset":22,"signature_key_length":8},{"name":"targets","doc":"A pattern identifying zero or more targets. See {get_targets} for accepted patterns.","types":["Boltlib::TargetSpec"],"signature_key_offset":52,"signature_key_length":8},{"name":"options","doc":"A hash of additional options.","types":["Optional[Hash[String[1], Any]]"],"signature_key_offset":93,"signature_key_length":8}]},{"key":"run_command(String[1] $command, Boltlib::TargetSpec $targets, String $description, Optional[Hash[String[1], Any]] $options)","doc":"Run a command, logging the provided description.","return_types":["ResultSet"],"parameters":[{"name":"command","doc":"A command to run on target.","types":["String[1]"],"signature_key_offset":22,"signature_key_length":8},{"name":"targets","doc":"A pattern identifying zero or more targets. See {get_targets} for accepted patterns.","types":["Boltlib::TargetSpec"],"signature_key_offset":52,"signature_key_length":8},{"name":"description","doc":"A description to be output when calling this function.","types":["String"],"signature_key_offset":69,"signature_key_length":12},{"name":"options","doc":"A hash of additional options.","types":["Optional[Hash[String[1], Any]]"],"signature_key_offset":114,"signature_key_length":8}]}]},{"key":"add_facts","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Deep merges a hash of facts with the existing facts on a target.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"add_facts(Target $target, Hash $facts)","doc":"Deep merges a hash of facts with the existing facts on a target.\n\n> **Note:** Not available in apply block","return_types":["Target"],"parameters":[{"name":"target","doc":"A target.","types":["Target"],"signature_key_offset":17,"signature_key_length":7},{"name":"facts","doc":"A hash of fact names to values that may include structured facts.","types":["Hash"],"signature_key_offset":31,"signature_key_length":6}]}]},{"key":"set_feature","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Sets a particular feature to present on a target.\n\nFeatures are used to determine what implementation of a task should be run.\nSupported features are:\n- `powershell`\n- `shell`\n- `puppet-agent`\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"set_feature(Target $target, String $feature, Optional[Boolean] $value)","doc":"Sets a particular feature to present on a target.\n\nFeatures are used to determine what implementation of a task should be run.\nSupported features are:\n- `powershell`\n- `shell`\n- `puppet-agent`\n\n> **Note:** Not available in apply block","return_types":["Target"],"parameters":[{"name":"target","doc":"The Target object to add features to. See {get_targets}.","types":["Target"],"signature_key_offset":19,"signature_key_length":7},{"name":"feature","doc":"The string identifying the feature.","types":["String"],"signature_key_offset":35,"signature_key_length":8},{"name":"value","doc":"Whether the feature is supported.","types":["Optional[Boolean]"],"signature_key_offset":63,"signature_key_length":6}]}]},{"key":"get_resources","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Query the state of resources on a list of targets using resource definitions in Bolt's module path.\nThe results are returned as a list of hashes representing each resource.\n\nRequires the Puppet Agent be installed on the target, which can be accomplished with apply_prep\nor by directly running the `puppet_agent::install` task. In order to be able to reference types without\nstring quoting (for example `get_resources($target, Package)` instead of `get_resources($target, 'Package')`),\nrun the command `bolt puppetfile generate-types` to generate type references in `$Boldir/.resource_types`.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"get_resources(Boltlib::TargetSpec $targets, Variant[String, Type[Resource], Array[Variant[String, Type[Resource]]]] $resources)","doc":"Query the state of resources on a list of targets using resource definitions in Bolt's module path.\nThe results are returned as a list of hashes representing each resource.\n\nRequires the Puppet Agent be installed on the target, which can be accomplished with apply_prep\nor by directly running the `puppet_agent::install` task. In order to be able to reference types without\nstring quoting (for example `get_resources($target, Package)` instead of `get_resources($target, 'Package')`),\nrun the command `bolt puppetfile generate-types` to generate type references in `$Boldir/.resource_types`.\n\n> **Note:** Not available in apply block","return_types":["ResultSet"],"parameters":[{"name":"targets","doc":"A pattern or array of patterns identifying a set of targets.","types":["Boltlib::TargetSpec"],"signature_key_offset":34,"signature_key_length":8},{"name":"resources","doc":"A resource type or instance, or an array of such.","types":["Variant[String, Type[Resource], Array[Variant[String, Type[Resource]]]]"],"signature_key_offset":116,"signature_key_length":10}]}]},{"key":"parallelize","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Map a code block onto an array, where each array element executes in parallel.\nThis function is experimental.\n\n> **Note:** Not available in apply block.","function_version":4,"signatures":[{"key":"parallelize(Array[Any] $data, Callable[Any] &$block)","doc":"Map a code block onto an array, where each array element executes in parallel.\nThis function is experimental.\n\n> **Note:** Not available in apply block.","return_types":["Array[Boltlib::PlanResult]"],"parameters":[{"name":"data","doc":"The array to apply the block to.","types":["Array[Any]"],"signature_key_offset":23,"signature_key_length":5},{"name":"&block","doc":"","types":["Callable[Any]"],"signature_key_offset":44,"signature_key_length":7}]}]},{"key":"remove_from_group","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Removes a target from the specified inventory group.\n\nThe target is removed from all child groups and all parent groups where the target has\nnot been explicitly defined. A target cannot be removed from the `all` group.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"remove_from_group(Boltlib::TargetSpec $target, String[1] $group)","doc":"Removes a target from the specified inventory group.\n\nThe target is removed from all child groups and all parent groups where the target has\nnot been explicitly defined. A target cannot be removed from the `all` group.\n\n> **Note:** Not available in apply block","return_types":["Any"],"parameters":[{"name":"target","doc":"A pattern identifying a single target.","types":["Boltlib::TargetSpec"],"signature_key_offset":38,"signature_key_length":7},{"name":"group","doc":"The name of the group to remove the target from.","types":["String[1]"],"signature_key_offset":57,"signature_key_length":6}]}]},{"key":"fail_plan","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Raises a `Bolt::PlanFailure` exception to signal to callers that the plan failed.\n\nPlan authors should call this function when their plan is not successful. The\nerror may then be caught by another plans `run_plan` function or in Bolt itself\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"fail_plan(String[1] $msg, Optional[String[1]] $kind, Optional[Hash[String[1], Any]] $details, Optional[String[1]] $issue_code)","doc":"Fail a plan, generating an exception from the parameters.","return_types":["Any"],"parameters":[{"name":"msg","doc":"An error message.","types":["String[1]"],"signature_key_offset":20,"signature_key_length":4},{"name":"kind","doc":"An easily matchable error kind.","types":["Optional[String[1]]"],"signature_key_offset":46,"signature_key_length":5},{"name":"details","doc":"Machine-parseable details about the error.","types":["Optional[Hash[String[1], Any]]"],"signature_key_offset":84,"signature_key_length":8},{"name":"issue_code","doc":"Unused.","types":["Optional[String[1]]"],"signature_key_offset":114,"signature_key_length":11}]},{"key":"fail_plan(Error $error)","doc":"Fail a plan, generating an exception from an existing Error object.","return_types":["Any"],"parameters":[{"name":"error","doc":"An error object.","types":["Error"],"signature_key_offset":16,"signature_key_length":6}]}]},{"key":"run_script","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Uploads the given script to the given set of targets and returns the result of having each target execute the script.\nThis function does nothing if the list of targets is empty.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"run_script(String[1] $script, Boltlib::TargetSpec $targets, Optional[Hash[String[1], Any]] $options)","doc":"Run a script.","return_types":["ResultSet"],"parameters":[{"name":"script","doc":"Path to a script to run on target. May be an absolute path or a modulename/filename selector for a\nfile in $MODULEROOT/files.","types":["String[1]"],"signature_key_offset":21,"signature_key_length":7},{"name":"targets","doc":"A pattern identifying zero or more targets. See {get_targets} for accepted patterns.","types":["Boltlib::TargetSpec"],"signature_key_offset":50,"signature_key_length":8},{"name":"options","doc":"A hash of additional options.","types":["Optional[Hash[String[1], Any]]"],"signature_key_offset":91,"signature_key_length":8}]},{"key":"run_script(String[1] $script, Boltlib::TargetSpec $targets, String $description, Optional[Hash[String[1], Any]] $options)","doc":"Run a script, logging the provided description.","return_types":["ResultSet"],"parameters":[{"name":"script","doc":"Path to a script to run on target. May be an absolute path or a modulename/filename selector for a\nfile in $MODULEROOT/files.","types":["String[1]"],"signature_key_offset":21,"signature_key_length":7},{"name":"targets","doc":"A pattern identifying zero or more targets. See {get_targets} for accepted patterns.","types":["Boltlib::TargetSpec"],"signature_key_offset":50,"signature_key_length":8},{"name":"description","doc":"A description to be output when calling this function.","types":["String"],"signature_key_offset":67,"signature_key_length":12},{"name":"options","doc":"A hash of additional options.","types":["Optional[Hash[String[1], Any]]"],"signature_key_offset":112,"signature_key_length":8}]}]},{"key":"apply_prep","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Installs the `puppet-agent` package on targets if needed, then collects facts,\nincluding any custom facts found in Bolt's module path. The package is\ninstalled using either the configured plugin or the `task` plugin with the\n`puppet_agent::install` task.\n\nAgent installation will be skipped if the target includes the `puppet-agent` feature, either as a\nproperty of its transport (PCP) or by explicitly setting it as a feature in Bolt's inventory.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"apply_prep(Boltlib::TargetSpec $targets, Optional[Hash[String, Data]] $options)","doc":"Installs the `puppet-agent` package on targets if needed, then collects facts,\nincluding any custom facts found in Bolt's module path. The package is\ninstalled using either the configured plugin or the `task` plugin with the\n`puppet_agent::install` task.\n\nAgent installation will be skipped if the target includes the `puppet-agent` feature, either as a\nproperty of its transport (PCP) or by explicitly setting it as a feature in Bolt's inventory.\n\n> **Note:** Not available in apply block","return_types":["Any"],"parameters":[{"name":"targets","doc":"A pattern or array of patterns identifying a set of targets.","types":["Boltlib::TargetSpec"],"signature_key_offset":31,"signature_key_length":8},{"name":"options","doc":"Options hash.","types":["Optional[Hash[String, Data]]"],"signature_key_offset":70,"signature_key_length":8}]}]}]} \ No newline at end of file +{"datatypes":[{"key":"ResultSet","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"For each target that you execute an action on, Bolt returns a `Result` object\nand adds the `Result` to a `ResultSet` object. In the case of [apply\nactions](applying_manifest_blocks.md), Bolt returns a `ResultSet` with one or\nmore `ApplyResult` objects.","alias_of":null,"attributes":[{"key":"results","default_value":null,"doc":"All results in the set.","types":"Array[Variant[Result, ApplyResult]]"}],"is_type_alias":false},{"key":"ContainerResult","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"The [run_container](plan_functions.md#run_container) plan function returns a\n`ContainerResult` object. A `ContainerResult` is a standalone object (not part\nof a `ResultSet`) that includes either the `stdout` and `stderr` values from\nrunning the container, or an `_error` object if the container exited with a\nnonzero exit code.","alias_of":null,"attributes":[{"key":"value","default_value":null,"doc":"A hash including the `stdout`, `stderr`, and `exit_code` received from the\ncontainer.","types":"Hash[String[1], Data]"}],"is_type_alias":false},{"key":"Target","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"The `Target` object represents a target and its specific connection options.","alias_of":null,"attributes":[{"key":"config","default_value":null,"doc":"The inventory configuration for the target. This function returns the\nconfiguration set directly on the target in `inventory.yaml` or set in\na plan using `Target.new` or `set_config()`. It does not return default\nconfiguration values or configuration set in Bolt configuration files.","types":"Optional[Hash[String[1], Data]]"},{"key":"facts","default_value":null,"doc":"The target's facts. This function does not look up facts for a target and\nonly returns the facts specified in an `inventory.yaml` file or set on a\ntarget during a plan run. To retrieve facts for a target and set them in\ninventory, run the [facts](writing_plans.md#collect-facts-from-targets)\nplan or [puppetdb_fact](writing_plans.md#collect-facts-from-puppetdb)\nplan.","types":"Optional[Hash[String[1], Data]]"},{"key":"features","default_value":null,"doc":"The target's features.","types":"Optional[Array[String[1]]]"},{"key":"name","default_value":null,"doc":"The target's human-readable name, or its URI if a name was not given.","types":"Optional[String[1]]"},{"key":"plugin_hooks","default_value":null,"doc":"The target's `plugin_hooks` [configuration\noptions](bolt_inventory_reference.md#plugin-hooks-1).","types":"Optional[Hash[String[1], Data]]"},{"key":"resources","default_value":null,"doc":"The target's resources. This function does not look up resources for a\ntarget and only returns resources set on a target during a plan run.","types":"Optional[Hash[String[1], ResourceInstance]]"},{"key":"safe_name","default_value":null,"doc":"The target's safe name. Equivalent to `name` if a name was given, or the\ntarget's `uri` with any password omitted.","types":"Optional[String[1]]"},{"key":"target_alias","default_value":null,"doc":"The target's aliases.","types":"Optional[Variant[String[1], Array[String[1]]]]"},{"key":"uri","default_value":null,"doc":"The target's URI.","types":"Optional[String[1]]"},{"key":"vars","default_value":null,"doc":"The target's variables.","types":"Optional[Hash[String[1], Data]]"}],"is_type_alias":false},{"key":"ResourceInstance","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"`ResourceInstance` objects are used to store the observed and desired state of a\ntarget's resource and to track events for the resource. These objects do not\nmodify or interact with a target's resources.\n\n> The `ResourceInstance` data type is experimental and might change in a future\n> release. You can learn more about this data type and how to use it in the\n> [experimental features\n> documentation](experimental_features.md#resourceinstance-data-type).","alias_of":null,"attributes":[{"key":"events","default_value":null,"doc":"Events for the resource.","types":"Optional[Array[Hash[String[1], Data]]]"},{"key":"desired_state","default_value":null,"doc":"[Attributes](https://puppet.com/docs/puppet/latest/lang_resources.html#attributes) describing\nthe desired state of the resource.","types":"Optional[Hash[String[1], Data]]"},{"key":"state","default_value":null,"doc":"[Attributes](https://puppet.com/docs/puppet/latest/lang_resources.html#attributes) describing\nthe observed state of the resource.","types":"Optional[Hash[String[1], Data]]"},{"key":"target","default_value":null,"doc":"The resource's target.","types":"Target"},{"key":"title","default_value":null,"doc":"The [resource title](https://puppet.com/docs/puppet/latest/lang_resources.html#title).","types":"String[1]"},{"key":"type","default_value":null,"doc":"The [resource type](https://puppet.com/docs/puppet/latest/lang_resources.html#resource-types).","types":"Variant[String[1], Type[Resource]]"}],"is_type_alias":false},{"key":"Result","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"For each target that you execute an action on, Bolt returns a `Result` object\nand adds the `Result` to a `ResultSet` object. A `Result` object contains\ninformation about the action you executed on the target.","alias_of":null,"attributes":[{"key":"target","default_value":null,"doc":"The target the result is from.","types":"Target"},{"key":"value","default_value":null,"doc":"The output or return of executing on the target.","types":"Hash[String[1], Data]"}],"is_type_alias":false},{"key":"ApplyResult","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"An [apply action](applying_manifest_blocks.md#return-value-of-apply-action)\nreturns an `ApplyResult`. An `ApplyResult` is part of a `ResultSet` object and\ncontains information about the apply action.","alias_of":null,"attributes":[{"key":"report","default_value":null,"doc":"The Puppet report from the apply action. Equivalent to calling `ApplyResult.value['report']`.\nThe report is a hash representation of the [`Puppet::Transaction::Report`\nobject](https://puppet.com/docs/puppet/latest/format_report.html), where each property\ncorresponds to a key in the report hash. For more information, see [Result\nkeys](applying_manifest_blocks.md#result-keys).","types":"Hash[String[1], Data]"},{"key":"target","default_value":null,"doc":"The target the result is from.","types":"Target"}],"is_type_alias":false},{"key":"Boltlib::PlanResult","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"","alias_of":"Variant[Boolean, Numeric, String, Undef, Error, Result, ApplyResult, ResultSet, Target, ResourceInstance, ContainerResult, Array[Boltlib::PlanResult], Hash[String, Boltlib::PlanResult]]","attributes":[],"is_type_alias":true},{"key":"Boltlib::TargetSpec","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"A TargetSpec represents any String, Target or combination thereof that can be\npassed to get_targets() to return an Array[Target]. Generally, users\nshouldn't need to worry about the distinction between TargetSpec and\nTarget/Array[Target], since the run_* functions will all handle them both\nautomatically. But for use cases that need to deal with the exact list of\nTargets that will be used, get_targets() will return that.","alias_of":"Variant[String[1], Target, Array[Boltlib::TargetSpec]]","attributes":[],"is_type_alias":true}],"functions":[{"key":"resolve_references","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Evaluates all `_plugin` references in a hash and returns the resolved reference data.","function_version":4,"signatures":[{"key":"resolve_references(Data $references)","doc":"Evaluates all `_plugin` references in a hash and returns the resolved reference data.","return_types":["Data"],"parameters":[{"name":"references","doc":"A hash of reference data to resolve.","types":["Data"],"signature_key_offset":24,"signature_key_length":11}]}]},{"key":"puppetdb_query","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Makes a query to [puppetdb](https://puppet.com/docs/puppetdb/latest/index.html)\nusing Bolt's PuppetDB client.","function_version":4,"signatures":[{"key":"puppetdb_query(Variant[String, Array[Data]] $query)","doc":"Makes a query to [puppetdb](https://puppet.com/docs/puppetdb/latest/index.html)\nusing Bolt's PuppetDB client.","return_types":["Array[Data]"],"parameters":[{"name":"query","doc":"A PQL query.\nLearn more about [Puppet's query language](https://puppet.com/docs/puppetdb/latest/api/query/tutorial-pql.html), PQL.","types":["Variant[String, Array[Data]]"],"signature_key_offset":44,"signature_key_length":6}]}]},{"key":"upload_file","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Uploads the given file or directory to the given set of targets and returns the result from each upload.\nThis function does nothing if the list of targets is empty.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"upload_file(String[1] $source, String[1] $destination, Boltlib::TargetSpec $targets, Optional[Hash[String[1], Any]] $options)","doc":"Upload a file or directory.","return_types":["ResultSet"],"parameters":[{"name":"source","doc":"A source path, either an absolute path or a modulename/filename selector for a\nfile or directory in $MODULEROOT/files.","types":["String[1]"],"signature_key_offset":22,"signature_key_length":7},{"name":"destination","doc":"An absolute path on the target(s).","types":["String[1]"],"signature_key_offset":41,"signature_key_length":12},{"name":"targets","doc":"A pattern identifying zero or more targets. See {get_targets} for accepted patterns.","types":["Boltlib::TargetSpec"],"signature_key_offset":75,"signature_key_length":8},{"name":"options","doc":"A hash of additional options.","types":["Optional[Hash[String[1], Any]]"],"signature_key_offset":116,"signature_key_length":8}]},{"key":"upload_file(String[1] $source, String[1] $destination, Boltlib::TargetSpec $targets, String $description, Optional[Hash[String[1], Any]] $options)","doc":"Upload a file or directory, logging the provided description.","return_types":["ResultSet"],"parameters":[{"name":"source","doc":"A source path, either an absolute path or a modulename/filename selector for a\nfile or directory in $MODULEROOT/files.","types":["String[1]"],"signature_key_offset":22,"signature_key_length":7},{"name":"destination","doc":"An absolute path on the target(s).","types":["String[1]"],"signature_key_offset":41,"signature_key_length":12},{"name":"targets","doc":"A pattern identifying zero or more targets. See {get_targets} for accepted patterns.","types":["Boltlib::TargetSpec"],"signature_key_offset":75,"signature_key_length":8},{"name":"description","doc":"A description to be output when calling this function.","types":["String"],"signature_key_offset":92,"signature_key_length":12},{"name":"options","doc":"A hash of additional options.","types":["Optional[Hash[String[1], Any]]"],"signature_key_offset":137,"signature_key_length":8}]}]},{"key":"puppetdb_fact","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Collects facts based on a list of certnames.\n\nIf a node is not found in PuppetDB, it's included in the returned hash with an empty facts hash.\nOtherwise, the node is included in the hash with a value that is a hash of its facts.","function_version":4,"signatures":[{"key":"puppetdb_fact(Array[String] $certnames)","doc":"Collects facts based on a list of certnames.\n\nIf a node is not found in PuppetDB, it's included in the returned hash with an empty facts hash.\nOtherwise, the node is included in the hash with a value that is a hash of its facts.","return_types":["Hash[String, Data]"],"parameters":[{"name":"certnames","doc":"Array of certnames.","types":["Array[String]"],"signature_key_offset":28,"signature_key_length":10}]}]},{"key":"get_targets","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Parses common ways of referring to targets and returns an array of Targets.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"get_targets(Boltlib::TargetSpec $names)","doc":"Parses common ways of referring to targets and returns an array of Targets.\n\n> **Note:** Not available in apply block","return_types":["Array[Target]"],"parameters":[{"name":"names","doc":"A pattern or array of patterns identifying a set of targets.","types":["Boltlib::TargetSpec"],"signature_key_offset":32,"signature_key_length":6}]}]},{"key":"run_task","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Runs a given instance of a `Task` on the given set of targets and returns the result from each.\nThis function does nothing if the list of targets is empty.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"run_task(String[1] $task_name, Boltlib::TargetSpec $targets, Optional[Hash[String[1], Any]] $args)","doc":"Run a task.","return_types":["ResultSet"],"parameters":[{"name":"task_name","doc":"The task to run.","types":["String[1]"],"signature_key_offset":19,"signature_key_length":10},{"name":"targets","doc":"A pattern identifying zero or more targets. See {get_targets} for accepted patterns.","types":["Boltlib::TargetSpec"],"signature_key_offset":51,"signature_key_length":8},{"name":"args","doc":"A hash of arguments to the task. Can also include additional options.","types":["Optional[Hash[String[1], Any]]"],"signature_key_offset":92,"signature_key_length":5}]},{"key":"run_task(String[1] $task_name, Boltlib::TargetSpec $targets, Optional[String] $description, Optional[Hash[String[1], Any]] $args)","doc":"Run a task, logging the provided description.","return_types":["ResultSet"],"parameters":[{"name":"task_name","doc":"The task to run.","types":["String[1]"],"signature_key_offset":19,"signature_key_length":10},{"name":"targets","doc":"A pattern identifying zero or more targets. See {get_targets} for accepted patterns.","types":["Boltlib::TargetSpec"],"signature_key_offset":51,"signature_key_length":8},{"name":"description","doc":"A description to be output when calling this function.","types":["Optional[String]"],"signature_key_offset":78,"signature_key_length":12},{"name":"args","doc":"A hash of arguments to the task. Can also include additional options.","types":["Optional[Hash[String[1], Any]]"],"signature_key_offset":123,"signature_key_length":5}]}]},{"key":"get_target","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Get a single target from inventory if it exists, otherwise create a new Target.\n\n> **Note:** Calling `get_target('all')` returns an empty array.","function_version":4,"signatures":[{"key":"get_target(Boltlib::TargetSpec $name)","doc":"Get a single target from inventory if it exists, otherwise create a new Target.\n\n> **Note:** Calling `get_target('all')` returns an empty array.","return_types":["Target"],"parameters":[{"name":"name","doc":"A Target name.","types":["Boltlib::TargetSpec"],"signature_key_offset":31,"signature_key_length":5}]}]},{"key":"run_container","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Run a container and return its output to stdout and stderr.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"run_container(String[1] $image, Optional[Hash[String[1], Any]] $options)","doc":"Run a container and return its output to stdout and stderr.\n\n> **Note:** Not available in apply block","return_types":["ContainerResult"],"parameters":[{"name":"image","doc":"The name of the image to run.","types":["String[1]"],"signature_key_offset":24,"signature_key_length":6},{"name":"options","doc":"A hash of additional options.","types":["Optional[Hash[String[1], Any]]"],"signature_key_offset":63,"signature_key_length":8}]}]},{"key":"run_plan","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Runs the `plan` referenced by its name. A plan is autoloaded from `$MODULEROOT/plans`.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"run_plan(String $plan_name, Optional[Hash] $args)","doc":"Run a plan","return_types":["Boltlib::PlanResult"],"parameters":[{"name":"plan_name","doc":"The plan to run.","types":["String"],"signature_key_offset":16,"signature_key_length":10},{"name":"args","doc":"A hash of arguments to the plan. Can also include additional options.","types":["Optional[Hash]"],"signature_key_offset":43,"signature_key_length":5}]},{"key":"run_plan(String $plan_name, Boltlib::TargetSpec $targets, Optional[Hash] $args)","doc":"Run a plan, specifying `$nodes` or `$targets` as a positional argument.\n\n> **Note:** When running a plan with both a `$nodes` and `$targets` parameter, and using the second\npositional argument, the plan will fail.","return_types":["Boltlib::PlanResult"],"parameters":[{"name":"plan_name","doc":"The plan to run.","types":["String"],"signature_key_offset":16,"signature_key_length":10},{"name":"targets","doc":"A pattern identifying zero or more targets. See {get_targets} for accepted patterns.","types":["Boltlib::TargetSpec"],"signature_key_offset":48,"signature_key_length":8},{"name":"args","doc":"A hash of arguments to the plan. Can also include additional options.","types":["Optional[Hash]"],"signature_key_offset":73,"signature_key_length":5}]}]},{"key":"without_default_logging","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Define a block where default logging is suppressed.\n\nMessages for actions within this block will be logged at `info` level instead\nof `notice`, so they will not be seen normally but will still be present\nwhen `verbose` logging is requested.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"without_default_logging(Callable[0, 0] &$block)","doc":"Define a block where default logging is suppressed.\n\nMessages for actions within this block will be logged at `info` level instead\nof `notice`, so they will not be seen normally but will still be present\nwhen `verbose` logging is requested.\n\n> **Note:** Not available in apply block","return_types":["Undef"],"parameters":[{"name":"&block","doc":"The block where action logging is suppressed.","types":["Callable[0, 0]"],"signature_key_offset":39,"signature_key_length":7}]}]},{"key":"facts","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Returns the facts hash for a target.\n\nUsing the `facts` function does not automatically collect facts for a target,\nand will only return facts that are currently set in the inventory. To collect\nfacts from a target and set them in the inventory, run the\n[facts](writing_plans.md#collect-facts-from-targets) plan or\n[puppetdb_fact](writing_plans.md#collect-facts-from-puppetdb) plan.","function_version":4,"signatures":[{"key":"facts(Target $target)","doc":"Returns the facts hash for a target.\n\nUsing the `facts` function does not automatically collect facts for a target,\nand will only return facts that are currently set in the inventory. To collect\nfacts from a target and set them in the inventory, run the\n[facts](writing_plans.md#collect-facts-from-targets) plan or\n[puppetdb_fact](writing_plans.md#collect-facts-from-puppetdb) plan.","return_types":["Hash[String, Data]"],"parameters":[{"name":"target","doc":"A target.","types":["Target"],"signature_key_offset":13,"signature_key_length":7}]}]},{"key":"run_task_with","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Runs a given instance of a `Task` with target-specific parameters on the given set of targets and\nreturns the result from each. This function differs from {run_task} by accepting a block that returns\na `Hash` of target-specific parameters that are passed to the task. This can be used to send parameters\nbased on a target's attributes, such as its `facts`, or to use conditional logic to determine the\nparameters a task should receive for a specific target.\n\nThis function does nothing if the list of targets is empty.\n\n> **Note:** Not available in apply block\n\n> **Note:** Not available to targets using the pcp transport","function_version":4,"signatures":[{"key":"run_task_with(String[1] $task_name, Boltlib::TargetSpec $targets, Optional[Hash[String[1], Any]] $options, Callable[Target] &$block)","doc":"Run a task with target-specific parameters.","return_types":["ResultSet"],"parameters":[{"name":"task_name","doc":"The task to run.","types":["String[1]"],"signature_key_offset":24,"signature_key_length":10},{"name":"targets","doc":"A pattern identifying zero or more targets. See {get_targets} for accepted patterns.","types":["Boltlib::TargetSpec"],"signature_key_offset":56,"signature_key_length":8},{"name":"options","doc":"A hash of additional options.","types":["Optional[Hash[String[1], Any]]"],"signature_key_offset":97,"signature_key_length":8},{"name":"&block","doc":"A block that returns a `Hash` of target-specific parameters for the task.","types":["Callable[Target]"],"signature_key_offset":124,"signature_key_length":7}]},{"key":"run_task_with(String[1] $task_name, Boltlib::TargetSpec $targets, Optional[String] $description, Optional[Hash[String[1], Any]] $options, Callable[Target] &$block)","doc":"Run a task with target-specific parameters, logging the provided description.","return_types":["ResultSet"],"parameters":[{"name":"task_name","doc":"The task to run.","types":["String[1]"],"signature_key_offset":24,"signature_key_length":10},{"name":"targets","doc":"A pattern identifying zero or more targets. See {get_targets} for accepted patterns.","types":["Boltlib::TargetSpec"],"signature_key_offset":56,"signature_key_length":8},{"name":"description","doc":"A description to be output when calling this function.","types":["Optional[String]"],"signature_key_offset":83,"signature_key_length":12},{"name":"options","doc":"A hash of additional options.","types":["Optional[Hash[String[1], Any]]"],"signature_key_offset":128,"signature_key_length":8},{"name":"&block","doc":"A block that returns a `Hash` of target-specific parameters for the task.","types":["Callable[Target]"],"signature_key_offset":155,"signature_key_length":7}]}]},{"key":"download_file","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Downloads the given file or directory from the given set of targets and saves it to a directory\nmatching the target's name under the given destination directory. Returns the result from each\ndownload. This does nothing if the list of targets is empty.\n\n> **Note:** Existing content in the destination directory is deleted before downloading from\n> the targets.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"download_file(String[1] $source, String[1] $destination, Boltlib::TargetSpec $targets, Optional[Hash[String[1], Any]] $options)","doc":"Download a file or directory.","return_types":["ResultSet"],"parameters":[{"name":"source","doc":"The absolute path to the file or directory on the target(s).","types":["String[1]"],"signature_key_offset":24,"signature_key_length":7},{"name":"destination","doc":"The relative path to the destination directory on the local system. Expands\nrelative to `/downloads/`.","types":["String[1]"],"signature_key_offset":43,"signature_key_length":12},{"name":"targets","doc":"A pattern identifying zero or more targets. See {get_targets} for accepted patterns.","types":["Boltlib::TargetSpec"],"signature_key_offset":77,"signature_key_length":8},{"name":"options","doc":"A hash of additional options.","types":["Optional[Hash[String[1], Any]]"],"signature_key_offset":118,"signature_key_length":8}]},{"key":"download_file(String[1] $source, String[1] $destination, Boltlib::TargetSpec $targets, String $description, Optional[Hash[String[1], Any]] $options)","doc":"Download a file or directory, logging the provided description.","return_types":["ResultSet"],"parameters":[{"name":"source","doc":"The absolute path to the file or directory on the target(s).","types":["String[1]"],"signature_key_offset":24,"signature_key_length":7},{"name":"destination","doc":"The relative path to the destination directory on the local system. Expands\nrelative to `/downloads/`.","types":["String[1]"],"signature_key_offset":43,"signature_key_length":12},{"name":"targets","doc":"A pattern identifying zero or more targets. See {get_targets} for accepted patterns.","types":["Boltlib::TargetSpec"],"signature_key_offset":77,"signature_key_length":8},{"name":"description","doc":"A description to be output when calling this function.","types":["String"],"signature_key_offset":94,"signature_key_length":12},{"name":"options","doc":"A hash of additional options.","types":["Optional[Hash[String[1], Any]]"],"signature_key_offset":139,"signature_key_length":8}]}]},{"key":"wait_until_available","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Wait until all targets accept connections. This function allows a plan execution to wait for a customizable\namount of time via the `wait_time` option until a target connection can be reestablished. The plan proceeds\nto the next step if the connection fails to reconnect in the time specified (default: 120 seconds). A typical\nuse case for this function is if your plan reboots a remote host and the plan needs to wait for the host to reconnect\nbefore it continues to the next step.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"wait_until_available(Boltlib::TargetSpec $targets, Optional[Hash[String[1], Any]] $options)","doc":"Wait until all targets accept connections. This function allows a plan execution to wait for a customizable\namount of time via the `wait_time` option until a target connection can be reestablished. The plan proceeds\nto the next step if the connection fails to reconnect in the time specified (default: 120 seconds). A typical\nuse case for this function is if your plan reboots a remote host and the plan needs to wait for the host to reconnect\nbefore it continues to the next step.\n\n> **Note:** Not available in apply block","return_types":["ResultSet"],"parameters":[{"name":"targets","doc":"A pattern identifying zero or more targets. See {get_targets} for accepted patterns.","types":["Boltlib::TargetSpec"],"signature_key_offset":41,"signature_key_length":8},{"name":"options","doc":"A hash of additional options.","types":["Optional[Hash[String[1], Any]]"],"signature_key_offset":82,"signature_key_length":8}]}]},{"key":"resource","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Lookup a resource in the target's data.\n\nFor more information about resources see [the\ndocumentation](https://puppet.com/docs/puppet/latest/lang_resources.html).\n\n> **Note:** The `ResourceInstance` data type is under active development and is subject to\n change. You can read more about the data type in the [experimental features\n documentation](experimental_features.md#resourceinstance-data-type).","function_version":4,"signatures":[{"key":"resource(Target $target, Type[Resource] $type, String[1] $title)","doc":"Lookup a resource in the target's data.","return_types":["Optional[ResourceInstance]"],"parameters":[{"name":"target","doc":"The Target object to add resources to. See {get_targets}.","types":["Target"],"signature_key_offset":16,"signature_key_length":7},{"name":"type","doc":"The type of the resource","types":["Type[Resource]"],"signature_key_offset":40,"signature_key_length":5},{"name":"title","doc":"The title of the resource","types":["String[1]"],"signature_key_offset":57,"signature_key_length":6}]},{"key":"resource(Target $target, String[1] $type, String[1] $title)","doc":"Lookup a resource in the target's data, referring to resource as a string","return_types":["Optional[ResourceInstance]"],"parameters":[{"name":"target","doc":"The Target object to add resources to. See {get_targets}.","types":["Target"],"signature_key_offset":16,"signature_key_length":7},{"name":"type","doc":"The type of the resource","types":["String[1]"],"signature_key_offset":35,"signature_key_length":5},{"name":"title","doc":"The title of the resource","types":["String[1]"],"signature_key_offset":52,"signature_key_length":6}]}]},{"key":"set_resources","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Sets one or more ResourceInstances on a Target. This function does not apply or modify\nresources on a target.\n\nFor more information about resources see [the\ndocumentation](https://puppet.com/docs/puppet/latest/lang_resources.html).\n\n> **Note:** The `ResourceInstance` data type is under active development and is subject to\n change. You can read more about the data type in the [experimental features\n documentation](experimental_features.md#resourceinstance-data-type).\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"set_resources(Target $target, Hash $resource)","doc":"Set a single resource from a data hash.","return_types":["Array[ResourceInstance]"],"parameters":[{"name":"target","doc":"The `Target` object to add a resource to. See {get_targets}.","types":["Target"],"signature_key_offset":21,"signature_key_length":7},{"name":"resource","doc":"The resource data hash used to set a resource on the target.","types":["Hash"],"signature_key_offset":35,"signature_key_length":9}]},{"key":"set_resources(Target $target, ResourceInstance $resource)","doc":"Set a single resource from a `ResourceInstance` object","return_types":["Array[ResourceInstance]"],"parameters":[{"name":"target","doc":"The `Target` object to add a resource to. See {get_targets}.","types":["Target"],"signature_key_offset":21,"signature_key_length":7},{"name":"resource","doc":"The `ResourceInstance` object to set on the target.","types":["ResourceInstance"],"signature_key_offset":47,"signature_key_length":9}]},{"key":"set_resources(Target $target, Array[Variant[Hash, ResourceInstance]] $resources)","doc":"Set multiple resources from an array of data hashes and `ResourceInstance` objects.","return_types":["Array[ResourceInstance]"],"parameters":[{"name":"target","doc":"The `Target` object to add resources to. See {get_targets}.","types":["Target"],"signature_key_offset":21,"signature_key_length":7},{"name":"resources","doc":"The resource data hashes and `ResourceInstance` objects to set on the target.","types":["Array[Variant[Hash, ResourceInstance]]"],"signature_key_offset":69,"signature_key_length":10}]}]},{"key":"catch_errors","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Catches errors in a given block and returns them. This will return the\noutput of the block if no errors are raised. Accepts an optional list of\nerror kinds to catch.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"catch_errors(Optional[Array[String[1]]] $error_types, Callable[0, 0] &$block)","doc":"Catches errors in a given block and returns them. This will return the\noutput of the block if no errors are raised. Accepts an optional list of\nerror kinds to catch.\n\n> **Note:** Not available in apply block","return_types":["Any"],"parameters":[{"name":"error_types","doc":"An array of error types to catch","types":["Optional[Array[String[1]]]"],"signature_key_offset":40,"signature_key_length":12},{"name":"&block","doc":"The block of steps to catch errors on","types":["Callable[0, 0]"],"signature_key_offset":69,"signature_key_length":7}]}]},{"key":"write_file","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Write contents to a file on the given set of targets.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"write_file(String $content, String[1] $destination, Boltlib::TargetSpec $targets, Optional[Hash[String[1], Any]] $options)","doc":"Write contents to a file on the given set of targets.\n\n> **Note:** Not available in apply block","return_types":["ResultSet"],"parameters":[{"name":"content","doc":"File content to write.","types":["String"],"signature_key_offset":18,"signature_key_length":8},{"name":"destination","doc":"An absolute path on the target(s).","types":["String[1]"],"signature_key_offset":38,"signature_key_length":12},{"name":"targets","doc":"A pattern identifying zero or more targets. See {get_targets} for accepted patterns.","types":["Boltlib::TargetSpec"],"signature_key_offset":72,"signature_key_length":8},{"name":"options","doc":"A hash of additional options.","types":["Optional[Hash[String[1], Any]]"],"signature_key_offset":113,"signature_key_length":8}]}]},{"key":"set_var","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Sets a variable `{ key => value }` for a target.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"set_var(Target $target, String $key, Data $value)","doc":"Sets a variable `{ key => value }` for a target.\n\n> **Note:** Not available in apply block","return_types":["Target"],"parameters":[{"name":"target","doc":"The Target object to set the variable for. See {get_targets}.","types":["Target"],"signature_key_offset":15,"signature_key_length":7},{"name":"key","doc":"The key for the variable.","types":["String"],"signature_key_offset":31,"signature_key_length":4},{"name":"value","doc":"The value of the variable.","types":["Data"],"signature_key_offset":42,"signature_key_length":6}]}]},{"key":"vars","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Returns a hash of the 'vars' (variables) assigned to a target.\n\nVars can be assigned through the inventory file or `set_var` function.\nPlan authors can call this function on a target to get the variable hash\nfor that target.","function_version":4,"signatures":[{"key":"vars(Target $target)","doc":"Returns a hash of the 'vars' (variables) assigned to a target.\n\nVars can be assigned through the inventory file or `set_var` function.\nPlan authors can call this function on a target to get the variable hash\nfor that target.","return_types":["Hash[String, Data]"],"parameters":[{"name":"target","doc":"The Target object to get variables from. See {get_targets}.","types":["Target"],"signature_key_offset":12,"signature_key_length":7}]}]},{"key":"set_config","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Set configuration options on a target.\n\n> **Note:** Not available in apply block\n\n> **Note:** Only compatible with inventory v2","function_version":4,"signatures":[{"key":"set_config(Target $target, Variant[String, Array[String]] $key_or_key_path, Any $value)","doc":"Set configuration options on a target.\n\n> **Note:** Not available in apply block\n\n> **Note:** Only compatible with inventory v2","return_types":["Target"],"parameters":[{"name":"target","doc":"The Target object to configure. See {get_targets}.","types":["Target"],"signature_key_offset":18,"signature_key_length":7},{"name":"key_or_key_path","doc":"The configuration setting to update.","types":["Variant[String, Array[String]]"],"signature_key_offset":58,"signature_key_length":16},{"name":"value","doc":"The configuration value","types":["Any"],"signature_key_offset":80,"signature_key_length":6}]}]},{"key":"add_to_group","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Adds a target to specified inventory group.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"add_to_group(Boltlib::TargetSpec $targets, String[1] $group)","doc":"Adds a target to specified inventory group.\n\n> **Note:** Not available in apply block","return_types":["Array[Target]"],"parameters":[{"name":"targets","doc":"A pattern or array of patterns identifying a set of targets.","types":["Boltlib::TargetSpec"],"signature_key_offset":33,"signature_key_length":8},{"name":"group","doc":"The name of the group to add targets to.","types":["String[1]"],"signature_key_offset":53,"signature_key_length":6}]}]},{"key":"run_command","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Runs a command on the given set of targets and returns the result from each command execution.\nThis function does nothing if the list of targets is empty.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"run_command(String[1] $command, Boltlib::TargetSpec $targets, Optional[Hash[String[1], Any]] $options)","doc":"Run a command.","return_types":["ResultSet"],"parameters":[{"name":"command","doc":"A command to run on target.","types":["String[1]"],"signature_key_offset":22,"signature_key_length":8},{"name":"targets","doc":"A pattern identifying zero or more targets. See {get_targets} for accepted patterns.","types":["Boltlib::TargetSpec"],"signature_key_offset":52,"signature_key_length":8},{"name":"options","doc":"A hash of additional options.","types":["Optional[Hash[String[1], Any]]"],"signature_key_offset":93,"signature_key_length":8}]},{"key":"run_command(String[1] $command, Boltlib::TargetSpec $targets, String $description, Optional[Hash[String[1], Any]] $options)","doc":"Run a command, logging the provided description.","return_types":["ResultSet"],"parameters":[{"name":"command","doc":"A command to run on target.","types":["String[1]"],"signature_key_offset":22,"signature_key_length":8},{"name":"targets","doc":"A pattern identifying zero or more targets. See {get_targets} for accepted patterns.","types":["Boltlib::TargetSpec"],"signature_key_offset":52,"signature_key_length":8},{"name":"description","doc":"A description to be output when calling this function.","types":["String"],"signature_key_offset":69,"signature_key_length":12},{"name":"options","doc":"A hash of additional options.","types":["Optional[Hash[String[1], Any]]"],"signature_key_offset":114,"signature_key_length":8}]}]},{"key":"add_facts","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Deep merges a hash of facts with the existing facts on a target.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"add_facts(Target $target, Hash $facts)","doc":"Deep merges a hash of facts with the existing facts on a target.\n\n> **Note:** Not available in apply block","return_types":["Target"],"parameters":[{"name":"target","doc":"A target.","types":["Target"],"signature_key_offset":17,"signature_key_length":7},{"name":"facts","doc":"A hash of fact names to values that can include structured facts.","types":["Hash"],"signature_key_offset":31,"signature_key_length":6}]}]},{"key":"puppetdb_command","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Send a command with a payload to PuppetDB.\n\nThe `pdb_command` function only supports version 5 of the `replace_facts`\ncommand. Other commands might also work, but are not tested or supported\nby Bolt.\n\nSee the [commands endpoint](https://puppet.com/docs/puppetdb/latest/api/command/v1/commands.html)\ndocumentation for more information about available commands and payload\nformat.\n\n_This function is experimental and subject to change._\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"puppetdb_command(String[1] $command, Integer $version, Hash[Data, Data] $payload)","doc":"Send a command with a payload to PuppetDB.\n\nThe `pdb_command` function only supports version 5 of the `replace_facts`\ncommand. Other commands might also work, but are not tested or supported\nby Bolt.\n\nSee the [commands endpoint](https://puppet.com/docs/puppetdb/latest/api/command/v1/commands.html)\ndocumentation for more information about available commands and payload\nformat.\n\n_This function is experimental and subject to change._\n\n> **Note:** Not available in apply block","return_types":["String"],"parameters":[{"name":"command","doc":"The command to invoke.","types":["String[1]"],"signature_key_offset":27,"signature_key_length":8},{"name":"version","doc":"The version of the command to invoke.","types":["Integer"],"signature_key_offset":45,"signature_key_length":8},{"name":"payload","doc":"The payload to the command.","types":["Hash[Data, Data]"],"signature_key_offset":72,"signature_key_length":8}]}]},{"key":"set_feature","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Sets a particular feature to present on a target.\n\nFeatures are used to determine what implementation of a task should be run.\nSupported features are:\n- `powershell`\n- `shell`\n- `puppet-agent`\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"set_feature(Target $target, String $feature, Optional[Boolean] $value)","doc":"Sets a particular feature to present on a target.\n\nFeatures are used to determine what implementation of a task should be run.\nSupported features are:\n- `powershell`\n- `shell`\n- `puppet-agent`\n\n> **Note:** Not available in apply block","return_types":["Target"],"parameters":[{"name":"target","doc":"The Target object to add features to. See {get_targets}.","types":["Target"],"signature_key_offset":19,"signature_key_length":7},{"name":"feature","doc":"The string identifying the feature.","types":["String"],"signature_key_offset":35,"signature_key_length":8},{"name":"value","doc":"Whether the feature is supported.","types":["Optional[Boolean]"],"signature_key_offset":63,"signature_key_length":6}]}]},{"key":"get_resources","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Query the state of resources on a list of targets using resource definitions in Bolt's module path.\nThe results are returned as a list of hashes representing each resource.\n\nRequires the Puppet Agent be installed on the target, which can be accomplished with apply_prep\nor by directly running the `puppet_agent::install` task. In order to be able to reference types without\nstring quoting (for example `get_resources($target, Package)` instead of `get_resources($target, 'Package')`),\nrun the command `bolt puppetfile generate-types` to generate type references in `$Boldir/.resource_types`.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"get_resources(Boltlib::TargetSpec $targets, Variant[String, Type[Resource], Array[Variant[String, Type[Resource]]]] $resources)","doc":"Query the state of resources on a list of targets using resource definitions in Bolt's module path.\nThe results are returned as a list of hashes representing each resource.\n\nRequires the Puppet Agent be installed on the target, which can be accomplished with apply_prep\nor by directly running the `puppet_agent::install` task. In order to be able to reference types without\nstring quoting (for example `get_resources($target, Package)` instead of `get_resources($target, 'Package')`),\nrun the command `bolt puppetfile generate-types` to generate type references in `$Boldir/.resource_types`.\n\n> **Note:** Not available in apply block","return_types":["ResultSet"],"parameters":[{"name":"targets","doc":"A pattern or array of patterns identifying a set of targets.","types":["Boltlib::TargetSpec"],"signature_key_offset":34,"signature_key_length":8},{"name":"resources","doc":"A resource type or instance, or an array of such.","types":["Variant[String, Type[Resource], Array[Variant[String, Type[Resource]]]]"],"signature_key_offset":116,"signature_key_length":10}]}]},{"key":"parallelize","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Map a code block onto an array, where each array element executes in parallel.\nThis function is experimental.\n\n> **Note:** Not available in apply block.","function_version":4,"signatures":[{"key":"parallelize(Array[Any] $data, Callable[Any] &$block)","doc":"Map a code block onto an array, where each array element executes in parallel.\nThis function is experimental.\n\n> **Note:** Not available in apply block.","return_types":["Array[Boltlib::PlanResult]"],"parameters":[{"name":"data","doc":"The array to apply the block to.","types":["Array[Any]"],"signature_key_offset":23,"signature_key_length":5},{"name":"&block","doc":"The code block to execute for each array element.","types":["Callable[Any]"],"signature_key_offset":44,"signature_key_length":7}]}]},{"key":"remove_from_group","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Removes a target from the specified inventory group.\n\nThe target is removed from all child groups and all parent groups where the target has\nnot been explicitly defined. A target cannot be removed from the `all` group.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"remove_from_group(Boltlib::TargetSpec $target, String[1] $group)","doc":"Removes a target from the specified inventory group.\n\nThe target is removed from all child groups and all parent groups where the target has\nnot been explicitly defined. A target cannot be removed from the `all` group.\n\n> **Note:** Not available in apply block","return_types":["nil"],"parameters":[{"name":"target","doc":"A pattern identifying a single target.","types":["Boltlib::TargetSpec"],"signature_key_offset":38,"signature_key_length":7},{"name":"group","doc":"The name of the group to remove the target from.","types":["String[1]"],"signature_key_offset":57,"signature_key_length":6}]}]},{"key":"fail_plan","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Raises a `Bolt::PlanFailure` exception to signal to callers that the plan failed.\n\nPlan authors should call this function when their plan is not successful. The\nerror may then be caught by another plans `run_plan` function or in Bolt itself\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"fail_plan(String[1] $msg, Optional[String[1]] $kind, Optional[Hash[String[1], Any]] $details, Optional[String[1]] $issue_code)","doc":"Fail a plan, generating an exception from the parameters.","return_types":["Any"],"parameters":[{"name":"msg","doc":"An error message.","types":["String[1]"],"signature_key_offset":20,"signature_key_length":4},{"name":"kind","doc":"An easily matchable error kind.","types":["Optional[String[1]]"],"signature_key_offset":46,"signature_key_length":5},{"name":"details","doc":"Machine-parseable details about the error.","types":["Optional[Hash[String[1], Any]]"],"signature_key_offset":84,"signature_key_length":8},{"name":"issue_code","doc":"Unused.","types":["Optional[String[1]]"],"signature_key_offset":114,"signature_key_length":11}]},{"key":"fail_plan(Error $error)","doc":"Fail a plan, generating an exception from an existing Error object.","return_types":["Any"],"parameters":[{"name":"error","doc":"An error object.","types":["Error"],"signature_key_offset":16,"signature_key_length":6}]}]},{"key":"run_script","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Uploads the given script to the given set of targets and returns the result of having each target execute the script.\nThis function does nothing if the list of targets is empty.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"run_script(String[1] $script, Boltlib::TargetSpec $targets, Optional[Hash[String[1], Any]] $options)","doc":"Run a script.","return_types":["ResultSet"],"parameters":[{"name":"script","doc":"Path to a script to run on target. Can be an absolute path or a modulename/filename selector for a\nfile in $MODULEROOT/files.","types":["String[1]"],"signature_key_offset":21,"signature_key_length":7},{"name":"targets","doc":"A pattern identifying zero or more targets. See {get_targets} for accepted patterns.","types":["Boltlib::TargetSpec"],"signature_key_offset":50,"signature_key_length":8},{"name":"options","doc":"A hash of additional options.","types":["Optional[Hash[String[1], Any]]"],"signature_key_offset":91,"signature_key_length":8}]},{"key":"run_script(String[1] $script, Boltlib::TargetSpec $targets, String $description, Optional[Hash[String[1], Any]] $options)","doc":"Run a script, logging the provided description.","return_types":["ResultSet"],"parameters":[{"name":"script","doc":"Path to a script to run on target. Can be an absolute path or a modulename/filename selector for a\nfile in $MODULEROOT/files.","types":["String[1]"],"signature_key_offset":21,"signature_key_length":7},{"name":"targets","doc":"A pattern identifying zero or more targets. See {get_targets} for accepted patterns.","types":["Boltlib::TargetSpec"],"signature_key_offset":50,"signature_key_length":8},{"name":"description","doc":"A description to be output when calling this function.","types":["String"],"signature_key_offset":67,"signature_key_length":12},{"name":"options","doc":"A hash of additional options.","types":["Optional[Hash[String[1], Any]]"],"signature_key_offset":112,"signature_key_length":8}]}]},{"key":"apply_prep","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Installs the `puppet-agent` package on targets if needed, then collects facts,\nincluding any custom facts found in Bolt's module path. The package is\ninstalled using either the configured plugin or the `task` plugin with the\n`puppet_agent::install` task.\n\nAgent installation will be skipped if the target includes the `puppet-agent` feature, either as a\nproperty of its transport (PCP) or by explicitly setting it as a feature in Bolt's inventory.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"apply_prep(Boltlib::TargetSpec $targets, Optional[Hash[String, Data]] $options)","doc":"Installs the `puppet-agent` package on targets if needed, then collects facts,\nincluding any custom facts found in Bolt's module path. The package is\ninstalled using either the configured plugin or the `task` plugin with the\n`puppet_agent::install` task.\n\nAgent installation will be skipped if the target includes the `puppet-agent` feature, either as a\nproperty of its transport (PCP) or by explicitly setting it as a feature in Bolt's inventory.\n\n> **Note:** Not available in apply block","return_types":["nil"],"parameters":[{"name":"targets","doc":"A pattern or array of patterns identifying a set of targets.","types":["Boltlib::TargetSpec"],"signature_key_offset":31,"signature_key_length":8},{"name":"options","doc":"Options hash.","types":["Optional[Hash[String, Data]]"],"signature_key_offset":70,"signature_key_length":8}]}]}]} \ No newline at end of file diff --git a/lib/puppet-languageserver/static_data/bolt-ctrl.json b/lib/puppet-languageserver/static_data/bolt-ctrl.json index 2d571975..21e36f9d 100644 --- a/lib/puppet-languageserver/static_data/bolt-ctrl.json +++ b/lib/puppet-languageserver/static_data/bolt-ctrl.json @@ -1 +1 @@ -{"functions":[{"key":"ctrl::sleep","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Sleeps for specified number of seconds.","function_version":4,"signatures":[{"key":"ctrl::sleep(Numeric $period)","doc":"Sleeps for specified number of seconds.","return_types":["Undef"],"parameters":[{"name":"period","doc":"Time to sleep (in seconds)","types":["Numeric"],"signature_key_offset":20,"signature_key_length":7}]}]},{"key":"ctrl::do_until","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Repeat the block until it returns a truthy value. Returns the value.","function_version":4,"signatures":[{"key":"ctrl::do_until(Optional[Hash[String[1], Any]] $options, Callable &$block)","doc":"Repeat the block until it returns a truthy value. Returns the value.","return_types":["Any"],"parameters":[{"name":"options","doc":"A hash of additional options.","types":["Optional[Hash[String[1], Any]]"],"signature_key_offset":46,"signature_key_length":8},{"name":"&block","doc":"","types":["Callable"],"signature_key_offset":65,"signature_key_length":7}]}]}]} \ No newline at end of file +{"functions":[{"key":"ctrl::sleep","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Sleeps for specified number of seconds.","function_version":4,"signatures":[{"key":"ctrl::sleep(Numeric $period)","doc":"Sleeps for specified number of seconds.","return_types":["Undef"],"parameters":[{"name":"period","doc":"Time to sleep (in seconds)","types":["Numeric"],"signature_key_offset":20,"signature_key_length":7}]}]},{"key":"ctrl::do_until","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Repeat the block until it returns a truthy value. Returns the value.","function_version":4,"signatures":[{"key":"ctrl::do_until(Optional[Hash[String[1], Any]] $options, Callable &$block)","doc":"Repeat the block until it returns a truthy value. Returns the value.","return_types":["nil"],"parameters":[{"name":"options","doc":"A hash of additional options.","types":["Optional[Hash[String[1], Any]]"],"signature_key_offset":46,"signature_key_length":8},{"name":"&block","doc":"The code block to repeat.","types":["Callable"],"signature_key_offset":65,"signature_key_length":7}]}]}]} \ No newline at end of file diff --git a/lib/puppet-languageserver/static_data/bolt-file.json b/lib/puppet-languageserver/static_data/bolt-file.json index fa4e832c..bc715732 100644 --- a/lib/puppet-languageserver/static_data/bolt-file.json +++ b/lib/puppet-languageserver/static_data/bolt-file.json @@ -1 +1 @@ -{"functions":[{"key":"file::read","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Read a file on localhost and return its contents using ruby's `File.read`. This will\nonly read files on the machine you run Bolt on.","function_version":4,"signatures":[{"key":"file::read(String $filename)","doc":"Read a file on localhost and return its contents using ruby's `File.read`. This will\nonly read files on the machine you run Bolt on.","return_types":["String"],"parameters":[{"name":"filename","doc":"Absolute path or Puppet file path.","types":["String"],"signature_key_offset":18,"signature_key_length":9}]}]},{"key":"file::readable","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Check if a local file is readable using Puppet's\n`Puppet::Parser::Files.find_file()` function. This will only check files on the\nmachine you run Bolt on.","function_version":4,"signatures":[{"key":"file::readable(String $filename)","doc":"Check if a local file is readable using Puppet's\n`Puppet::Parser::Files.find_file()` function. This will only check files on the\nmachine you run Bolt on.","return_types":["Boolean"],"parameters":[{"name":"filename","doc":"Absolute path or Puppet file path.","types":["String"],"signature_key_offset":22,"signature_key_length":9}]}]},{"key":"file::exists","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Check if a local file exists using Puppet's\n`Puppet::Parser::Files.find_file()` function. This will only check files that\nare on the machine Bolt is run on.","function_version":4,"signatures":[{"key":"file::exists(String $filename)","doc":"Check if a local file exists using Puppet's\n`Puppet::Parser::Files.find_file()` function. This will only check files that\nare on the machine Bolt is run on.","return_types":["Boolean"],"parameters":[{"name":"filename","doc":"Absolute path or Puppet file path.","types":["String"],"signature_key_offset":20,"signature_key_length":9}]}]},{"key":"file::join","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Join file paths using ruby's `File.join()` function.","function_version":4,"signatures":[{"key":"file::join(String *$paths)","doc":"Join file paths using ruby's `File.join()` function.","return_types":["String"],"parameters":[{"name":"*paths","doc":"The paths to join.","types":["String"],"signature_key_offset":18,"signature_key_length":7}]}]},{"key":"file::write","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Write a string to a file on localhost using ruby's `File.write`. This will\nonly write files to the machine you run Bolt on. Use `write_file()` to write\nto remote targets.","function_version":4,"signatures":[{"key":"file::write(String $filename, String $content)","doc":"Write a string to a file on localhost using ruby's `File.write`. This will\nonly write files to the machine you run Bolt on. Use `write_file()` to write\nto remote targets.","return_types":["Undef"],"parameters":[{"name":"filename","doc":"Absolute path.","types":["String"],"signature_key_offset":19,"signature_key_length":9},{"name":"content","doc":"File content to write.","types":["String"],"signature_key_offset":37,"signature_key_length":8}]}]}]} \ No newline at end of file +{"functions":[{"key":"file::read","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Read a file on localhost and return its contents using ruby's `File.read`. This will\nonly read files on the machine you run Bolt on.","function_version":4,"signatures":[{"key":"file::read(String[1] $filename)","doc":"Read a file on localhost and return its contents using ruby's `File.read`. This will\nonly read files on the machine you run Bolt on.","return_types":["String"],"parameters":[{"name":"filename","doc":"Absolute path or Puppet file path.","types":["String[1]"],"signature_key_offset":21,"signature_key_length":9}]}]},{"key":"file::readable","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Check if a local file is readable using Puppet's\n`Puppet::Parser::Files.find_file()` function. This will only check files on the\nmachine you run Bolt on.","function_version":4,"signatures":[{"key":"file::readable(String[1] $filename)","doc":"Check if a local file is readable using Puppet's\n`Puppet::Parser::Files.find_file()` function. This will only check files on the\nmachine you run Bolt on.","return_types":["Boolean"],"parameters":[{"name":"filename","doc":"Absolute path or Puppet file path.","types":["String[1]"],"signature_key_offset":25,"signature_key_length":9}]}]},{"key":"file::exists","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Check if a local file exists using Puppet's\n`Puppet::Parser::Files.find_file()` function. This will only check files that\nare on the machine Bolt is run on.","function_version":4,"signatures":[{"key":"file::exists(String[1] $filename)","doc":"Check if a local file exists using Puppet's\n`Puppet::Parser::Files.find_file()` function. This will only check files that\nare on the machine Bolt is run on.","return_types":["Boolean"],"parameters":[{"name":"filename","doc":"Absolute path or Puppet file path.","types":["String[1]"],"signature_key_offset":23,"signature_key_length":9}]}]},{"key":"file::join","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Join file paths using ruby's `File.join()` function.","function_version":4,"signatures":[{"key":"file::join(String *$paths)","doc":"Join file paths using ruby's `File.join()` function.","return_types":["String"],"parameters":[{"name":"*paths","doc":"The paths to join.","types":["String"],"signature_key_offset":18,"signature_key_length":7}]}]},{"key":"file::write","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Write a string to a file on localhost using ruby's `File.write`. This will\nonly write files to the machine you run Bolt on. Use `write_file()` to write\nto remote targets.","function_version":4,"signatures":[{"key":"file::write(String $filename, String $content)","doc":"Write a string to a file on localhost using ruby's `File.write`. This will\nonly write files to the machine you run Bolt on. Use `write_file()` to write\nto remote targets.","return_types":["Undef"],"parameters":[{"name":"filename","doc":"Absolute path.","types":["String"],"signature_key_offset":19,"signature_key_length":9},{"name":"content","doc":"File content to write.","types":["String"],"signature_key_offset":37,"signature_key_length":8}]}]}]} \ No newline at end of file diff --git a/lib/puppet-languageserver/static_data/bolt-prompt.json b/lib/puppet-languageserver/static_data/bolt-prompt.json index 23b4a7a3..462d54be 100644 --- a/lib/puppet-languageserver/static_data/bolt-prompt.json +++ b/lib/puppet-languageserver/static_data/bolt-prompt.json @@ -1 +1 @@ -{"functions":[{"key":"prompt","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Display a prompt and wait for a response.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"prompt(String $prompt, Optional[Hash[String[1], Any]] $options)","doc":"Display a prompt and wait for a response.\n\n> **Note:** Not available in apply block","return_types":["Variant[String, Sensitive]"],"parameters":[{"name":"prompt","doc":"The prompt to display.","types":["String"],"signature_key_offset":14,"signature_key_length":7},{"name":"options","doc":"A hash of additional options.","types":["Optional[Hash[String[1], Any]]"],"signature_key_offset":54,"signature_key_length":8}]}]}]} \ No newline at end of file +{"functions":[{"key":"prompt::menu","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Display a menu prompt and wait for a response. Continues to prompt\nuntil an option from the menu is selected.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"prompt::menu(String $prompt, Array[Variant[Target, Data]] $menu, Optional[Hash[String[1], Variant[Target, Data]]] $options)","doc":"Select from a list of options.","return_types":["Variant[Target, Data]"],"parameters":[{"name":"prompt","doc":"The prompt to display.","types":["String"],"signature_key_offset":20,"signature_key_length":7},{"name":"menu","doc":"A list of options to choose from.","types":["Array[Variant[Target, Data]]"],"signature_key_offset":58,"signature_key_length":5},{"name":"options","doc":"A hash of additional options.","types":["Optional[Hash[String[1], Variant[Target, Data]]]"],"signature_key_offset":114,"signature_key_length":8}]},{"key":"prompt::menu(String $prompt, Hash[String[1], Variant[Target, Data]] $menu, Optional[Hash[String[1], Variant[Target, Data]]] $options)","doc":"Select from a list of options with custom inputs.","return_types":["Variant[TargetSpec, Data]"],"parameters":[{"name":"prompt","doc":"The prompt to display.","types":["String"],"signature_key_offset":20,"signature_key_length":7},{"name":"menu","doc":"A hash of options to choose from, where keys are the input used to select a value.","types":["Hash[String[1], Variant[Target, Data]]"],"signature_key_offset":68,"signature_key_length":5},{"name":"options","doc":"A hash of additional options.","types":["Optional[Hash[String[1], Variant[Target, Data]]]"],"signature_key_offset":124,"signature_key_length":8}]}]},{"key":"prompt","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Display a prompt and wait for a response.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"prompt(String $prompt, Optional[Hash[String[1], Any]] $options)","doc":"Display a prompt and wait for a response.\n\n> **Note:** Not available in apply block","return_types":["Variant[String, Sensitive]"],"parameters":[{"name":"prompt","doc":"The prompt to display.","types":["String"],"signature_key_offset":14,"signature_key_length":7},{"name":"options","doc":"A hash of additional options.","types":["Optional[Hash[String[1], Any]]"],"signature_key_offset":54,"signature_key_length":8}]}]}]} \ No newline at end of file diff --git a/lib/puppet-languageserver/static_data/bolt-puppet_connect.json b/lib/puppet-languageserver/static_data/bolt-puppet_connect.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/lib/puppet-languageserver/static_data/bolt-puppet_connect.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/lib/puppet_editor_services/version.rb b/lib/puppet_editor_services/version.rb index ebaa1ac1..eeb5054f 100644 --- a/lib/puppet_editor_services/version.rb +++ b/lib/puppet_editor_services/version.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true module PuppetEditorServices - PUPPETEDITORSERVICESVERSION = '1.1.0' unless defined? PUPPETEDITORSERVICESVERSION + PUPPETEDITORSERVICESVERSION = '1.2.0' unless defined? PUPPETEDITORSERVICESVERSION # @api public # diff --git a/tools/How_to_release.md b/tools/How_to_release.md index 421cc4e1..c42a8944 100644 --- a/tools/How_to_release.md +++ b/tools/How_to_release.md @@ -6,6 +6,8 @@ * Modify `lib/puppet_editor_services/version.rb` with the new version number + * Run the Bolt Introspection script with the latest Bolt version ([link](https://rubygems.org/gems/bolt)) + 2. Once merged get the commit id of the preparation 3. Tag the commit diff --git a/tools/bolt_introspect/README.md b/tools/bolt_introspect/README.md index 415e6c75..04626e74 100644 --- a/tools/bolt_introspect/README.md +++ b/tools/bolt_introspect/README.md @@ -22,5 +22,5 @@ This should regenerate all of the bolt files in `/lib/puppet-languageserver/stat | Component | Version | | --------------- | ------- | -| Bolt | 2.42.0 | -| Editor Services | 1.1.0 | +| Bolt | 3.8.1 | +| Editor Services | 1.2.0 |