From 8fb3142905a1c84a1b6f246258f923a299ec45b8 Mon Sep 17 00:00:00 2001 From: "G.Reijn" Date: Tue, 19 Aug 2025 12:17:06 +0200 Subject: [PATCH 01/37] Add version -preview.11 --- docs/prerelease-changelog.md | 125 ++++++++++++++++++++++++++++++++++- 1 file changed, 123 insertions(+), 2 deletions(-) diff --git a/docs/prerelease-changelog.md b/docs/prerelease-changelog.md index f257c74f0..faaf48196 100644 --- a/docs/prerelease-changelog.md +++ b/docs/prerelease-changelog.md @@ -46,7 +46,7 @@ This section includes a summary of user-facing changes since the last release. F changes since the last release, see the [diff on GitHub][unreleased]. -[unreleased]: https://github.com/PowerShell/DSC/compare/v3.0.0-preview.8...main +[unreleased]: https://github.com/PowerShell/DSC/compare/v3.0.0-preview.11...main +## [v3.0.0-preview.11][release-v3.0.0-preview.11] - 2024-10-24 + +This section includes a summary of changes for the `preview.11` release. For the full list of changes +in this release, see the [diff on GitHub][compare-v3.0.0-preview.11]. + + +[release-v3.0.0-preview.11]: https://github.com/PowerShell/DSC/releases/tag/v3.0.0-preview.11 "Link to the DSC v3.0.0-preview.11 release on GitHub" +[compare-v3.0.0-preview.11]: https://github.com/PowerShell/DSC/compare/v3.0.0-preview.10...v3.0.0-preview.11 + +### Changed + +- Renamed the resource `kind` value `Import` to `Importer`. If your resource manifest sets the + `kind` property to `Import`, update it to `Importer`. + +
Related work items + + - Issues:[#436][#436]. + - PRs: [#552][#552] + +
+ +- Improved performance for the adapter lookup table used to resolve adapted resources, reducing + lookup overhead during operations. See also [dsc resource list][p10-aa]. + +
Related work items + + - Issues: _None_. + - PRs: [#568][#568] + +
+ +- `dsc` now returns a non-zero exit code when a requested resource isn't found, making failures + easier to detect in automation. + +
Related work items + + - Issues: _None_. + - PRs: [#561][#561] + +
+ +- Changed the Echo test resource to `Microsoft.DSC.Debug/Echo`. + +
Related work items + + - Issues: [#537][#537]. + - PRs: [#553][#553] + +
+ +### Added + +- Added example configurations for common Windows baselines to help users get started. + +
Related work items + + - Issues: _None_. + - PRs: [#572][#572] + +
+ +### Fixed + +- Class-based PowerShell DSC Resources no longer include hidden properties in their output. + +
Related work items + + - Issues: [#157][#157]. + - PRs: [#556][#556] + +
+ +- Improved trace messaging for the `Microsoft.Windows/Registry` resource, emitting messages at the + proper levels. + +
Related work items + + - Issues: _None_. + - PRs: [#555][#555] + +
+ +- Fixed input schema validation for the `Microsoft.Windows/RebootPending` resource. + +
Related work items + + - Issues: [#485][#485]. + - PRs: [#488][#488] + +
+ +- Fixed a regression in the PowerShell adapter `Test` operation. + +
Related work items + + - Issues: _None_. + - PRs: [#565][#565] + +
+ ## [v3.0.0-preview.10][release-v3.0.0-preview.10] - 2024-09-17 This section includes a summary of changes for the `preview.10` release. For the full list of changes @@ -1795,6 +1895,7 @@ For the full list of changes in this release, see the [diff on GitHub][compare-v [#139]: https://github.com/PowerShell/DSC/issues/139 [#150]: https://github.com/PowerShell/DSC/issues/150 [#156]: https://github.com/PowerShell/DSC/issues/156 +[#157]: https://github.com/PowerShell/DSC/issues/157 [#158]: https://github.com/PowerShell/DSC/issues/158 [#159]: https://github.com/PowerShell/DSC/issues/159 [#162]: https://github.com/PowerShell/DSC/issues/162 @@ -1905,6 +2006,7 @@ For the full list of changes in this release, see the [diff on GitHub][compare-v [#432]: https://github.com/PowerShell/DSC/issues/432 [#434]: https://github.com/PowerShell/DSC/issues/434 [#435]: https://github.com/PowerShell/DSC/issues/435 +[#436]: https://github.com/PowerShell/DSC/issues/436 [#438]: https://github.com/PowerShell/DSC/issues/438 [#439]: https://github.com/PowerShell/DSC/issues/439 [#441]: https://github.com/PowerShell/DSC/issues/441 @@ -1925,6 +2027,8 @@ For the full list of changes in this release, see the [diff on GitHub][compare-v [#481]: https://github.com/PowerShell/DSC/issues/481 [#482]: https://github.com/PowerShell/DSC/issues/482 [#484]: https://github.com/PowerShell/DSC/issues/484 +[#485]: https://github.com/PowerShell/DSC/issues/485 +[#488]: https://github.com/PowerShell/DSC/issues/488 [#487]: https://github.com/PowerShell/DSC/issues/487 [#489]: https://github.com/PowerShell/DSC/issues/489 [#49]: https://github.com/PowerShell/DSC/issues/49 @@ -1938,7 +2042,7 @@ For the full list of changes in this release, see the [diff on GitHub][compare-v [#503]: https://github.com/PowerShell/DSC/issues/503 [#504]: https://github.com/PowerShell/DSC/issues/504 [#505]: https://github.com/PowerShell/DSC/issues/505 -[#506]: https://github.com/PowerShell/DSC/issues/504 +[#506]: https://github.com/PowerShell/DSC/issues/506 [#509]: https://github.com/PowerShell/DSC/issues/509 [#511]: https://github.com/PowerShell/DSC/issues/511 [#512]: https://github.com/PowerShell/DSC/issues/512 @@ -1953,9 +2057,26 @@ For the full list of changes in this release, see the [diff on GitHub][compare-v [#533]: https://github.com/PowerShell/DSC/issues/533 [#541]: https://github.com/PowerShell/DSC/issues/541 [#548]: https://github.com/PowerShell/DSC/issues/548 +[#549]: https://github.com/PowerShell/DSC/issues/549 +[#551]: https://github.com/PowerShell/DSC/issues/551 +[#552]: https://github.com/PowerShell/DSC/issues/552 +[#553]: https://github.com/PowerShell/DSC/issues/553 +[#555]: https://github.com/PowerShell/DSC/issues/555 +[#556]: https://github.com/PowerShell/DSC/issues/556 +[#561]: https://github.com/PowerShell/DSC/issues/561 +[#564]: https://github.com/PowerShell/DSC/issues/564 +[#565]: https://github.com/PowerShell/DSC/issues/565 +[#568]: https://github.com/PowerShell/DSC/issues/568 +[#572]: https://github.com/PowerShell/DSC/issues/572 +[#573]: https://github.com/PowerShell/DSC/issues/573 +[#577]: https://github.com/PowerShell/DSC/issues/577 [#57]: https://github.com/PowerShell/DSC/issues/57 [#70]: https://github.com/PowerShell/DSC/issues/70 [#73]: https://github.com/PowerShell/DSC/issues/73 [#75]: https://github.com/PowerShell/DSC/issues/75 [#89]: https://github.com/PowerShell/DSC/issues/89 [#98]: https://github.com/PowerShell/DSC/issues/98 +[#157]: https://github.com/PowerShell/DSC/issues/157 +[#436]: https://github.com/PowerShell/DSC/issues/436 +[#485]: https://github.com/PowerShell/DSC/issues/485 +[#537]: https://github.com/PowerShell/DSC/issues/537 From 3bf062ffba7cc8cc750dbdda137e76cc258142ec Mon Sep 17 00:00:00 2001 From: "G.Reijn" Date: Tue, 19 Aug 2025 12:26:40 +0200 Subject: [PATCH 02/37] Add version -preview.12 --- docs/prerelease-changelog.md | 117 ++++++++++++++++++++++++++++++++++- 1 file changed, 115 insertions(+), 2 deletions(-) diff --git a/docs/prerelease-changelog.md b/docs/prerelease-changelog.md index faaf48196..07e38d85d 100644 --- a/docs/prerelease-changelog.md +++ b/docs/prerelease-changelog.md @@ -8,7 +8,7 @@ ms.date: 06/24/2024 # Changelog - + -[unreleased]: https://github.com/PowerShell/DSC/compare/v3.0.0-preview.11...main +[unreleased]: https://github.com/PowerShell/DSC/compare/v3.0.0-preview.12...main + + +## [v3.0.0-preview.12][release-v3.0.0-preview.12] - 2024-12-10 + +This section includes a summary of changes for the `preview.12` release. For the full list of changes +in this release, see the [diff on GitHub][compare-v3.0.0-preview.12]. + + +[release-v3.0.0-preview.12]: https://github.com/PowerShell/DSC/releases/tag/v3.0.0-preview.12 "Link to the DSC v3.0.0-preview.12 release on GitHub" +[compare-v3.0.0-preview.12]: https://github.com/PowerShell/DSC/compare/v3.0.0-preview.11...v3.0.0-preview.12 + +### Changed + +- Allow multiple `export` methods for class-based PSDSC resources in the PowerShell adapter. + +
Related work items + + - Issues: [#578][#578]. + - PRs: [#579][#579] + +
+ +- Change how to pass STDIN via the CLI and rename several arguments for consistency: + `--file -` indicates read-from-STDIN; `--format` is now `--output-format` (short `-o`); + `--document` is now `--input`; and the shorthand for `--trace-format` is now `-t`. + +
Related work items + + - Issues: [#588][#588]. + - PRs: [#601][#601] + +
+ +- Internationalization updates for resources and packaging tweaks: + - Make `Microsoft.DSC.Debug/dscecho` resource internationalization compliant. + - Internationalize `Microsoft.DSC.Transitional/RunCommandOnSet`. + +
Related work items + + - Issues: _None_. + - PRs: [#606][#606], [#608][#608] + +
+ +### Added + +- Add `--system-root` parameter to `dsc`, plus new configuration functions `systemRoot()` and + `path()` to support offline configuration scenarios and OS-appropriate path joining. + +
Related work items + + - Issues: [#534][#534]. + - PRs: [#589][#589] + +
+ +- Add DSC meta configuration support (settings/policy JSON files), including default and policy + settings files. + +
Related work items + + - Issues: [#282][#282]. + - PRs: [#574][#574] + +
+ +- Include the `Microsoft/OSInfo` resource in release packages. + +
Related work items + + - Issues: _None_. + - PRs: [#606][#606] + +
+ +### Fixed + +- Fix output of the `Microsoft.DSC/Assertion` resource when running `test` so it resembles a + configuration and add array comparison support to the synthetic diff. + +
Related work items + + - Issues: [#165][#165]. + - PRs: [#595][#595] + +
+ +- Fix VS Code settings for the `dscecho` resource to align with the renamed project. + +
Related work items + + - Issues: _None_. + - PRs: [#597][#597] + +
+ ## [v3.0.0-preview.11][release-v3.0.0-preview.11] - 2024-10-24 This section includes a summary of changes for the `preview.11` release. For the full list of changes @@ -2080,3 +2176,20 @@ For the full list of changes in this release, see the [diff on GitHub][compare-v [#436]: https://github.com/PowerShell/DSC/issues/436 [#485]: https://github.com/PowerShell/DSC/issues/485 [#537]: https://github.com/PowerShell/DSC/issues/537 + +[#282]: https://github.com/PowerShell/DSC/issues/282 +[#534]: https://github.com/PowerShell/DSC/issues/534 +[#578]: https://github.com/PowerShell/DSC/issues/578 +[#588]: https://github.com/PowerShell/DSC/issues/588 +[#574]: https://github.com/PowerShell/DSC/pull/574 +[#579]: https://github.com/PowerShell/DSC/pull/579 +[#581]: https://github.com/PowerShell/DSC/pull/581 +[#587]: https://github.com/PowerShell/DSC/pull/587 +[#589]: https://github.com/PowerShell/DSC/pull/589 +[#595]: https://github.com/PowerShell/DSC/pull/595 +[#597]: https://github.com/PowerShell/DSC/pull/597 +[#601]: https://github.com/PowerShell/DSC/pull/601 +[#603]: https://github.com/PowerShell/DSC/pull/603 +[#606]: https://github.com/PowerShell/DSC/pull/606 +[#608]: https://github.com/PowerShell/DSC/pull/608 +[#609]: https://github.com/PowerShell/DSC/pull/609 From dd82dd2474d4fe5816ebf20390f37e3780ad099b Mon Sep 17 00:00:00 2001 From: "G.Reijn" Date: Tue, 19 Aug 2025 12:35:45 +0200 Subject: [PATCH 03/37] Add version -rc.1 --- docs/prerelease-changelog.md | 122 ++++++++++++++++++++++++++++++++++- 1 file changed, 120 insertions(+), 2 deletions(-) diff --git a/docs/prerelease-changelog.md b/docs/prerelease-changelog.md index 07e38d85d..83f696563 100644 --- a/docs/prerelease-changelog.md +++ b/docs/prerelease-changelog.md @@ -8,7 +8,7 @@ ms.date: 06/24/2024 # Changelog - + -[unreleased]: https://github.com/PowerShell/DSC/compare/v3.0.0-preview.12...main +[unreleased]: https://github.com/PowerShell/DSC/compare/v3.0.0-rc.1...main +## [v3.0.0-rc.1][release-v3.0.0-rc.1] - 2025-02-06 +This section includes a summary of changes for the `rc.1` release. For the full list of changes +in this release, see the [diff on GitHub][compare-v3.0.0-rc.1]. + + +[release-v3.0.0-rc.1]: https://github.com/PowerShell/DSC/releases/tag/v3.0.0-rc.1 "Link to the DSC v3.0.0-rc.1 release on GitHub" +[compare-v3.0.0-rc.1]: https://github.com/PowerShell/DSC/compare/v3.0.0-preview.12...v3.0.0-rc.1 + +### Changed + +- Internationalize the `dsc` CLI. Localized user-facing strings and removed redundant prefixes + from some error messages. + +
Related work items + + - Issues: _None_. + - PRs: [#612][#612] + +
+ +- Change the behavior of `reference()` to use the raw output of a resource instead of the + DSC-decorated output. This makes configurations reusable across `get`, `test`, `set`, and + `export` operations. + +
Related work items + + - Issues: [#389][#389]. + - PRs: [#634][#634] + +
+ +- Ensure `systemRoot()` always includes a trailing path separator (and have `path()` adopt this + behavior). This aligns behavior across platforms and avoids path-join surprises on Windows. + +
Related work items + + - Issues: _None_. + - PRs: [#616][#616] + +
+ +- Update README to remove the outdated mention of a dependency on the PSDSC module. + +
Related work items + + - Issues: _None_. + - PRs: [#623][#623] + +
+ +### Added + +- Add support for the `contentVersion` property in configuration documents. If present in input, + the value is accepted but not validated; generated configurations (for example, `export`) set + `contentVersion` to `1.0.0`. + +
Related work items + + - Issues: _None_. + - PRs: [#621][#621] + +
+ +- Enable the `Microsoft.DSC/Include` resource to accept configuration and parameters as string + content with `configurationContent` and `parametersContent` (in addition to the existing + `configurationFile` and `parametersFile`). + +
Related work items + + - Issues: _None_. + - PRs: [#626][#626] + +
+ +- Support writing progress as JSON with a new `--progress-format` (`-p`) root option. When set to + `json`, progress messages are also emitted to STDERR as JSON objects. + +
Related work items + + - Issues: [#592][#592]. + - PRs: [#614][#614] + +
+ +### Fixed + +- Fix built-in resource and settings discovery when `dsc` is invoked via a symlink (for example, + when installed by WinGet), ensuring built-ins are found correctly. + +
Related work items + + - Issues: [#618][#618]. + - PRs: [#625][#625] + +
+ +- Fix table header resource IDs casing mismatch between code and localization file for consistent + table output. + +
Related work items + + - Issues: _None_. + - PRs: [#629][#629] + +
## [v3.0.0-preview.12][release-v3.0.0-preview.12] - 2024-12-10 @@ -2193,3 +2298,16 @@ For the full list of changes in this release, see the [diff on GitHub][compare-v [#606]: https://github.com/PowerShell/DSC/pull/606 [#608]: https://github.com/PowerShell/DSC/pull/608 [#609]: https://github.com/PowerShell/DSC/pull/609 +[#612]: https://github.com/PowerShell/DSC/pull/612 +[#614]: https://github.com/PowerShell/DSC/pull/614 +[#616]: https://github.com/PowerShell/DSC/pull/616 +[#621]: https://github.com/PowerShell/DSC/pull/621 +[#623]: https://github.com/PowerShell/DSC/pull/623 +[#625]: https://github.com/PowerShell/DSC/pull/625 +[#626]: https://github.com/PowerShell/DSC/pull/626 +[#629]: https://github.com/PowerShell/DSC/pull/629 +[#631]: https://github.com/PowerShell/DSC/pull/631 +[#634]: https://github.com/PowerShell/DSC/pull/634 +[#389]: https://github.com/PowerShell/DSC/issues/389 +[#592]: https://github.com/PowerShell/DSC/issues/592 +[#618]: https://github.com/PowerShell/DSC/issues/618 From bb61d30ec2e0b7f6ab5559966d29ec9090e639aa Mon Sep 17 00:00:00 2001 From: "G.Reijn" Date: Tue, 19 Aug 2025 12:47:26 +0200 Subject: [PATCH 04/37] Add version v3.1.0-preview.1 --- docs/prerelease-changelog.md | 183 ++++++++++++++++++++++++++++++++--- 1 file changed, 169 insertions(+), 14 deletions(-) diff --git a/docs/prerelease-changelog.md b/docs/prerelease-changelog.md index 83f696563..e8be8ad18 100644 --- a/docs/prerelease-changelog.md +++ b/docs/prerelease-changelog.md @@ -46,7 +46,7 @@ This section includes a summary of user-facing changes since the last release. F changes since the last release, see the [diff on GitHub][unreleased]. -[unreleased]: https://github.com/PowerShell/DSC/compare/v3.0.0-rc.1...main +[unreleased]: https://github.com/PowerShell/DSC/compare/v3.1.0-preview.1...main + + +## [v3.1.0-preview.1][release-v3.1.0-preview.1] - 2025-03-18 + +This section includes a summary of changes for the `v3.1.0-preview.1` release. For the full list of +changes in this release, see the [diff on GitHub][compare-v3.1.0-preview.1]. + + +[release-v3.1.0-preview.1]: https://github.com/PowerShell/DSC/releases/tag/v3.1.0-preview.1 "Link to the DSC v3.1.0-preview.1 release on GitHub" +[compare-v3.1.0-preview.1]: https://github.com/PowerShell/DSC/compare/v3.0.0-rc.1...v3.1.0-preview.1 + +### Changed + +- Add object separators to YAML output (`---`) when multiple objects are emitted. + +
Related work items + + - Issues: [#628][#628]. + - PRs: [#635][#635] + +
+ +- Enhance progress output: improve JSON progress format, add `None` option, and refine the progress schema. + +
Related work items + + - Issues: _None_. + - PRs: [#644][#644] + +
+ +- Canonicalize casing across `dsc_lib` to ensure camelCase for property names and enum values; allow camelCase alias for the tracing `line_number` field. + +
Related work items + + - Issues: [#642][#642]. + - PRs: [#648][#648], [#645][#645] + +
+ +- Emit a warning during discovery if an executable referenced by a resource manifest can't be found. + +
Related work items + + - Issues: _None_. + - PRs: [#688][#688] + +
+ +- Improve tracing and ensure `_inDesiredState` aggregation is surfaced consistently in the PowerShell adapter. + +
Related work items + + - Issues: _None_. + - PRs: [#699][#699] + +
+ +### Added + +- Add `exporter` resource kind for generating complete resource instances as JSON Lines during export. + +
Related work items + + - Issues: [#515][#515]. + - PRs: [#682][#682] + +
+ +- Support passing input to direct resource `export` via CLI arguments. + +
Related work items + + - Issues: [#678][#678]. + - PRs: [#680][#680] + +
+ +- Preserve custom metadata when exporting a configuration. + +
Related work items + + - Issues: [#668][#668]. + - PRs: [#679][#679] + +
+ +### Fixed + +- Validate modules in the PowerShell adapter cache to address configuration size limits. + +
Related work items + + - Issues: [#640][#640]. + - PRs: [#647][#647] + +
+ +- Respect a resource-provided `_inDesiredState` value from `test` results instead of relying solely on diff. + +
Related work items + + - Issues: [#674][#674]. + - PRs: [#676][#676] + +
+ +- Allow resources in configuration documents to omit the `properties` object when not needed. + +
Related work items + + - Issues: _None_. + - PRs: [#675][#675] + +
+ +- Permit setting a Windows registry value with no data (use the `None` type) and improve related handling. + +
Related work items + + - Issues: [#683][#683]. + - PRs: [#684][#684] + +
+ +- Parse expressions correctly for `Group` resources (skip premature evaluation so the group can resolve within its scope). + +
Related work items + + - Issues: [#692][#692]. + - PRs: [#695][#695] + +
+ +- Ensure `RunCommandOnSet` works within configuration documents (adds `implementsPreTest` and tests). + +
Related work items + + - Issues: [#658][#658]. + - PRs: [#659][#659] + +
+ ## [v3.0.0-rc.1][release-v3.0.0-rc.1] - 2025-02-06 This section includes a summary of changes for the `rc.1` release. For the full list of changes @@ -2258,28 +2401,20 @@ For the full list of changes in this release, see the [diff on GitHub][compare-v [#533]: https://github.com/PowerShell/DSC/issues/533 [#541]: https://github.com/PowerShell/DSC/issues/541 [#548]: https://github.com/PowerShell/DSC/issues/548 -[#549]: https://github.com/PowerShell/DSC/issues/549 -[#551]: https://github.com/PowerShell/DSC/issues/551 [#552]: https://github.com/PowerShell/DSC/issues/552 [#553]: https://github.com/PowerShell/DSC/issues/553 [#555]: https://github.com/PowerShell/DSC/issues/555 [#556]: https://github.com/PowerShell/DSC/issues/556 [#561]: https://github.com/PowerShell/DSC/issues/561 -[#564]: https://github.com/PowerShell/DSC/issues/564 [#565]: https://github.com/PowerShell/DSC/issues/565 [#568]: https://github.com/PowerShell/DSC/issues/568 [#572]: https://github.com/PowerShell/DSC/issues/572 -[#573]: https://github.com/PowerShell/DSC/issues/573 -[#577]: https://github.com/PowerShell/DSC/issues/577 [#57]: https://github.com/PowerShell/DSC/issues/57 [#70]: https://github.com/PowerShell/DSC/issues/70 [#73]: https://github.com/PowerShell/DSC/issues/73 [#75]: https://github.com/PowerShell/DSC/issues/75 [#89]: https://github.com/PowerShell/DSC/issues/89 [#98]: https://github.com/PowerShell/DSC/issues/98 -[#157]: https://github.com/PowerShell/DSC/issues/157 -[#436]: https://github.com/PowerShell/DSC/issues/436 -[#485]: https://github.com/PowerShell/DSC/issues/485 [#537]: https://github.com/PowerShell/DSC/issues/537 [#282]: https://github.com/PowerShell/DSC/issues/282 @@ -2288,16 +2423,12 @@ For the full list of changes in this release, see the [diff on GitHub][compare-v [#588]: https://github.com/PowerShell/DSC/issues/588 [#574]: https://github.com/PowerShell/DSC/pull/574 [#579]: https://github.com/PowerShell/DSC/pull/579 -[#581]: https://github.com/PowerShell/DSC/pull/581 -[#587]: https://github.com/PowerShell/DSC/pull/587 [#589]: https://github.com/PowerShell/DSC/pull/589 [#595]: https://github.com/PowerShell/DSC/pull/595 [#597]: https://github.com/PowerShell/DSC/pull/597 [#601]: https://github.com/PowerShell/DSC/pull/601 -[#603]: https://github.com/PowerShell/DSC/pull/603 [#606]: https://github.com/PowerShell/DSC/pull/606 [#608]: https://github.com/PowerShell/DSC/pull/608 -[#609]: https://github.com/PowerShell/DSC/pull/609 [#612]: https://github.com/PowerShell/DSC/pull/612 [#614]: https://github.com/PowerShell/DSC/pull/614 [#616]: https://github.com/PowerShell/DSC/pull/616 @@ -2306,8 +2437,32 @@ For the full list of changes in this release, see the [diff on GitHub][compare-v [#625]: https://github.com/PowerShell/DSC/pull/625 [#626]: https://github.com/PowerShell/DSC/pull/626 [#629]: https://github.com/PowerShell/DSC/pull/629 -[#631]: https://github.com/PowerShell/DSC/pull/631 [#634]: https://github.com/PowerShell/DSC/pull/634 [#389]: https://github.com/PowerShell/DSC/issues/389 [#592]: https://github.com/PowerShell/DSC/issues/592 [#618]: https://github.com/PowerShell/DSC/issues/618 +[#515]: https://github.com/PowerShell/DSC/issues/515 +[#628]: https://github.com/PowerShell/DSC/issues/628 +[#640]: https://github.com/PowerShell/DSC/issues/640 +[#642]: https://github.com/PowerShell/DSC/issues/642 +[#658]: https://github.com/PowerShell/DSC/issues/658 +[#668]: https://github.com/PowerShell/DSC/issues/668 +[#674]: https://github.com/PowerShell/DSC/issues/674 +[#678]: https://github.com/PowerShell/DSC/issues/678 +[#683]: https://github.com/PowerShell/DSC/issues/683 +[#692]: https://github.com/PowerShell/DSC/issues/692 +[#635]: https://github.com/PowerShell/DSC/pull/635 +[#644]: https://github.com/PowerShell/DSC/pull/644 +[#645]: https://github.com/PowerShell/DSC/pull/645 +[#647]: https://github.com/PowerShell/DSC/pull/647 +[#648]: https://github.com/PowerShell/DSC/pull/648 +[#659]: https://github.com/PowerShell/DSC/pull/659 +[#675]: https://github.com/PowerShell/DSC/pull/675 +[#676]: https://github.com/PowerShell/DSC/pull/676 +[#679]: https://github.com/PowerShell/DSC/pull/679 +[#680]: https://github.com/PowerShell/DSC/pull/680 +[#682]: https://github.com/PowerShell/DSC/pull/682 +[#684]: https://github.com/PowerShell/DSC/pull/684 +[#688]: https://github.com/PowerShell/DSC/pull/688 +[#695]: https://github.com/PowerShell/DSC/pull/695 +[#699]: https://github.com/PowerShell/DSC/pull/699 From 9378c2d973a4d4324395c525df8af4d80eccab4a Mon Sep 17 00:00:00 2001 From: "G.Reijn" Date: Tue, 19 Aug 2025 12:50:29 +0200 Subject: [PATCH 05/37] Add version v3.1.0-preview.2 --- docs/prerelease-changelog.md | 39 ++++++++++++++++++++++++++++++++++-- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/docs/prerelease-changelog.md b/docs/prerelease-changelog.md index e8be8ad18..b9b300390 100644 --- a/docs/prerelease-changelog.md +++ b/docs/prerelease-changelog.md @@ -8,7 +8,7 @@ ms.date: 06/24/2024 # Changelog - + -[unreleased]: https://github.com/PowerShell/DSC/compare/v3.1.0-preview.1...main +[unreleased]: https://github.com/PowerShell/DSC/compare/v3.1.0-preview.2...main +[release-v3.1.0-preview.2]: https://github.com/PowerShell/DSC/releases/tag/v3.1.0-preview.2 "Link to the DSC v3.1.0-preview.2 release on GitHub" +[compare-v3.1.0-preview.2]: https://github.com/PowerShell/DSC/compare/v3.1.0-preview.1...v3.1.0-preview.2 + +### Changed + +- Enable using adapter resources without the adapter wrapper. + +
Related work items + + - Issues: [#693][#693]. + - PRs: [#720][#720] + +
+ +### Added + +- Add validation to check key-value pairs for class-based and script-based DSC resources. + +
Related work items + + - Issues: [#709][#709]. + - PRs: [#713][#713] + +
+ ## [v3.1.0-preview.1][release-v3.1.0-preview.1] - 2025-03-18 This section includes a summary of changes for the `v3.1.0-preview.1` release. For the full list of @@ -2451,6 +2482,8 @@ For the full list of changes in this release, see the [diff on GitHub][compare-v [#678]: https://github.com/PowerShell/DSC/issues/678 [#683]: https://github.com/PowerShell/DSC/issues/683 [#692]: https://github.com/PowerShell/DSC/issues/692 +[#693]: https://github.com/PowerShell/DSC/issues/693 +[#709]: https://github.com/PowerShell/DSC/issues/709 [#635]: https://github.com/PowerShell/DSC/pull/635 [#644]: https://github.com/PowerShell/DSC/pull/644 [#645]: https://github.com/PowerShell/DSC/pull/645 @@ -2466,3 +2499,5 @@ For the full list of changes in this release, see the [diff on GitHub][compare-v [#688]: https://github.com/PowerShell/DSC/pull/688 [#695]: https://github.com/PowerShell/DSC/pull/695 [#699]: https://github.com/PowerShell/DSC/pull/699 +[#713]: https://github.com/PowerShell/DSC/pull/713 +[#720]: https://github.com/PowerShell/DSC/pull/720 From 37ecf807b1085219b296d1a2f69ca5074ecb95eb Mon Sep 17 00:00:00 2001 From: "G.Reijn" Date: Tue, 19 Aug 2025 12:55:48 +0200 Subject: [PATCH 06/37] Add version v3.1.0-preview.3 --- docs/prerelease-changelog.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/docs/prerelease-changelog.md b/docs/prerelease-changelog.md index b9b300390..cab973c5e 100644 --- a/docs/prerelease-changelog.md +++ b/docs/prerelease-changelog.md @@ -73,7 +73,35 @@ changes since the last release, see the [diff on GitHub][unreleased]. +## [v3.1.0-preview.3][release-v3.1.0-preview.3] - 2025-04-08 +This section includes a summary of changes for the `v3.1.0-preview.3` release. For the full list of +changes in this release, see the [diff on GitHub][compare-v3.1.0-preview.3]. + + +[release-v3.1.0-preview.3]: https://github.com/PowerShell/DSC/releases/tag/v3.1.0-preview.3 "Link to the DSC v3.1.0-preview.3 release on GitHub" +[compare-v3.1.0-preview.3]: https://github.com/PowerShell/DSC/compare/v3.1.0-preview.2...v3.1.0-preview.3 + +### Fixed + +- Fix `Assertion` resource to fail when test fails. + +
Related work items + + - Issues: [#731][#731]. + - PRs: [#736][#736] + +
+ +- Set `Bypass` execution policy when calling PowerShell from the adapter to avoid failures on + Windows with restricted execution policy. + +
Related work items + + - Issues: [#714][#714]. + - PRs: [#715][#715] + +
## [v3.1.0-preview.2][release-v3.1.0-preview.2] - 2025-04-01 @@ -2501,3 +2529,7 @@ For the full list of changes in this release, see the [diff on GitHub][compare-v [#699]: https://github.com/PowerShell/DSC/pull/699 [#713]: https://github.com/PowerShell/DSC/pull/713 [#720]: https://github.com/PowerShell/DSC/pull/720 +[#714]: https://github.com/PowerShell/DSC/issues/714 +[#715]: https://github.com/PowerShell/DSC/pull/715 +[#731]: https://github.com/PowerShell/DSC/issues/731 +[#736]: https://github.com/PowerShell/DSC/pull/736 From b62f2b4e2102882f6cbc2c709a814ec2ac013ca7 Mon Sep 17 00:00:00 2001 From: "G.Reijn" Date: Tue, 19 Aug 2025 13:02:02 +0200 Subject: [PATCH 07/37] Add version v3.1.0-preview.3 --- docs/prerelease-changelog.md | 55 +++++++++++++++++++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) diff --git a/docs/prerelease-changelog.md b/docs/prerelease-changelog.md index cab973c5e..1f60f8f62 100644 --- a/docs/prerelease-changelog.md +++ b/docs/prerelease-changelog.md @@ -46,7 +46,7 @@ This section includes a summary of user-facing changes since the last release. F changes since the last release, see the [diff on GitHub][unreleased]. -[unreleased]: https://github.com/PowerShell/DSC/compare/v3.1.0-preview.2...main +[unreleased]: https://github.com/PowerShell/DSC/compare/v3.1.0-preview.4...main + + +## [v3.1.0-preview.4][release-v3.1.0-preview.4] - 2025-04-29 + +This section includes a summary of changes for the `v3.1.0-preview.4` release. For the full list of +changes in this release, see the [diff on GitHub][compare-v3.1.0-preview.4]. + + +[release-v3.1.0-preview.4]: https://github.com/PowerShell/DSC/releases/tag/v3.1.0-preview.4 "Link to the DSC v3.1.0-preview.4 release on GitHub" +[compare-v3.1.0-preview.4]: https://github.com/PowerShell/DSC/compare/v3.1.0-preview.3...v3.1.0-preview.4 + +### Added + +- Add credential support on PowerShell adapters to create PSCredential objects from input when the + target property expects a credential. + +
Related work items + + - Issues: [#328][#328]. + - PRs: [#758][#758] + +
+ +### Changed + +- Prefer Windows PowerShell modules first in the Windows PowerShell adapter by prepending the + Windows module path; add a warning when a resource isn't found (resource must be installed for + AllUsers). + +
Related work items + + - Issues: _None_. + - PRs: [#764][#764] + +
+ +### Fixed + +- Fix resource cache behavior when PowerShell modules are installed during a run so subsequent + modules aren't lost from the cache. + +
Related work items + + - Issues: [#745][#745]. + - PRs: [#748][#748] + +
+ ## [v3.1.0-preview.3][release-v3.1.0-preview.3] - 2025-04-08 This section includes a summary of changes for the `v3.1.0-preview.3` release. For the full list of @@ -2363,6 +2411,7 @@ For the full list of changes in this release, see the [diff on GitHub][compare-v [#321]: https://github.com/PowerShell/DSC/issues/321 [#322]: https://github.com/PowerShell/DSC/issues/322 [#323]: https://github.com/PowerShell/DSC/issues/323 +[#328]: https://github.com/PowerShell/DSC/issues/328 [#329]: https://github.com/PowerShell/DSC/issues/329 [#333]: https://github.com/PowerShell/DSC/issues/333 [#334]: https://github.com/PowerShell/DSC/issues/334 @@ -2512,6 +2561,7 @@ For the full list of changes in this release, see the [diff on GitHub][compare-v [#692]: https://github.com/PowerShell/DSC/issues/692 [#693]: https://github.com/PowerShell/DSC/issues/693 [#709]: https://github.com/PowerShell/DSC/issues/709 +[#745]: https://github.com/PowerShell/DSC/issues/745 [#635]: https://github.com/PowerShell/DSC/pull/635 [#644]: https://github.com/PowerShell/DSC/pull/644 [#645]: https://github.com/PowerShell/DSC/pull/645 @@ -2533,3 +2583,6 @@ For the full list of changes in this release, see the [diff on GitHub][compare-v [#715]: https://github.com/PowerShell/DSC/pull/715 [#731]: https://github.com/PowerShell/DSC/issues/731 [#736]: https://github.com/PowerShell/DSC/pull/736 +[#748]: https://github.com/PowerShell/DSC/pull/748 +[#758]: https://github.com/PowerShell/DSC/pull/758 +[#764]: https://github.com/PowerShell/DSC/pull/764 From b50df4636ed3af8b8080ae7b70cdb184c4a55c2f Mon Sep 17 00:00:00 2001 From: "G.Reijn" Date: Tue, 19 Aug 2025 13:05:43 +0200 Subject: [PATCH 08/37] Add version v3.1.0-preview.5 --- docs/prerelease-changelog.md | 93 +++++++++++++++++++++++++++++++++++- 1 file changed, 92 insertions(+), 1 deletion(-) diff --git a/docs/prerelease-changelog.md b/docs/prerelease-changelog.md index 1f60f8f62..6ad0e32be 100644 --- a/docs/prerelease-changelog.md +++ b/docs/prerelease-changelog.md @@ -46,7 +46,7 @@ This section includes a summary of user-facing changes since the last release. F changes since the last release, see the [diff on GitHub][unreleased]. -[unreleased]: https://github.com/PowerShell/DSC/compare/v3.1.0-preview.4...main +[unreleased]: https://github.com/PowerShell/DSC/compare/v3.1.0-preview.5...main +[release-v3.1.0-preview.5]: https://github.com/PowerShell/DSC/releases/tag/v3.1.0-preview.5 "Link to the DSC v3.1.0-preview.5 release on GitHub" +[compare-v3.1.0-preview.5]: https://github.com/PowerShell/DSC/compare/v3.1.0-preview.4...v3.1.0-preview.5 + +### Added + +- Add `equals()` configuration function for equality comparisons. + +
Related work items + + - Issues: [#767][#767]. + - PRs: [#770][#770] + +
+ +- Add `if()` configuration function for conditional selection. + +
Related work items + + - Issues: [#767][#767]. + - PRs: [#776][#776] + +
+ +- Add experimental `format()` configuration function for string formatting. Emits a warning when + used as it doesn't yet match all .NET format options. + +
Related work items + + - Issues: [#767][#767]. + - PRs: [#779][#779] + +
+ +- Add support for discovery extensions, including extension manifests and CLI support. + +
Related work items + + - Issues: [#681][#681]. + - PRs: [#760][#760] + +
+ +### Changed + +- For the Windows PowerShell adapter, remove PowerShell 7 paths from `PSModulePath` to avoid + discovering incompatible modules when running under PowerShell 7. + +
Related work items + + - Issues: [#707][#707]. + - PRs: [#777][#777] + +
+ +### Fixed + +- Add a null check in the PowerShell adapter when validating a property that may be `$null`. + +
Related work items + + - Issues: _None_. + - PRs: [#769][#769] + +
+ +- Fix adapter configuration `set` response mapping when using implicit PowerShell adapter wrapping + so `before_state` contains `resources` instead of `result`. + +
Related work items + + - Issues: _None_. + - PRs: [#774][#774] + +
+ ## [v3.1.0-preview.4][release-v3.1.0-preview.4] - 2025-04-29 This section includes a summary of changes for the `v3.1.0-preview.4` release. For the full list of @@ -2557,10 +2638,13 @@ For the full list of changes in this release, see the [diff on GitHub][compare-v [#668]: https://github.com/PowerShell/DSC/issues/668 [#674]: https://github.com/PowerShell/DSC/issues/674 [#678]: https://github.com/PowerShell/DSC/issues/678 +[#681]: https://github.com/PowerShell/DSC/issues/681 [#683]: https://github.com/PowerShell/DSC/issues/683 [#692]: https://github.com/PowerShell/DSC/issues/692 [#693]: https://github.com/PowerShell/DSC/issues/693 +[#707]: https://github.com/PowerShell/DSC/issues/707 [#709]: https://github.com/PowerShell/DSC/issues/709 +[#767]: https://github.com/PowerShell/DSC/issues/767 [#745]: https://github.com/PowerShell/DSC/issues/745 [#635]: https://github.com/PowerShell/DSC/pull/635 [#644]: https://github.com/PowerShell/DSC/pull/644 @@ -2583,6 +2667,13 @@ For the full list of changes in this release, see the [diff on GitHub][compare-v [#715]: https://github.com/PowerShell/DSC/pull/715 [#731]: https://github.com/PowerShell/DSC/issues/731 [#736]: https://github.com/PowerShell/DSC/pull/736 +[#760]: https://github.com/PowerShell/DSC/pull/760 +[#769]: https://github.com/PowerShell/DSC/pull/769 +[#770]: https://github.com/PowerShell/DSC/pull/770 +[#774]: https://github.com/PowerShell/DSC/pull/774 +[#776]: https://github.com/PowerShell/DSC/pull/776 +[#777]: https://github.com/PowerShell/DSC/pull/777 +[#779]: https://github.com/PowerShell/DSC/pull/779 [#748]: https://github.com/PowerShell/DSC/pull/748 [#758]: https://github.com/PowerShell/DSC/pull/758 [#764]: https://github.com/PowerShell/DSC/pull/764 From ce05d99fc01980c74b3dbf2980266ac2ec7ef677 Mon Sep 17 00:00:00 2001 From: "G.Reijn" Date: Tue, 19 Aug 2025 13:13:11 +0200 Subject: [PATCH 09/37] Add version v3.1.0-preview.6 --- docs/prerelease-changelog.md | 106 ++++++++++++++++++++++++++++++++++- 1 file changed, 105 insertions(+), 1 deletion(-) diff --git a/docs/prerelease-changelog.md b/docs/prerelease-changelog.md index 6ad0e32be..23a07d877 100644 --- a/docs/prerelease-changelog.md +++ b/docs/prerelease-changelog.md @@ -46,7 +46,7 @@ This section includes a summary of user-facing changes since the last release. F changes since the last release, see the [diff on GitHub][unreleased]. -[unreleased]: https://github.com/PowerShell/DSC/compare/v3.1.0-preview.5...main +[unreleased]: https://github.com/PowerShell/DSC/compare/v3.1.0-preview.6...main +## [v3.1.0-preview.6][release-v3.1.0-preview.6] - 2025-05-22 +This section includes a summary of changes for the `v3.1.0-preview.6` release. For the full list of +changes in this release, see the [diff on GitHub][compare-v3.1.0-preview.6]. + + +[release-v3.1.0-preview.6]: https://github.com/PowerShell/DSC/releases/tag/v3.1.0-preview.6 "Link to the DSC v3.1.0-preview.6 release on GitHub" +[compare-v3.1.0-preview.6]: https://github.com/PowerShell/DSC/compare/v3.1.0-preview.5...v3.1.0-preview.6 + +### Added + +- Experimental Appx resource discovery extension to discover resources packaged in Appx; also removes duplicate discoveries by type name and version. + +
Related work items + + - Issues: _None_. + - PRs: [#762][#762] + +
+ +- Add `table-no-truncate` format option to `dsc resource list` and `dsc extension list` to avoid truncating wide tables in narrow consoles. + +
Related work items + + - Issues: [#763][#763]. + - PRs: [#823][#823] + +
+ +### Changed + +- Windows PowerShell adapter: allow a workaround to detect class-based resources using type instances so class-based PSDSC resources are discoverable. + +
Related work items + + - Issues: [#798][#798]. + - PRs: [#797][#797] + +
+ +- WMI adapter: set execution policy to `Bypass` to align with PowerShell adapters and avoid failures under restricted policies. + +
Related work items + + - Issues: _None_. + - PRs: [#820][#820] + +
+ +### Fixed + +- Export adapted resources correctly by aligning `export` output to use the `result` property and fixing the test adapter. + +
Related work items + + - Issues: [#782][#782]. + - PRs: [#789][#789] + +
+ +- Windows PowerShell adapter caching: ensure full refresh when `PSModulePath` changes and on cold cache to avoid broken cache states from targeted refreshes. + +
Related work items + + - Issues: [#807][#807], [#745][#745]. + - PRs: [#787][#787] + +
+ +- Class-based detection: add validation ensuring the type instance has the `DscResource` attribute to avoid false positives for types with matching names. + +
Related work items + + - Issues: _None_. + - PRs: [#812][#812] + +
+ +- PowerShell adapter output: return enum string labels instead of integer values. + +
Related work items + + - Issues: [#791][#791]. + - PRs: [#800][#800] + +
## [v3.1.0-preview.5][release-v3.1.0-preview.5] - 2025-05-07 @@ -2677,3 +2762,22 @@ For the full list of changes in this release, see the [diff on GitHub][compare-v [#748]: https://github.com/PowerShell/DSC/pull/748 [#758]: https://github.com/PowerShell/DSC/pull/758 [#764]: https://github.com/PowerShell/DSC/pull/764 +[#762]: https://github.com/PowerShell/DSC/pull/762 +[#763]: https://github.com/PowerShell/DSC/issues/763 +[#797]: https://github.com/PowerShell/DSC/pull/797 +[#798]: https://github.com/PowerShell/DSC/issues/798 +[#734]: https://github.com/PowerShell/DSC/pull/734 +[#717]: https://github.com/PowerShell/DSC/issues/717 +[#708]: https://github.com/PowerShell/DSC/issues/708 +[#819]: https://github.com/PowerShell/DSC/pull/819 +[#818]: https://github.com/PowerShell/DSC/issues/818 +[#820]: https://github.com/PowerShell/DSC/pull/820 +[#821]: https://github.com/PowerShell/DSC/pull/821 +[#782]: https://github.com/PowerShell/DSC/issues/782 +[#789]: https://github.com/PowerShell/DSC/pull/789 +[#807]: https://github.com/PowerShell/DSC/issues/807 +[#787]: https://github.com/PowerShell/DSC/pull/787 +[#812]: https://github.com/PowerShell/DSC/pull/812 +[#791]: https://github.com/PowerShell/DSC/issues/791 +[#800]: https://github.com/PowerShell/DSC/pull/800 +[#823]: https://github.com/PowerShell/DSC/pull/823 From 9dd62882bad83dade9a2c2e718dcb39b93e56497 Mon Sep 17 00:00:00 2001 From: "G.Reijn" Date: Tue, 19 Aug 2025 13:17:54 +0200 Subject: [PATCH 10/37] Add version v3.1.0-preview.7 --- docs/prerelease-changelog.md | 99 +++++++++++++++++++++++++++++++++++- 1 file changed, 98 insertions(+), 1 deletion(-) diff --git a/docs/prerelease-changelog.md b/docs/prerelease-changelog.md index 23a07d877..22df74bf9 100644 --- a/docs/prerelease-changelog.md +++ b/docs/prerelease-changelog.md @@ -46,7 +46,7 @@ This section includes a summary of user-facing changes since the last release. F changes since the last release, see the [diff on GitHub][unreleased]. -[unreleased]: https://github.com/PowerShell/DSC/compare/v3.1.0-preview.6...main +[unreleased]: https://github.com/PowerShell/DSC/compare/v3.1.0-preview.7...main + + +## [v3.1.0-preview.7][release-v3.1.0-preview.7] - 2025-06-04 + +This section includes a summary of changes for the `v3.1.0-preview.7` release. For the full list of +changes in this release, see the [diff on GitHub][compare-v3.1.0-preview.7]. + + +[release-v3.1.0-preview.7]: https://github.com/PowerShell/DSC/releases/tag/v3.1.0-preview.7 "Link to the DSC v3.1.0-preview.7 release on GitHub" +[compare-v3.1.0-preview.7]: https://github.com/PowerShell/DSC/compare/v3.1.0-preview.6...v3.1.0-preview.7 + +### Added + +- Windows PowerShell adapter: implement `export` capability to match the PowerShell adapter. + +
Related work items + + - Issues: [#811][#811]. + - PRs: [#848][#848] + +
+ +- Add `json-array` as a supported output format for `dsc resource get --all` to return a single JSON array instead of JSON Lines. + +
Related work items + + - Issues: [#813][#813]. + - PRs: [#861][#861] + +
+ +### Changed + +- Appx discovery extension: set execution policy to `Bypass` so it runs under restricted policies. + +
Related work items + + - Issues: _None_. + - PRs: [#850][#850] + +
+ +- Respect `DSC_RESOURCE_PATH` for executable lookup by aligning the process `PATH` to the same value so executable search is limited to `DSC_RESOURCE_PATH`. + +
Related work items + + - Issues: [#814][#814]. + - PRs: [#825][#825] + +
+ +### Fixed + +- Improve error message when duplicate resource names are detected during `set`. + +
Related work items + + - Issues: [#841][#841]. + - PRs: [#844][#844] + +
+ +- Windows registry resource: treat deleting a non-existing key/value as success instead of erroring. + +
Related work items + + - Issues: [#843][#843]. + - PRs: [#847][#847] + +
+ +- Windows PowerShell adapter: exclude hidden properties from output. + +
Related work items + + - Issues: [#832][#832]. + - PRs: [#855][#855] + +
+ ## [v3.1.0-preview.6][release-v3.1.0-preview.6] - 2025-05-22 This section includes a summary of changes for the `v3.1.0-preview.6` release. For the full list of @@ -2781,3 +2861,20 @@ For the full list of changes in this release, see the [diff on GitHub][compare-v [#791]: https://github.com/PowerShell/DSC/issues/791 [#800]: https://github.com/PowerShell/DSC/pull/800 [#823]: https://github.com/PowerShell/DSC/pull/823 + +[#811]: https://github.com/PowerShell/DSC/issues/811 +[#813]: https://github.com/PowerShell/DSC/issues/813 +[#814]: https://github.com/PowerShell/DSC/issues/814 +[#830]: https://github.com/PowerShell/DSC/pull/830 +[#837]: https://github.com/PowerShell/DSC/pull/837 +[#838]: https://github.com/PowerShell/DSC/pull/838 +[#841]: https://github.com/PowerShell/DSC/issues/841 +[#843]: https://github.com/PowerShell/DSC/issues/843 +[#844]: https://github.com/PowerShell/DSC/pull/844 +[#847]: https://github.com/PowerShell/DSC/pull/847 +[#848]: https://github.com/PowerShell/DSC/pull/848 +[#850]: https://github.com/PowerShell/DSC/pull/850 +[#855]: https://github.com/PowerShell/DSC/pull/855 +[#861]: https://github.com/PowerShell/DSC/pull/861 +[#825]: https://github.com/PowerShell/DSC/pull/825 +[#832]: https://github.com/PowerShell/DSC/issues/832 From ad6322168eb59ec97343adab1fd69c402e8410a1 Mon Sep 17 00:00:00 2001 From: "G.Reijn" Date: Tue, 19 Aug 2025 13:23:30 +0200 Subject: [PATCH 11/37] Add version v3.1.0-rc.1 --- docs/prerelease-changelog.md | 61 +++++++++++++++++++++++++++++++++++- 1 file changed, 60 insertions(+), 1 deletion(-) diff --git a/docs/prerelease-changelog.md b/docs/prerelease-changelog.md index 22df74bf9..a0c08fe95 100644 --- a/docs/prerelease-changelog.md +++ b/docs/prerelease-changelog.md @@ -46,7 +46,7 @@ This section includes a summary of user-facing changes since the last release. F changes since the last release, see the [diff on GitHub][unreleased]. -[unreleased]: https://github.com/PowerShell/DSC/compare/v3.1.0-preview.7...main +[unreleased]: https://github.com/PowerShell/DSC/compare/v3.1.0-rc.1...main +[release-v3.1.0-rc.1]: https://github.com/PowerShell/DSC/releases/tag/v3.1.0-rc.1 "Link to the DSC v3.1.0-rc.1 release on GitHub" +[compare-v3.1.0-rc.1]: https://github.com/PowerShell/DSC/compare/v3.1.0-preview.7...v3.1.0-rc.1 + +### Added + +- Enable reading parameters from STDIN by allowing the parameters file name `-`. + +
Related work items + + - Issues: [#834][#834]. + - PRs: [#863][#863] + +
+ +- Add `pass-through` output format for `dsc resource get` to emit the resource's JSON without a DSC wrapper. + +
Related work items + + - Issues: _None_. + - PRs: [#862][#862] + +
+ +### Changed + +- Windows RebootPending resource: convert the pending reboot value to an object (removes a read-only property and keeps the field optional). + +
Related work items + + - Issues: [#858][#858]. + - PRs: [#859][#859] + +
+ +### Fixed + +- Fix regression in default output for `get --all` (ensure interactive default output is correct). + +
Related work items + + - Issues: [#866][#866]. + - PRs: [#875][#875] + +
+ ## [v3.1.0-preview.7][release-v3.1.0-preview.7] - 2025-06-04 This section includes a summary of changes for the `v3.1.0-preview.7` release. For the full list of @@ -2878,3 +2929,11 @@ For the full list of changes in this release, see the [diff on GitHub][compare-v [#861]: https://github.com/PowerShell/DSC/pull/861 [#825]: https://github.com/PowerShell/DSC/pull/825 [#832]: https://github.com/PowerShell/DSC/issues/832 + +[#834]: https://github.com/PowerShell/DSC/issues/834 +[#858]: https://github.com/PowerShell/DSC/issues/858 +[#866]: https://github.com/PowerShell/DSC/issues/866 +[#862]: https://github.com/PowerShell/DSC/pull/862 +[#863]: https://github.com/PowerShell/DSC/pull/863 +[#875]: https://github.com/PowerShell/DSC/pull/875 +[#859]: https://github.com/PowerShell/DSC/pull/859 From d962f238ea812e681df6196946fac05f92880fb9 Mon Sep 17 00:00:00 2001 From: "G.Reijn" Date: Tue, 19 Aug 2025 13:30:31 +0200 Subject: [PATCH 12/37] Add version v3.2.0-preview.1 --- docs/prerelease-changelog.md | 88 +++++++++++++++++++++++++++++++++++- 1 file changed, 87 insertions(+), 1 deletion(-) diff --git a/docs/prerelease-changelog.md b/docs/prerelease-changelog.md index a0c08fe95..1b78ba41e 100644 --- a/docs/prerelease-changelog.md +++ b/docs/prerelease-changelog.md @@ -46,7 +46,7 @@ This section includes a summary of user-facing changes since the last release. F changes since the last release, see the [diff on GitHub][unreleased]. -[unreleased]: https://github.com/PowerShell/DSC/compare/v3.1.0-rc.1...main +[unreleased]: https://github.com/PowerShell/DSC/compare/v3.2.0-preview.1...main +[release-v3.2.0-preview.1]: https://github.com/PowerShell/DSC/releases/tag/v3.2.0-preview.1 "Link to the DSC v3.2.0-preview.1 release on GitHub" +[compare-v3.2.0-preview.1]: https://github.com/PowerShell/DSC/compare/v3.1.0-preview.7...v3.2.0-preview.1 + +### Added + +- Add `sshdconfig` project providing resources to manage OpenSSH server configuration on Windows. + +
Related work items + + - Issues: _None_. + - PRs: [#869][#869] + +
+ +- Windows RebootPending resource: include pending reboot reason in the result output. + +
Related work items + + - Issues: _None_. + - PRs: [#873][#873] + +
+ +### Changed + +- Export output: surface `_kind`, `_securityContext`, and `_name` fields from resources during export. + +
Related work items + + - Issues: [#598][#598] + - PRs: [#884][#884] + +
+ +- Registry internals: separate shared helper into a library and refactor registry implementation. + +
Related work items + + - Issues: _None_. + - PRs: [#865][#865], [#892][#892] + +
+ +- WMI adapter refactor implementation. + +
Related work items + + - Issues: _None_. + - PRs: [#897][#897] + +
+ +### Fixed + +- Fix regression in default output for `get --all` (ensure interactive default output is correct). + +
Related work items + + - Issues: [#866][#866]. + - PRs: [#874][#874] + +
+ ## [v3.1.0-rc.1][release-v3.1.0-rc.1] - 2025-06-10 This section includes a summary of changes for the `rc.1` release. For the full list of changes @@ -2937,3 +3006,20 @@ For the full list of changes in this release, see the [diff on GitHub][compare-v [#863]: https://github.com/PowerShell/DSC/pull/863 [#875]: https://github.com/PowerShell/DSC/pull/875 [#859]: https://github.com/PowerShell/DSC/pull/859 +[#869]: https://github.com/PowerShell/DSC/pull/869 +[#873]: https://github.com/PowerShell/DSC/pull/873 +[#884]: https://github.com/PowerShell/DSC/pull/884 +[#865]: https://github.com/PowerShell/DSC/pull/865 +[#892]: https://github.com/PowerShell/DSC/pull/892 +[#897]: https://github.com/PowerShell/DSC/pull/897 +[#891]: https://github.com/PowerShell/DSC/pull/891 +[#874]: https://github.com/PowerShell/DSC/pull/874 +[#901]: https://github.com/PowerShell/DSC/pull/901 +[#900]: https://github.com/PowerShell/DSC/pull/900 +[#886]: https://github.com/PowerShell/DSC/pull/886 +[#888]: https://github.com/PowerShell/DSC/pull/888 +[#899]: https://github.com/PowerShell/DSC/pull/899 +[#857]: https://github.com/PowerShell/DSC/pull/857 +[#598]: https://github.com/PowerShell/DSC/issues/598 +[#665]: https://github.com/PowerShell/DSC/issues/665 +[#539]: https://github.com/PowerShell/DSC/issues/539 From f8bae0264b545e43976f7d536060aac4a1fb93c1 Mon Sep 17 00:00:00 2001 From: "G.Reijn" Date: Tue, 19 Aug 2025 15:29:00 +0200 Subject: [PATCH 13/37] Add remaining releases --- docs/prerelease-changelog.md | 235 ++++++++++++++++++++++++++++++++++- 1 file changed, 234 insertions(+), 1 deletion(-) diff --git a/docs/prerelease-changelog.md b/docs/prerelease-changelog.md index 1b78ba41e..60b03d056 100644 --- a/docs/prerelease-changelog.md +++ b/docs/prerelease-changelog.md @@ -46,7 +46,7 @@ This section includes a summary of user-facing changes since the last release. F changes since the last release, see the [diff on GitHub][unreleased]. -[unreleased]: https://github.com/PowerShell/DSC/compare/v3.2.0-preview.1...main +[unreleased]: https://github.com/PowerShell/DSC/compare/v3.2.0-preview.3...main +[release-v3.2.0-preview.3]: https://github.com/PowerShell/DSC/releases/tag/v3.2.0-preview.3 "Link to the DSC v3.2.0-preview.3 release on GitHub" +[compare-v3.2.0-preview.3]: https://github.com/PowerShell/DSC/compare/v3.2.0-preview.2...v3.2.0-preview.3 + +### Added + +- Add support for `secret()` function and "secret" extensions to retrieve secrets during configuration evaluation. + +
Related work items + + - Issues: [#685][#685] + - PRs: [#908][#908] + +
+ +- Add `dsc function list` subcommand to enumerate supported functions. + +
Related work items + + - Issues: _None_. + - PRs: [#959][#959] + +
+ +- Add `condition` support for resource instances within a configuration document. + +
Related work items + + - Issues: [#972][#972] + - PRs: [#978][#978] + +
+ +- Enable resources to return `_restartRequired` metadata that aggregates at the configuration result level. + +
Related work items + + - Issues: [#50][#50] + - PRs: [#975][#975] + +
+ +- Add remaining logical functions to the function library: `and`, `bool`, `false`, `true`, `not`, `or`. + +
Related work items + + - Issues: [#976][#976] + - PRs: [#979][#979] + +
+ +- Introduce inline script resources: `Microsoft.DSC.Transitional/PowerShellScript` and `Microsoft.DSC.Transitional/WindowsPowerShellScript`. + +
Related work items + + - Issues: [#885][#885] + - PRs: [#937][#937] + +
+ +- sshdconfig: add support for configuring a default shell on Windows. + +
Related work items + + - Issues: _None_. + - PRs: [#907][#907] + +
+ +- WMI adapter: add `set` capability for WMI-backed resources. + +
Related work items + + - Issues: [#475][#475] + - PRs: [#946][#946] + +
+ +### Changed + +- sshdconfig: add JSON tracing and update supported keyword constants. + +
Related work items + + - Issues: _None_. + - PRs: [#958][#958] + +
+ +### Fixed + +- Correct trace message to use `results` and emit JSON for function evaluation traces. + +
Related work items + + - Issues: _None_. + - PRs: [#955][#955] + +
+ +- Windows PowerShell adapter: suppress progress output. + +
Related work items + + - Issues: [#923][#923] + - PRs: [#964][#964] + +
+ +- Adapter capability discovery: fix discovery of capabilities in the PowerShell adapter and Windows PowerShell adapter. + +
Related work items + + - Issues: [#853][#853] + - PRs: [#876][#876], [#877][#877] + +
+ +## [v3.2.0-preview.2][release-v3.2.0-preview.2] - 2025-07-11 + +This section includes a summary of changes for the `v3.2.0-preview.2` release. For the full list of +changes in this release, see the [diff on GitHub][compare-v3.2.0-preview.2]. + + +[release-v3.2.0-preview.2]: https://github.com/PowerShell/DSC/releases/tag/v3.2.0-preview.2 "Link to the DSC v3.2.0-preview.2 release on GitHub" +[compare-v3.2.0-preview.2]: https://github.com/PowerShell/DSC/compare/v3.2.0-preview.1...v3.2.0-preview.2 + +### Added + +- Enable resources to return metadata that DSC merges into the resource result output's `metadata`. + +
Related work items + + - Issues: [#467][#467] + - PRs: [#947][#947] + +
+ +### Changed + +- Rename `Microsoft.Windows/sshd_config` resource to `Microsoft/sshd_config` to reflect cross-platform scope. + +
Related work items + + - Issues: [#915][#915] + - PRs: [#932][#932] + +
+ +### Fixed + +- Fix default interactive output to use YAML for resource `get` results. + +
Related work items + + - Issues: [#918][#918] + - PRs: [#920][#920] + +
+ +- Fix property discovery for class-based resources in the Windows PowerShell adapter. + +
Related work items + + - Issues: [#878][#878] + - PRs: [#879][#879] + +
+ +- Remove UTF-8 BOM from files when reading to avoid mis-parsing content. + +
Related work items + + - Issues: [#829][#829] + - PRs: [#944][#944] + +
+ ## [v3.2.0-preview.1][release-v3.2.0-preview.1] - 2025-06-26 This section includes a summary of changes for the `v3.2.0-preview.1` release. For the full list of @@ -3023,3 +3206,53 @@ For the full list of changes in this release, see the [diff on GitHub][compare-v [#598]: https://github.com/PowerShell/DSC/issues/598 [#665]: https://github.com/PowerShell/DSC/issues/665 [#539]: https://github.com/PowerShell/DSC/issues/539 + +[#467]: https://github.com/PowerShell/DSC/issues/467 +[#915]: https://github.com/PowerShell/DSC/issues/915 +[#918]: https://github.com/PowerShell/DSC/issues/918 +[#878]: https://github.com/PowerShell/DSC/issues/878 +[#829]: https://github.com/PowerShell/DSC/issues/829 +[#921]: https://github.com/PowerShell/DSC/issues/921 +[#914]: https://github.com/PowerShell/DSC/issues/914 +[#909]: https://github.com/PowerShell/DSC/issues/909 + +[#947]: https://github.com/PowerShell/DSC/pull/947 +[#932]: https://github.com/PowerShell/DSC/pull/932 +[#920]: https://github.com/PowerShell/DSC/pull/920 +[#879]: https://github.com/PowerShell/DSC/pull/879 +[#944]: https://github.com/PowerShell/DSC/pull/944 +[#935]: https://github.com/PowerShell/DSC/pull/935 +[#902]: https://github.com/PowerShell/DSC/pull/902 +[#916]: https://github.com/PowerShell/DSC/pull/916 +[#910]: https://github.com/PowerShell/DSC/pull/910 +[#927]: https://github.com/PowerShell/DSC/pull/927 +[#929]: https://github.com/PowerShell/DSC/pull/929 +[#939]: https://github.com/PowerShell/DSC/pull/939 +[#936]: https://github.com/PowerShell/DSC/pull/936 +[#919]: https://github.com/PowerShell/DSC/pull/919 + +[#685]: https://github.com/PowerShell/DSC/issues/685 +[#972]: https://github.com/PowerShell/DSC/issues/972 +[#50]: https://github.com/PowerShell/DSC/issues/50 +[#976]: https://github.com/PowerShell/DSC/issues/976 +[#885]: https://github.com/PowerShell/DSC/issues/885 +[#853]: https://github.com/PowerShell/DSC/issues/853 +[#923]: https://github.com/PowerShell/DSC/issues/923 +[#967]: https://github.com/PowerShell/DSC/issues/967 + +[#908]: https://github.com/PowerShell/DSC/pull/908 +[#959]: https://github.com/PowerShell/DSC/pull/959 +[#978]: https://github.com/PowerShell/DSC/pull/978 +[#975]: https://github.com/PowerShell/DSC/pull/975 +[#979]: https://github.com/PowerShell/DSC/pull/979 +[#937]: https://github.com/PowerShell/DSC/pull/937 +[#907]: https://github.com/PowerShell/DSC/pull/907 +[#946]: https://github.com/PowerShell/DSC/pull/946 +[#958]: https://github.com/PowerShell/DSC/pull/958 +[#971]: https://github.com/PowerShell/DSC/pull/971 +[#989]: https://github.com/PowerShell/DSC/pull/989 +[#955]: https://github.com/PowerShell/DSC/pull/955 +[#964]: https://github.com/PowerShell/DSC/pull/964 +[#969]: https://github.com/PowerShell/DSC/pull/969 +[#876]: https://github.com/PowerShell/DSC/pull/876 +[#877]: https://github.com/PowerShell/DSC/pull/877 From b3acce1d46892b206815437a46953b2fb0191a24 Mon Sep 17 00:00:00 2001 From: "G.Reijn" Date: Tue, 19 Aug 2025 15:59:55 +0200 Subject: [PATCH 14/37] Update changelog --- CHANGELOG.md | 27 +++++- docs/prerelease-changelog.md | 174 +++++++++++++++++------------------ 2 files changed, 109 insertions(+), 92 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9d1093e7b..4b6ef80bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,7 +42,7 @@ To see the changes for the earlier development of DSC before version `3.0.0`, se [m1]: https://keepachangelog.com/en/1.1.0/ [m2]: https://semver.org/spec/v2.0.0.html -[m3]: https://github.com/PowerShell/DSC/blob/main/CHANGELOG.md +[m3]: https://github.com/PowerShell/DSC/blob/main/docs/prerelease-changelog.md ## Unreleased @@ -50,7 +50,7 @@ This section includes a summary of user-facing changes since the last release. F changes since the last release, see the [diff on GitHub][unreleased]. -[unreleased]: https://github.com/PowerShell/DSC/compare/v3.0.2...main +[unreleased]: https://github.com/PowerShell/DSC/compare/v3.1.1...main +## [v3.1.1][release-v3.1.1] - 2025-07-14 + +This section includes a summary of changes for the `3.1.1` patch release. For the +full list of changes in this release, see the +[diff on GitHub][compare-v3.1.1]. + + +[release-v3.1.1]: https://github.com/PowerShell/DSC/releases/tag/v3.1.1 "Link to the DSC v3.1.1 release on GitHub" +[compare-v3.1.1]: https://github.com/PowerShell/DSC/compare/v3.1.0...v3.1.1 + +### Fixed + +- Backport: Fix default output to YAML when used interactively. + +
Related work items + + - Issues: [#918][#918] + - PRs: [#960][#960] + +
+ ## [v3.1.0][release-v3.1.0] - 2025-06-18 This section includes a summary of changes for the `3.1.0` release. For the full list of changes @@ -662,3 +683,5 @@ Version `3.0.0` is the first generally available release of DSC. [#862]: https://github.com/PowerShell/DSC/issues/862 [#834]: https://github.com/PowerShell/DSC/issues/834 [#863]: https://github.com/PowerShell/DSC/issues/863 +[#918]: https://github.com/PowerShell/DSC/issues/918 +[#960]: https://github.com/PowerShell/DSC/issues/960 \ No newline at end of file diff --git a/docs/prerelease-changelog.md b/docs/prerelease-changelog.md index 60b03d056..591e38b44 100644 --- a/docs/prerelease-changelog.md +++ b/docs/prerelease-changelog.md @@ -86,7 +86,8 @@ changes in this release, see the [diff on GitHub][compare-v3.2.0-preview.3]. ### Added -- Add support for `secret()` function and "secret" extensions to retrieve secrets during configuration evaluation. +- Add support for `secret()` function and "secret" extensions to retrieve + secrets during configuration evaluation.
Related work items @@ -104,7 +105,8 @@ changes in this release, see the [diff on GitHub][compare-v3.2.0-preview.3].
-- Add `condition` support for resource instances within a configuration document. +- Add `condition` support for resource instances within a configuration + document.
Related work items @@ -113,7 +115,8 @@ changes in this release, see the [diff on GitHub][compare-v3.2.0-preview.3].
-- Enable resources to return `_restartRequired` metadata that aggregates at the configuration result level. +- Enable resources to return `_restartRequired` metadata that aggregates at the + configuration result level.
Related work items @@ -122,7 +125,8 @@ changes in this release, see the [diff on GitHub][compare-v3.2.0-preview.3].
-- Add remaining logical functions to the function library: `and`, `bool`, `false`, `true`, `not`, `or`. +- Add remaining logical functions to the function library: `and`, `bool`, + `false`, `true`, `not`, `or`.
Related work items @@ -131,7 +135,9 @@ changes in this release, see the [diff on GitHub][compare-v3.2.0-preview.3].
-- Introduce inline script resources: `Microsoft.DSC.Transitional/PowerShellScript` and `Microsoft.DSC.Transitional/WindowsPowerShellScript`. +- Introduce inline script resources: + `Microsoft.DSC.Transitional/PowerShellScript` and + `Microsoft.DSC.Transitional/WindowsPowerShellScript`.
Related work items @@ -171,7 +177,8 @@ changes in this release, see the [diff on GitHub][compare-v3.2.0-preview.3]. ### Fixed -- Correct trace message to use `results` and emit JSON for function evaluation traces. +- Correct trace message to use `results` and emit JSON for function evaluation + traces.
Related work items @@ -189,7 +196,8 @@ changes in this release, see the [diff on GitHub][compare-v3.2.0-preview.3].
-- Adapter capability discovery: fix discovery of capabilities in the PowerShell adapter and Windows PowerShell adapter. +- Adapter capability discovery: fix discovery of capabilities in the PowerShell + adapter and Windows PowerShell adapter.
Related work items @@ -200,8 +208,9 @@ changes in this release, see the [diff on GitHub][compare-v3.2.0-preview.3]. ## [v3.2.0-preview.2][release-v3.2.0-preview.2] - 2025-07-11 -This section includes a summary of changes for the `v3.2.0-preview.2` release. For the full list of -changes in this release, see the [diff on GitHub][compare-v3.2.0-preview.2]. +This section includes a summary of changes for the `v3.2.0-preview.2` release. +For the full list of changes in this release, see the +[diff on GitHub][compare-v3.2.0-preview.2]. [release-v3.2.0-preview.2]: https://github.com/PowerShell/DSC/releases/tag/v3.2.0-preview.2 "Link to the DSC v3.2.0-preview.2 release on GitHub" @@ -209,7 +218,8 @@ changes in this release, see the [diff on GitHub][compare-v3.2.0-preview.2]. ### Added -- Enable resources to return metadata that DSC merges into the resource result output's `metadata`. +- Enable resources to return metadata that DSC merges into the resource result + output's `metadata`.
Related work items @@ -220,7 +230,8 @@ changes in this release, see the [diff on GitHub][compare-v3.2.0-preview.2]. ### Changed -- Rename `Microsoft.Windows/sshd_config` resource to `Microsoft/sshd_config` to reflect cross-platform scope. +- Rename `Microsoft.Windows/sshd_config` resource to + `Microsoft/sshd_config` to reflect cross-platform scope.
Related work items @@ -240,7 +251,8 @@ changes in this release, see the [diff on GitHub][compare-v3.2.0-preview.2].
-- Fix property discovery for class-based resources in the Windows PowerShell adapter. +- Fix property discovery for class-based resources in the Windows + PowerShell adapter.
Related work items @@ -269,7 +281,8 @@ changes in this release, see the [diff on GitHub][compare-v3.2.0-preview.1]. ### Added -- Add `sshdconfig` project providing resources to manage OpenSSH server configuration on Windows. +- Add `sshdconfig` project providing resources to manage OpenSSH server + configuration on Windows.
Related work items @@ -278,7 +291,8 @@ changes in this release, see the [diff on GitHub][compare-v3.2.0-preview.1].
-- Windows RebootPending resource: include pending reboot reason in the result output. +- `Microsoft.Windows/RebootPending` resource: include pending reboot reason in the result + output.
Related work items @@ -289,7 +303,8 @@ changes in this release, see the [diff on GitHub][compare-v3.2.0-preview.1]. ### Changed -- Export output: surface `_kind`, `_securityContext`, and `_name` fields from resources during export. +- Export output: surface `_kind`, `_securityContext`, and `_name` fields from + resources during export.
Related work items @@ -298,7 +313,8 @@ changes in this release, see the [diff on GitHub][compare-v3.2.0-preview.1].
-- Registry internals: separate shared helper into a library and refactor registry implementation. +- Registry internals: separate shared helper into a library and refactor + registry implementation.
Related work items @@ -318,7 +334,8 @@ changes in this release, see the [diff on GitHub][compare-v3.2.0-preview.1]. ### Fixed -- Fix regression in default output for `get --all` (ensure interactive default output is correct). +- Fix regression in default output for `get --all` (ensure interactive default + output is correct).
Related work items @@ -338,7 +355,8 @@ in this release, see the [diff on GitHub][compare-v3.1.0-rc.1]. ### Added -- Enable reading parameters from STDIN by allowing the parameters file name `-`. +- Enable reading parameters from STDIN by allowing the parameters file name + `-`.
Related work items @@ -347,7 +365,8 @@ in this release, see the [diff on GitHub][compare-v3.1.0-rc.1].
-- Add `pass-through` output format for `dsc resource get` to emit the resource's JSON without a DSC wrapper. +- Add `pass-through` output format for `dsc resource get` to emit the + resource's JSON without a DSC wrapper.
Related work items @@ -358,7 +377,8 @@ in this release, see the [diff on GitHub][compare-v3.1.0-rc.1]. ### Changed -- Windows RebootPending resource: convert the pending reboot value to an object (removes a read-only property and keeps the field optional). +- `Microsoft.Windows/RebootPending` resource: convert the pending reboot value to an + object (removes a read-only property and keeps the field optional).
Related work items @@ -369,7 +389,8 @@ in this release, see the [diff on GitHub][compare-v3.1.0-rc.1]. ### Fixed -- Fix regression in default output for `get --all` (ensure interactive default output is correct). +- Fix regression in default output for `get --all` (ensure interactive + default output is correct).
Related work items @@ -398,7 +419,8 @@ changes in this release, see the [diff on GitHub][compare-v3.1.0-preview.7].
-- Add `json-array` as a supported output format for `dsc resource get --all` to return a single JSON array instead of JSON Lines. +- Add `json-array` as a supported output format for `dsc resource get --all` + to return a single JSON array instead of JSON Lines.
Related work items @@ -409,7 +431,8 @@ changes in this release, see the [diff on GitHub][compare-v3.1.0-preview.7]. ### Changed -- Appx discovery extension: set execution policy to `Bypass` so it runs under restricted policies. +- Appx discovery extension: set execution policy to `Bypass` so it runs under + restricted policies.
Related work items @@ -418,7 +441,9 @@ changes in this release, see the [diff on GitHub][compare-v3.1.0-preview.7].
-- Respect `DSC_RESOURCE_PATH` for executable lookup by aligning the process `PATH` to the same value so executable search is limited to `DSC_RESOURCE_PATH`. +- Respect `DSC_RESOURCE_PATH` for executable lookup by aligning the process + `PATH` to the same value so executable search is limited to + `DSC_RESOURCE_PATH`.
Related work items @@ -429,7 +454,8 @@ changes in this release, see the [diff on GitHub][compare-v3.1.0-preview.7]. ### Fixed -- Improve error message when duplicate resource names are detected during `set`. +- Improve error message when duplicate resource names are detected during + `set`.
Related work items @@ -438,7 +464,8 @@ changes in this release, see the [diff on GitHub][compare-v3.1.0-preview.7].
-- Windows registry resource: treat deleting a non-existing key/value as success instead of erroring. +- `Microsoft.Windows/Registry` resource: treat deleting a non-existing key/value as + success instead of erroring.
Related work items @@ -467,7 +494,9 @@ changes in this release, see the [diff on GitHub][compare-v3.1.0-preview.6]. ### Added -- Experimental Appx resource discovery extension to discover resources packaged in Appx; also removes duplicate discoveries by type name and version. +- Experimental Appx resource discovery extension to discover resources + packaged in Appx; also removes duplicate discoveries by type name and + version.
Related work items @@ -476,7 +505,8 @@ changes in this release, see the [diff on GitHub][compare-v3.1.0-preview.6].
-- Add `table-no-truncate` format option to `dsc resource list` and `dsc extension list` to avoid truncating wide tables in narrow consoles. +- Add `table-no-truncate` format option to `dsc resource list` and + `dsc extension list` to avoid truncating wide tables in narrow consoles.
Related work items @@ -487,7 +517,9 @@ changes in this release, see the [diff on GitHub][compare-v3.1.0-preview.6]. ### Changed -- Windows PowerShell adapter: allow a workaround to detect class-based resources using type instances so class-based PSDSC resources are discoverable. +- Windows PowerShell adapter: allow a workaround to detect class-based + resources using type instances so class-based PSDSC resources are + discoverable.
Related work items @@ -496,7 +528,8 @@ changes in this release, see the [diff on GitHub][compare-v3.1.0-preview.6].
-- WMI adapter: set execution policy to `Bypass` to align with PowerShell adapters and avoid failures under restricted policies. +- WMI adapter: set execution policy to `Bypass` to align with PowerShell + adapters and avoid failures under restricted policies.
Related work items @@ -507,7 +540,8 @@ changes in this release, see the [diff on GitHub][compare-v3.1.0-preview.6]. ### Fixed -- Export adapted resources correctly by aligning `export` output to use the `result` property and fixing the test adapter. +- Export adapted resources correctly by aligning `export` output to use the + `result` property and fixing the test adapter.
Related work items @@ -516,7 +550,9 @@ changes in this release, see the [diff on GitHub][compare-v3.1.0-preview.6].
-- Windows PowerShell adapter caching: ensure full refresh when `PSModulePath` changes and on cold cache to avoid broken cache states from targeted refreshes. +- Windows PowerShell adapter caching: ensure full refresh when + `PSModulePath` changes and on cold cache to avoid broken cache states from + targeted refreshes.
Related work items @@ -525,7 +561,9 @@ changes in this release, see the [diff on GitHub][compare-v3.1.0-preview.6].
-- Class-based detection: add validation ensuring the type instance has the `DscResource` attribute to avoid false positives for types with matching names. +- Class-based detection: add validation ensuring the type instance has the + `DscResource` attribute to avoid false positives for types with matching + names.
Related work items @@ -635,8 +673,8 @@ changes in this release, see the [diff on GitHub][compare-v3.1.0-preview.4]. ### Added -- Add credential support on PowerShell adapters to create PSCredential objects from input when the - target property expects a credential. +- Add credential support on PowerShell adapters to create PSCredential + objects from input when the target property expects a credential.
Related work items @@ -647,9 +685,9 @@ changes in this release, see the [diff on GitHub][compare-v3.1.0-preview.4]. ### Changed -- Prefer Windows PowerShell modules first in the Windows PowerShell adapter by prepending the - Windows module path; add a warning when a resource isn't found (resource must be installed for - AllUsers). +- Prefer Windows PowerShell modules first in the Windows PowerShell adapter by + prepending the Windows module path; add a warning when a resource isn't + found (resource must be installed for AllUsers).
Related work items @@ -660,8 +698,8 @@ changes in this release, see the [diff on GitHub][compare-v3.1.0-preview.4]. ### Fixed -- Fix resource cache behavior when PowerShell modules are installed during a run so subsequent - modules aren't lost from the cache. +- Fix resource cache behavior when PowerShell modules are installed during a + run so subsequent modules aren't lost from the cache.
Related work items @@ -690,8 +728,8 @@ changes in this release, see the [diff on GitHub][compare-v3.1.0-preview.3].
-- Set `Bypass` execution policy when calling PowerShell from the adapter to avoid failures on - Windows with restricted execution policy. +- Set `Bypass` execution policy when calling PowerShell from the adapter to + avoid failures on Windows with restricted execution policy.
Related work items @@ -722,7 +760,8 @@ changes in this release, see the [diff on GitHub][compare-v3.1.0-preview.2]. ### Added -- Add validation to check key-value pairs for class-based and script-based DSC resources. +- Add validation to check key-value pairs for class-based and script-based DSC + resources.
Related work items @@ -2852,26 +2891,16 @@ For the full list of changes in this release, see the [diff on GitHub][compare-v [cmd]: ./docs/reference/cli/dsc.md -[cmd-completion]: ./docs/reference/cli/completer/command.md -[cmd-schema]: ./docs/reference/cli/schema/command.md -[cmd-c]: ./docs/reference/cli/config/command.md [cmd-cexport]: ./docs/reference/cli/config/export.md -[cmd-cget]: ./docs/reference/cli/config/get.md [cmd-cset]: ./docs/reference/cli/config/set.md -[cmd-ctest]: ./docs/reference/cli/config/test.md -[cmd-r]: ./docs/reference/cli/resource/command.md [cmd-rdelete]: ./docs/reference/cli/resource/delete.md [cmd-rexport]: ./docs/reference/cli/resource/export.md [cmd-rget]: ./docs/reference/cli/resource/get.md [cmd-rlist]: ./docs/reference/cli/resource/list.md -[cmd-rschema]: ./docs/reference/cli/resource/schema.md [cmd-rset]: ./docs/reference/cli/resource/set.md -[cmd-rtest]: ./docs/reference/cli/resource/test.md [cfuncs]: ./docs/reference/schemas/config/functions/overview.md [add()]: ./docs/reference/schemas/config/functions/add.md -[base64()]: ./docs/reference/schemas/config/functions/base64.md -[concat()]: ./docs/reference/schemas/config/functions/concat.md [createArray()]: ./docs/reference/schemas/config/functions/createArray.md [div()]: ./docs/reference/schemas/config/functions/div.md [envvar()]: ./docs/reference/schemas/config/functions/envvar.md @@ -2880,9 +2909,7 @@ For the full list of changes in this release, see the [diff on GitHub][compare-v [min()]: ./docs/reference/schemas/config/functions/min.md [mod()]: ./docs/reference/schemas/config/functions/mod.md [mul()]: ./docs/reference/schemas/config/functions/mul.md -[parameters()]: ./docs/reference/schemas/config/functions/parameters.md [reference()]: ./docs/reference/schemas/config/functions/reference.md -[resourceId()]: ./docs/reference/schemas/config/functions/resourceId.md [sub()]: ./docs/reference/schemas/config/functions/sub.md @@ -3149,13 +3176,6 @@ For the full list of changes in this release, see the [diff on GitHub][compare-v [#763]: https://github.com/PowerShell/DSC/issues/763 [#797]: https://github.com/PowerShell/DSC/pull/797 [#798]: https://github.com/PowerShell/DSC/issues/798 -[#734]: https://github.com/PowerShell/DSC/pull/734 -[#717]: https://github.com/PowerShell/DSC/issues/717 -[#708]: https://github.com/PowerShell/DSC/issues/708 -[#819]: https://github.com/PowerShell/DSC/pull/819 -[#818]: https://github.com/PowerShell/DSC/issues/818 -[#820]: https://github.com/PowerShell/DSC/pull/820 -[#821]: https://github.com/PowerShell/DSC/pull/821 [#782]: https://github.com/PowerShell/DSC/issues/782 [#789]: https://github.com/PowerShell/DSC/pull/789 [#807]: https://github.com/PowerShell/DSC/issues/807 @@ -3168,9 +3188,6 @@ For the full list of changes in this release, see the [diff on GitHub][compare-v [#811]: https://github.com/PowerShell/DSC/issues/811 [#813]: https://github.com/PowerShell/DSC/issues/813 [#814]: https://github.com/PowerShell/DSC/issues/814 -[#830]: https://github.com/PowerShell/DSC/pull/830 -[#837]: https://github.com/PowerShell/DSC/pull/837 -[#838]: https://github.com/PowerShell/DSC/pull/838 [#841]: https://github.com/PowerShell/DSC/issues/841 [#843]: https://github.com/PowerShell/DSC/issues/843 [#844]: https://github.com/PowerShell/DSC/pull/844 @@ -3195,41 +3212,22 @@ For the full list of changes in this release, see the [diff on GitHub][compare-v [#865]: https://github.com/PowerShell/DSC/pull/865 [#892]: https://github.com/PowerShell/DSC/pull/892 [#897]: https://github.com/PowerShell/DSC/pull/897 -[#891]: https://github.com/PowerShell/DSC/pull/891 [#874]: https://github.com/PowerShell/DSC/pull/874 -[#901]: https://github.com/PowerShell/DSC/pull/901 -[#900]: https://github.com/PowerShell/DSC/pull/900 -[#886]: https://github.com/PowerShell/DSC/pull/886 -[#888]: https://github.com/PowerShell/DSC/pull/888 -[#899]: https://github.com/PowerShell/DSC/pull/899 -[#857]: https://github.com/PowerShell/DSC/pull/857 + [#598]: https://github.com/PowerShell/DSC/issues/598 -[#665]: https://github.com/PowerShell/DSC/issues/665 -[#539]: https://github.com/PowerShell/DSC/issues/539 [#467]: https://github.com/PowerShell/DSC/issues/467 [#915]: https://github.com/PowerShell/DSC/issues/915 [#918]: https://github.com/PowerShell/DSC/issues/918 [#878]: https://github.com/PowerShell/DSC/issues/878 [#829]: https://github.com/PowerShell/DSC/issues/829 -[#921]: https://github.com/PowerShell/DSC/issues/921 -[#914]: https://github.com/PowerShell/DSC/issues/914 -[#909]: https://github.com/PowerShell/DSC/issues/909 [#947]: https://github.com/PowerShell/DSC/pull/947 [#932]: https://github.com/PowerShell/DSC/pull/932 [#920]: https://github.com/PowerShell/DSC/pull/920 [#879]: https://github.com/PowerShell/DSC/pull/879 [#944]: https://github.com/PowerShell/DSC/pull/944 -[#935]: https://github.com/PowerShell/DSC/pull/935 -[#902]: https://github.com/PowerShell/DSC/pull/902 -[#916]: https://github.com/PowerShell/DSC/pull/916 -[#910]: https://github.com/PowerShell/DSC/pull/910 -[#927]: https://github.com/PowerShell/DSC/pull/927 -[#929]: https://github.com/PowerShell/DSC/pull/929 -[#939]: https://github.com/PowerShell/DSC/pull/939 -[#936]: https://github.com/PowerShell/DSC/pull/936 -[#919]: https://github.com/PowerShell/DSC/pull/919 +[#820]: https://github.com/PowerShell/DSC/pull/820 [#685]: https://github.com/PowerShell/DSC/issues/685 [#972]: https://github.com/PowerShell/DSC/issues/972 @@ -3238,7 +3236,6 @@ For the full list of changes in this release, see the [diff on GitHub][compare-v [#885]: https://github.com/PowerShell/DSC/issues/885 [#853]: https://github.com/PowerShell/DSC/issues/853 [#923]: https://github.com/PowerShell/DSC/issues/923 -[#967]: https://github.com/PowerShell/DSC/issues/967 [#908]: https://github.com/PowerShell/DSC/pull/908 [#959]: https://github.com/PowerShell/DSC/pull/959 @@ -3249,10 +3246,7 @@ For the full list of changes in this release, see the [diff on GitHub][compare-v [#907]: https://github.com/PowerShell/DSC/pull/907 [#946]: https://github.com/PowerShell/DSC/pull/946 [#958]: https://github.com/PowerShell/DSC/pull/958 -[#971]: https://github.com/PowerShell/DSC/pull/971 -[#989]: https://github.com/PowerShell/DSC/pull/989 [#955]: https://github.com/PowerShell/DSC/pull/955 [#964]: https://github.com/PowerShell/DSC/pull/964 -[#969]: https://github.com/PowerShell/DSC/pull/969 [#876]: https://github.com/PowerShell/DSC/pull/876 [#877]: https://github.com/PowerShell/DSC/pull/877 From eb31259e7f52b21d4154ac655294976e62d3c7f6 Mon Sep 17 00:00:00 2001 From: "G.Reijn" Date: Tue, 19 Aug 2025 16:03:22 +0200 Subject: [PATCH 15/37] Remove whitespace --- CHANGELOG.md | 2 +- docs/prerelease-changelog.md | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b6ef80bd..ddae90a13 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -684,4 +684,4 @@ Version `3.0.0` is the first generally available release of DSC. [#834]: https://github.com/PowerShell/DSC/issues/834 [#863]: https://github.com/PowerShell/DSC/issues/863 [#918]: https://github.com/PowerShell/DSC/issues/918 -[#960]: https://github.com/PowerShell/DSC/issues/960 \ No newline at end of file +[#960]: https://github.com/PowerShell/DSC/issues/960 diff --git a/docs/prerelease-changelog.md b/docs/prerelease-changelog.md index 591e38b44..4c0134e5e 100644 --- a/docs/prerelease-changelog.md +++ b/docs/prerelease-changelog.md @@ -3100,7 +3100,6 @@ For the full list of changes in this release, see the [diff on GitHub][compare-v [#89]: https://github.com/PowerShell/DSC/issues/89 [#98]: https://github.com/PowerShell/DSC/issues/98 [#537]: https://github.com/PowerShell/DSC/issues/537 - [#282]: https://github.com/PowerShell/DSC/issues/282 [#534]: https://github.com/PowerShell/DSC/issues/534 [#578]: https://github.com/PowerShell/DSC/issues/578 @@ -3184,7 +3183,6 @@ For the full list of changes in this release, see the [diff on GitHub][compare-v [#791]: https://github.com/PowerShell/DSC/issues/791 [#800]: https://github.com/PowerShell/DSC/pull/800 [#823]: https://github.com/PowerShell/DSC/pull/823 - [#811]: https://github.com/PowerShell/DSC/issues/811 [#813]: https://github.com/PowerShell/DSC/issues/813 [#814]: https://github.com/PowerShell/DSC/issues/814 @@ -3198,7 +3196,6 @@ For the full list of changes in this release, see the [diff on GitHub][compare-v [#861]: https://github.com/PowerShell/DSC/pull/861 [#825]: https://github.com/PowerShell/DSC/pull/825 [#832]: https://github.com/PowerShell/DSC/issues/832 - [#834]: https://github.com/PowerShell/DSC/issues/834 [#858]: https://github.com/PowerShell/DSC/issues/858 [#866]: https://github.com/PowerShell/DSC/issues/866 @@ -3213,22 +3210,18 @@ For the full list of changes in this release, see the [diff on GitHub][compare-v [#892]: https://github.com/PowerShell/DSC/pull/892 [#897]: https://github.com/PowerShell/DSC/pull/897 [#874]: https://github.com/PowerShell/DSC/pull/874 - [#598]: https://github.com/PowerShell/DSC/issues/598 - [#467]: https://github.com/PowerShell/DSC/issues/467 [#915]: https://github.com/PowerShell/DSC/issues/915 [#918]: https://github.com/PowerShell/DSC/issues/918 [#878]: https://github.com/PowerShell/DSC/issues/878 [#829]: https://github.com/PowerShell/DSC/issues/829 - [#947]: https://github.com/PowerShell/DSC/pull/947 [#932]: https://github.com/PowerShell/DSC/pull/932 [#920]: https://github.com/PowerShell/DSC/pull/920 [#879]: https://github.com/PowerShell/DSC/pull/879 [#944]: https://github.com/PowerShell/DSC/pull/944 [#820]: https://github.com/PowerShell/DSC/pull/820 - [#685]: https://github.com/PowerShell/DSC/issues/685 [#972]: https://github.com/PowerShell/DSC/issues/972 [#50]: https://github.com/PowerShell/DSC/issues/50 @@ -3236,7 +3229,6 @@ For the full list of changes in this release, see the [diff on GitHub][compare-v [#885]: https://github.com/PowerShell/DSC/issues/885 [#853]: https://github.com/PowerShell/DSC/issues/853 [#923]: https://github.com/PowerShell/DSC/issues/923 - [#908]: https://github.com/PowerShell/DSC/pull/908 [#959]: https://github.com/PowerShell/DSC/pull/959 [#978]: https://github.com/PowerShell/DSC/pull/978 From cb05c11237e4143676f10466f7e582e3f1d13b4c Mon Sep 17 00:00:00 2001 From: "G.Reijn" Date: Wed, 20 Aug 2025 12:31:23 +0200 Subject: [PATCH 16/37] Add latest reliease --- docs/prerelease-changelog.md | 149 ++++++++++++++++++++++++++++++++++- 1 file changed, 147 insertions(+), 2 deletions(-) diff --git a/docs/prerelease-changelog.md b/docs/prerelease-changelog.md index 4c0134e5e..ed03aa3b2 100644 --- a/docs/prerelease-changelog.md +++ b/docs/prerelease-changelog.md @@ -8,7 +8,7 @@ ms.date: 06/24/2024 # Changelog - + -[unreleased]: https://github.com/PowerShell/DSC/compare/v3.2.0-preview.3...main +[unreleased]: https://github.com/PowerShell/DSC/compare/v3.2.0-preview.4...main +[release-v3.2.0-preview.4]: https://github.com/PowerShell/DSC/releases/tag/v3.2.0-preview.4 "Link to the DSC v3.2.0-preview.4 release on GitHub" +[compare-v3.2.0-preview.4]: https://github.com/PowerShell/DSC/compare/v3.2.0-preview.3...v3.2.0-preview.4 + +### Added + +- Add comparison operators: `Less`, `LessOrEquals`, `Greater`, and + `GreaterOrEquals`. + +
Related work items + + - Issues: [#988][#988] + - PRs: [#990][#990], [#998][#998] + +
+ +- Add Bicep extension support to work with Bicep files. + +
Related work items + + - Issues: _None_. + - PRs: [#997][#997] + +
+ +- Add array functions: `contains()`, `union()`, `length()`, and `empty()`. + +
Related work items + + - Issues: _None_. + - PRs: [#1005][#1005], [#1039][#1039], [#1043][#1043] + +
+ +- Add string and utility functions: `string()`, `endsWith()`, `startsWith()`, + `uniqueString()`, and `utcNow()`. + +
Related work items + + - Issues: _None_. + - PRs: [#1040][#1040], [#1032][#1032], [#1045][#1045] + +
+ +### Changed + +- Align the `Resource` schema to match ARM conventions. + +
Related work items + + - Issues: [#980][#980] + - PRs: [#995][#995] + +
+ +- Improve duplicate resource error messages to include the resource type + name. + +
Related work items + + - Issues: [#1022][#1022] + - PRs: [#1029][#1029] + +
+ +- OSInfo: have export return `_name` for consistency with other resources. + +
Related work items + + - Issues: _None_. + - PRs: [#1038][#1038] + +
+ +- Secret extensions: require emitting the secret as plaintext to STDOUT with a + trailing newline (no JSON wrapper). Multiple lines to STDOUT is an error. + Also fix extensions that referenced the resource schema instead of the + extension schema, and reformat a use statement for readability. + +
Related work items + + - Issues: _None_. + - PRs: [#1046][#1046] + +
+ +- CLI/Adapters: treat a resource without `export` as usable with `get` when + listing or invoking. + +
Related work items + + - Issues: [#428][#428] + - PRs: [#1035][#1035] + +
+ +- Functions metadata: refactor how functions return metadata and include + return type information in listings. + +
Related work items + + - Issues: _None_. + - PRs: [#1028][#1028] + +
+ +### Fixed + +- Fix parsing so expressions aren't re-parsed when passed to adapted + resources. + +
Related work items + + - Issues: [#1024][#1024] + - PRs: [#1031][#1031] + +
+ ## [v3.2.0-preview.3][release-v3.2.0-preview.3] - 2025-07-19 This section includes a summary of changes for the `v3.2.0-preview.3` release. For the full list of @@ -3242,3 +3366,24 @@ For the full list of changes in this release, see the [diff on GitHub][compare-v [#964]: https://github.com/PowerShell/DSC/pull/964 [#876]: https://github.com/PowerShell/DSC/pull/876 [#877]: https://github.com/PowerShell/DSC/pull/877 +[#428]: https://github.com/PowerShell/DSC/issues/428 +[#980]: https://github.com/PowerShell/DSC/issues/980 +[#988]: https://github.com/PowerShell/DSC/issues/988 +[#990]: https://github.com/PowerShell/DSC/pull/990 +[#995]: https://github.com/PowerShell/DSC/pull/995 +[#997]: https://github.com/PowerShell/DSC/pull/997 +[#998]: https://github.com/PowerShell/DSC/pull/998 +[#1005]: https://github.com/PowerShell/DSC/pull/1005 +[#1022]: https://github.com/PowerShell/DSC/issues/1022 +[#1024]: https://github.com/PowerShell/DSC/issues/1024 +[#1028]: https://github.com/PowerShell/DSC/pull/1028 +[#1029]: https://github.com/PowerShell/DSC/pull/1029 +[#1031]: https://github.com/PowerShell/DSC/pull/1031 +[#1032]: https://github.com/PowerShell/DSC/pull/1032 +[#1035]: https://github.com/PowerShell/DSC/pull/1035 +[#1038]: https://github.com/PowerShell/DSC/pull/1038 +[#1039]: https://github.com/PowerShell/DSC/pull/1039 +[#1040]: https://github.com/PowerShell/DSC/pull/1040 +[#1043]: https://github.com/PowerShell/DSC/pull/1043 +[#1045]: https://github.com/PowerShell/DSC/pull/1045 +[#1046]: https://github.com/PowerShell/DSC/pull/1046 From f70b84ab723beb32f09b011b073662070c21b5ff Mon Sep 17 00:00:00 2001 From: Steve Lee Date: Thu, 16 Apr 2026 17:19:23 -0700 Subject: [PATCH 17/37] Update version to 3.3-preview.1 --- Cargo.lock | 291 +++++++++++++++++--------------------- Cargo.toml | 62 ++++---- dsc/Cargo.toml | 2 +- dsc/src/mcp/mcp_server.rs | 2 +- 4 files changed, 161 insertions(+), 196 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 739adf4f8..621494359 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -310,9 +310,9 @@ checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" [[package]] name = "cc" -version = "1.2.52" +version = "1.2.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd4932aefd12402b36c60956a4fe0035421f544799057659ff86f923657aada3" +checksum = "43c5703da9466b66a946814e1adf53ea2c90f10063b86290cc9eb67ce3478a20" dependencies = [ "find-msvc-tools", "shlex", @@ -332,9 +332,9 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "chrono" -version = "0.4.42" +version = "0.4.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "145052bdd345b87320e369255277e3fb5152762ad123a901ef5c262dd38fe8d2" +checksum = "c673075a2e0e5f4a1dde27ce9dee1ea4558c7ffe648f576438a20ca1d2acc4b0" dependencies = [ "iana-time-zone", "js-sys", @@ -346,9 +346,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.6.0" +version = "4.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b193af5b67834b676abd72466a96c1024e6a6ad978a1f484bd90b85c94041351" +checksum = "1ddb117e43bbf7dacf0a4190fef4d345b9bad68dfc649cb349e7d17d28428e51" dependencies = [ "clap_builder", "clap_derive", @@ -368,18 +368,18 @@ dependencies = [ [[package]] name = "clap_complete" -version = "4.6.0" +version = "4.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19c9f1dde76b736e3681f28cec9d5a61299cbaae0fce80a68e43724ad56031eb" +checksum = "3ff7a1dccbdd8b078c2bdebff47e404615151534d5043da397ec50286816f9cb" dependencies = [ "clap", ] [[package]] name = "clap_derive" -version = "4.6.0" +version = "4.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1110bd8a634a1ab8cb04345d8d878267d57c3cf1b38d91b71af6686408bbca6a" +checksum = "f2ce8604710f6733aa641a2b3731eaa1e8b3d9973d5e3565da11800813f997a9" dependencies = [ "heck", "proc-macro2", @@ -515,12 +515,12 @@ dependencies = [ [[package]] name = "ctrlc" -version = "3.5.0" +version = "3.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "881c5d0a13b2f1498e2306e82cbada78390e152d4b1378fb28a84f4dcd0dc4f3" +checksum = "e0b1fab2ae45819af2d0731d60f2afe17227ebb1a1538a236da84c93e9a60162" dependencies = [ - "dispatch", - "nix 0.30.1", + "dispatch2", + "nix 0.31.2", "windows-sys 0.61.2", ] @@ -685,12 +685,6 @@ dependencies = [ "serde_json", ] -[[package]] -name = "dispatch" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" - [[package]] name = "dispatch2" version = "0.3.0" @@ -698,6 +692,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "89a09f22a6c6069a18470eb92d2298acf25463f14256d24778e1230d789a2aec" dependencies = [ "bitflags 2.9.4", + "block2", + "libc", "objc2", ] @@ -723,7 +719,7 @@ dependencies = [ [[package]] name = "dsc" -version = "3.2.0-preview.14" +version = "3.3.0-preview.1" dependencies = [ "clap", "clap_complete", @@ -743,7 +739,7 @@ dependencies = [ "serde_yaml", "syntect", "sysinfo", - "thiserror 2.0.17", + "thiserror 2.0.18", "tokio", "tokio-util", "tracing", @@ -803,7 +799,7 @@ dependencies = [ "serde_json", "serde_yaml", "test-case", - "thiserror 2.0.17", + "thiserror 2.0.18", "tokio", "tracing", "tracing-indicatif", @@ -828,7 +824,7 @@ dependencies = [ "schemars", "serde", "serde_json", - "thiserror 2.0.17", + "thiserror 2.0.18", "tracing", "url", "urlencoding", @@ -871,7 +867,7 @@ dependencies = [ "schemars", "serde", "serde_json", - "thiserror 2.0.17", + "thiserror 2.0.18", "tracing", "tracing-subscriber", "utfx", @@ -925,7 +921,7 @@ dependencies = [ "schemars", "serde", "serde_json", - "thiserror 2.0.17", + "thiserror 2.0.18", "tracing", "tracing-subscriber", "utfx", @@ -957,7 +953,7 @@ dependencies = [ "serde", "serde_json", "tempfile", - "thiserror 2.0.17", + "thiserror 2.0.18", "tracing", "tracing-subscriber", "tree-sitter", @@ -1014,12 +1010,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" -[[package]] -name = "env_home" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7f84e12ccf0a7ddc17a6c41c93326024c42920d7ee630d04950e6926645c0fe" - [[package]] name = "equivalent" version = "1.0.2" @@ -1066,9 +1056,9 @@ checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" [[package]] name = "find-msvc-tools" -version = "0.1.7" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f449e6c6c08c865631d4890cfacf252b3d396c9bcc83adb6623cdb02a8336c41" +checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" [[package]] name = "fixedbitset" @@ -1633,9 +1623,9 @@ dependencies = [ [[package]] name = "indicatif" -version = "0.18.0" +version = "0.18.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70a646d946d06bedbbc4cac4c218acf4bbf2d87757a784857025f4d447e4e1cd" +checksum = "25470f23803092da7d239834776d653104d551bc4d7eacaf31e6837854b8e9eb" dependencies = [ "console", "portable-atomic", @@ -1852,14 +1842,14 @@ dependencies = [ [[package]] name = "mio" -version = "1.0.4" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78bed444cc8a2160f01cbcf811ef18cac863ad68ae8ca62092e8db51d51c761c" +checksum = "50b7e5b27aa02a74bac8c3f23f448f8d87ff11f92d3aac1a6ed369ee08cc56c1" dependencies = [ "libc", "log", "wasi", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -2064,9 +2054,9 @@ dependencies = [ [[package]] name = "objc2-core-foundation" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c10c2894a6fed806ade6027bcd50662746363a9589d3ec9d9bef30a4e4bc166" +checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" dependencies = [ "bitflags 2.9.4", "dispatch2", @@ -2127,9 +2117,9 @@ dependencies = [ [[package]] name = "objc2-io-kit" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71c1c64d6120e51cd86033f67176b1cb66780c2efe34dec55176f77befd93c0a" +checksum = "33fafba39597d6dc1fb709123dfa8289d39406734be322956a69f0931c73bb15" dependencies = [ "libc", "objc2-core-foundation", @@ -2332,9 +2322,9 @@ dependencies = [ [[package]] name = "portable-atomic" -version = "1.11.1" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483" +checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49" [[package]] name = "potential_utf" @@ -2391,9 +2381,9 @@ dependencies = [ [[package]] name = "prost" -version = "0.14.1" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7231bd9b3d3d33c86b58adbac74b5ec0ad9f496b19d22801d773636feaa95f3d" +checksum = "d2ea70524a2f82d518bce41317d0fae74151505651af45faf1ffbd6fd33f0568" dependencies = [ "bytes", "prost-derive", @@ -2423,9 +2413,9 @@ dependencies = [ [[package]] name = "prost-derive" -version = "0.14.1" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9120690fafc389a67ba3803df527d0ec9cbbc9cc45e4cc20b332996dfb672425" +checksum = "27c6023962132f4b30eb4c172c91ce92d933da334c59c23cddee82358ddafb0b" dependencies = [ "anyhow", "itertools", @@ -2610,9 +2600,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.12.2" +version = "1.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4" +checksum = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276" dependencies = [ "aho-corasick", "memchr", @@ -2686,9 +2676,9 @@ dependencies = [ [[package]] name = "rmcp" -version = "1.3.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2231b2c085b371c01bc90c0e6c1cab8834711b6394533375bdbf870b0166d419" +checksum = "67d69668de0b0ccd9cc435f700f3b39a7861863cf37a15e1f304ea78688a4826" dependencies = [ "async-trait", "base64", @@ -2702,7 +2692,7 @@ dependencies = [ "schemars", "serde", "serde_json", - "thiserror 2.0.17", + "thiserror 2.0.18", "tokio", "tokio-util", "tracing", @@ -2711,9 +2701,9 @@ dependencies = [ [[package]] name = "rmcp-macros" -version = "1.3.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36ea0e100fadf81be85d7ff70f86cd805c7572601d4ab2946207f36540854b43" +checksum = "48fdc01c81097b0aed18633e676e269fefa3a78ec1df56b4fe597c1241b92025" dependencies = [ "darling 0.23.0", "proc-macro2", @@ -2734,12 +2724,11 @@ dependencies = [ [[package]] name = "rust-i18n" -version = "3.1.5" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fda2551fdfaf6cc5ee283adc15e157047b92ae6535cf80f6d4962d05717dc332" +checksum = "21031bf5e6f2c0ae745d831791c403608e99a8bd3776c7e5e5535acd70c3b7ba" dependencies = [ "globwalk", - "once_cell", "regex", "rust-i18n-macro", "rust-i18n-support", @@ -2748,12 +2737,11 @@ dependencies = [ [[package]] name = "rust-i18n-macro" -version = "3.1.5" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22baf7d7f56656d23ebe24f6bb57a5d40d2bce2a5f1c503e692b5b2fa450f965" +checksum = "51fe5295763b358606f7ca26a564e20f4469775a57ec1f09431249a33849ff52" dependencies = [ "glob", - "once_cell", "proc-macro2", "quote", "rust-i18n-support", @@ -2765,9 +2753,9 @@ dependencies = [ [[package]] name = "rust-i18n-support" -version = "3.1.5" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "940ed4f52bba4c0152056d771e563b7133ad9607d4384af016a134b58d758f19" +checksum = "69bcc115c8eea2803aa3d85362e339776f4988a0349f2f475af572e497443f6f" dependencies = [ "arc-swap", "base62", @@ -2775,7 +2763,6 @@ dependencies = [ "itertools", "lazy_static", "normpath", - "once_cell", "proc-macro2", "regex", "serde", @@ -2822,9 +2809,9 @@ dependencies = [ [[package]] name = "schemars" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54e910108742c57a770f492731f99be216a52fadd361b06c8fb59d74ccc267d2" +checksum = "a2b42f36aa1cd011945615b92222f6bf73c599a102a300334cd7f8dbeec726cc" dependencies = [ "chrono", "dyn-clone", @@ -2836,9 +2823,9 @@ dependencies = [ [[package]] name = "schemars_derive" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4908ad288c5035a8eb12cfdf0d49270def0a268ee162b75eeee0f85d155a7c45" +checksum = "7d115b50f4aaeea07e79c1912f645c7513d81715d0420f8bc77a18c6260b307f" dependencies = [ "proc-macro2", "quote", @@ -2854,9 +2841,9 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "semver" -version = "1.0.27" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" +checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" dependencies = [ "serde", "serde_core", @@ -2905,16 +2892,16 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.145" +version = "1.0.149" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c" +checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" dependencies = [ "indexmap", "itoa", "memchr", - "ryu", "serde", "serde_core", + "zmij", ] [[package]] @@ -2988,9 +2975,9 @@ dependencies = [ [[package]] name = "signal-hook-mio" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34db1a06d485c9142248b7a054f034b349b212551f3dfd19c94d45a754a217cd" +checksum = "b75a19a7a740b25bc7944bdee6172368f988763b744e3d4dfe753f6b4ece40cc" dependencies = [ "libc", "mio", @@ -3032,12 +3019,12 @@ checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" [[package]] name = "socket2" -version = "0.6.0" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "233504af464074f9d066d7b5416c5f9b894a5862a6506e306f7b816cdd6f1807" +checksum = "3a766e1110788c36f4fa1c2b71b387a7815aa65f88ce0229841826633d93723e" dependencies = [ "libc", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -3105,16 +3092,16 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "thiserror 2.0.17", + "thiserror 2.0.18", "walkdir", "yaml-rust", ] [[package]] name = "sysinfo" -version = "0.38.2" +version = "0.38.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1efc19935b4b66baa6f654ac7924c192f55b175c00a7ab72410fc24284dacda8" +checksum = "92ab6a2f8bfe508deb3c6406578252e491d299cbbf3bc0529ecc3313aee4a52f" dependencies = [ "libc", "memchr", @@ -3192,11 +3179,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.17" +version = "2.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f63587ca0f12b72a0600bcba1d40081f830876000bb46dd2337a3051618f4fc8" +checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4" dependencies = [ - "thiserror-impl 2.0.17", + "thiserror-impl 2.0.18", ] [[package]] @@ -3212,9 +3199,9 @@ dependencies = [ [[package]] name = "thiserror-impl" -version = "2.0.17" +version = "2.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913" +checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" dependencies = [ "proc-macro2", "quote", @@ -3273,9 +3260,9 @@ dependencies = [ [[package]] name = "tokio" -version = "1.50.0" +version = "1.52.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27ad5e34374e03cfffefc301becb44e9dc3c17584f414349ebe29ed26661822d" +checksum = "b67dee974fe86fd92cc45b7a95fdd2f99a36a6d7b0d431a231178d3d670bbcc6" dependencies = [ "bytes", "libc", @@ -3289,9 +3276,9 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.6.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af407857209536a95c8e56f8231ef2c2e2aff839b22e07a1ffcbc617e9db9fa5" +checksum = "385a6cb71ab9ab790c5fe8d67f1645e6c450a7ce006a33de03daa956cf70a496" dependencies = [ "proc-macro2", "quote", @@ -3300,9 +3287,9 @@ dependencies = [ [[package]] name = "tokio-stream" -version = "0.1.17" +version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047" +checksum = "32da49809aab5c3bc678af03902d4ccddea2a87d028d86392a4b1560c6906c70" dependencies = [ "futures-core", "pin-project-lite", @@ -3311,9 +3298,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.16" +version = "0.7.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14307c986784f72ef81c89db7d9e28d6ac26d16213b109ea501696195e6e3ce5" +checksum = "9ae9cec805b01e8fc3fd2fe289f89149a9b66dd16786abd8b19cfa7b48cb0098" dependencies = [ "bytes", "futures-core", @@ -3365,9 +3352,9 @@ checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801" [[package]] name = "tonic" -version = "0.14.2" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb7613188ce9f7df5bfe185db26c5814347d110db17920415cf2fbcad85e7203" +checksum = "fec7c61a0695dc1887c1b53952990f3ad2e3a31453e1f49f10e75424943a93ec" dependencies = [ "async-trait", "axum", @@ -3406,9 +3393,9 @@ dependencies = [ [[package]] name = "tonic-prost" -version = "0.14.2" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66bd50ad6ce1252d87ef024b3d64fe4c3cf54a86fb9ef4c631fdd0ded7aeaa67" +checksum = "a55376a0bbaa4975a3f10d009ad763d8f4108f067c7c2e74f3001fb49778d309" dependencies = [ "bytes", "prost", @@ -3417,9 +3404,9 @@ dependencies = [ [[package]] name = "tonic-prost-build" -version = "0.14.2" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4a16cba4043dc3ff43fcb3f96b4c5c154c64cbd18ca8dce2ab2c6a451d058a2" +checksum = "f3144df636917574672e93d0f56d7edec49f90305749c668df5101751bb8f95a" dependencies = [ "prettyplease", "proc-macro2", @@ -3433,9 +3420,9 @@ dependencies = [ [[package]] name = "tonic-reflection" -version = "0.14.2" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34da53e8387581d66db16ff01f98a70b426b091fdf76856e289d5c1bd386ed7b" +checksum = "aaf0685a51e6d02b502ba0764002e766b7f3042aed13d9234925b6ffbfa3fca7" dependencies = [ "prost", "prost-types", @@ -3496,9 +3483,9 @@ checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" -version = "0.1.41" +version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" +checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" dependencies = [ "pin-project-lite", "tracing-attributes", @@ -3507,9 +3494,9 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.30" +version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81383ab64e72a7a8b8e13130c49e3dab29def6d0c7d76a03087b3cf71c5c6903" +checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" dependencies = [ "proc-macro2", "quote", @@ -3518,9 +3505,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.34" +version = "0.1.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678" +checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" dependencies = [ "once_cell", "valuable", @@ -3528,9 +3515,9 @@ dependencies = [ [[package]] name = "tracing-indicatif" -version = "0.3.13" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04d4e11e0e27acef25a47f27e9435355fecdc488867fa2bc90e75b0700d2823d" +checksum = "e1ef6990e0438749f0080573248e96631171a0b5ddfddde119aa5ba8c3a9c47e" dependencies = [ "indicatif", "tracing", @@ -3561,9 +3548,9 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.20" +version = "0.3.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2054a14f5307d601f88daf0553e1cbf472acc4f2c51afab632431cdcd72124d5" +checksum = "cb7f578e5945fb242538965c2d0b04418d38ec25c79d160cd279bf0731c8d319" dependencies = [ "matchers", "nu-ansi-term", @@ -3582,9 +3569,9 @@ dependencies = [ [[package]] name = "tree-sitter" -version = "0.26.3" +version = "0.26.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "974d205cc395652cfa8b37daa053fe56eebd429acf8dc055503fee648dae981e" +checksum = "887bd495d0582c5e3e0d8ece2233666169fa56a9644d172fc22ad179ab2d0538" dependencies = [ "cc", "regex", @@ -3606,15 +3593,15 @@ dependencies = [ [[package]] name = "tree-sitter-language" -version = "0.1.5" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4013970217383f67b18aef68f6fb2e8d409bc5755227092d32efb0422ba24b8" +checksum = "009994f150cc0cd50ff54917d5bc8bffe8cad10ca10d81c34da2ec421ae61782" [[package]] name = "tree-sitter-rust" -version = "0.24.0" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b9b18034c684a2420722be8b2a91c9c44f2546b631c039edf575ccba8c61be1" +checksum = "439e577dbe07423ec2582ac62c7531120dbfccfa6e5f92406f93dd271a120e45" dependencies = [ "cc", "tree-sitter-language", @@ -3709,14 +3696,15 @@ checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" [[package]] name = "url" -version = "2.5.7" +version = "2.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08bc136a29a3d1758e07a9cca267be308aeebf5cfd5a10f3f67ab2097683ef5b" +checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" dependencies = [ "form_urlencoded", "idna", "percent-encoding", "serde", + "serde_derive", ] [[package]] @@ -3745,9 +3733,9 @@ checksum = "133bf74f01486773317ddfcde8e2e20d2933cc3b68ab797e5d718bef996a81de" [[package]] name = "uuid" -version = "1.23.0" +version = "1.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ac8b6f42ead25368cf5b098aeb3dc8a1a2c05a3eee8a9a1a68c640edbfc79d9" +checksum = "ddd74a9687298c6858e9b88ec8935ec45d22e8fd5e6394fa1bd4e99a87789c76" dependencies = [ "getrandom 0.4.1", "js-sys", @@ -3784,35 +3772,23 @@ checksum = "5c3082ca00d5a5ef149bb8b555a72ae84c9c59f7250f013ac822ac2e49b19c64" [[package]] name = "vt100" -version = "0.15.2" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84cd863bf0db7e392ba3bd04994be3473491b31e66340672af5d11943c6274de" +checksum = "054ff75fb8fa83e609e685106df4faeffdf3a735d3c74ebce97ec557d5d36fd9" dependencies = [ "itoa", - "log", - "unicode-width 0.1.14", + "unicode-width 0.2.2", "vte", ] [[package]] name = "vte" -version = "0.11.1" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5022b5fbf9407086c180e9557be968742d839e68346af7792b8592489732197" +checksum = "a5924018406ce0063cd67f8e008104968b74b563ee1b85dde3ed1f7cb87d3dbd" dependencies = [ "arrayvec", - "utf8parse", - "vte_generate_state_changes", -] - -[[package]] -name = "vte_generate_state_changes" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e369bee1b05d510a7b4ed645f5faa90619e05437111783ea5848f28d97d3c2e" -dependencies = [ - "proc-macro2", - "quote", + "memchr", ] [[package]] @@ -3986,13 +3962,11 @@ dependencies = [ [[package]] name = "which" -version = "8.0.0" +version = "8.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3fabb953106c3c8eea8306e4393700d7657561cb43122571b172bbfb7c7ba1d" +checksum = "81995fafaaaf6ae47a7d0cc83c67caf92aeb7e5331650ae6ff856f7c0c60c459" dependencies = [ - "env_home", - "rustix", - "winsafe", + "libc", ] [[package]] @@ -4200,15 +4174,6 @@ dependencies = [ "windows-targets 0.52.6", ] -[[package]] -name = "windows-sys" -version = "0.59.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" -dependencies = [ - "windows-targets 0.52.6", -] - [[package]] name = "windows-sys" version = "0.60.2" @@ -4394,12 +4359,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "winsafe" -version = "0.0.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d135d17ab770252ad95e9a872d365cf3090e3be864a34ab46f48555993efc904" - [[package]] name = "wit-bindgen" version = "0.46.0" @@ -4512,7 +4471,7 @@ dependencies = [ "schemars", "serde", "serde_json", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -4636,3 +4595,9 @@ dependencies = [ "quote", "syn", ] + +[[package]] +name = "zmij" +version = "1.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa" diff --git a/Cargo.toml b/Cargo.toml index 7cd0e980f..482b08567 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -149,23 +149,23 @@ base32 = { version = "0.5" } # dsc-lib base64 = { version = "0.22" } # dsc-lib, sshdconfig -chrono = { version = "0.4" } +chrono = { version = "0.4.44" } # dsc, dsc-lib, dsc-bicep-ext, dscecho, registry, runcommandonset, sshdconfig, dsctest, test_group_resource -clap = { version = "4.6", features = ["derive"] } +clap = { version = "4.6.1", features = ["derive"] } # dsc -clap_complete = { version = "4.6" } +clap_complete = { version = "4.6.2" } # dsc-lib const-str = {version = "1.1" } # dsc, registry, dsc-lib-registry, sshdconfig crossterm = { version = "0.29" } # dsc -ctrlc = { version = "3.5" } +ctrlc = { version = "3.5.2" } # dsc-lib-jsonschema-macros darling = { version = "0.23" } # dsc-lib derive_builder = { version = "0.20" } # dsc, dsc-lib -indicatif = { version = "0.18" } +indicatif = { version = "0.18.4" } # dsc-bicep-ext async-stream = { version = "0.3" } # dsc-lib-security_context::windows @@ -187,29 +187,29 @@ os_info = { version = "3.14" } # dsc, dsc-lib path-absolutize = { version = "3.1" } # dsc-bicep-ext -prost = { version = "0.14" } +prost = { version = "0.14.3" } # dsc-lib-jsonschema-macros proc-macro2 = { version = "1.0" } # dsc-lib-jsonschema-macros quote = { version = "1.0" } # dsc, dsc-lib -regex = { version = "1.12" } +regex = { version = "1.12.3" } # registry, dsc-lib, dsc-lib-registry, dsctest registry = { version = "1.3" } # dsc -rmcp = { version = "1.3" } +rmcp = { version = "1.5.0" } # dsc_lib rt-format = { version = "0.3" } # dsc, dsc-lib, dsc-bicep-ext, dscecho, registry, dsc-lib-registry, runcommandonset, sshdconfig -rust-i18n = { version = "3.1" } +rust-i18n = { version = "4.0.0" } # dsc, dsc-lib, dscecho, registry, dsc-lib-registry, sshdconfig, dsctest, test_group_resource -schemars = { version = "1.2", features = ["preserve_order"] } +schemars = { version = "1.2.1", features = ["preserve_order"] } # dsc, dsc-lib -semver = { version = "1.0" } +semver = { version = "1.0.28" } # dsc, dsc-lib, dscecho, dsc-lib-osinfo, process, registry, dsc-lib-registry, runcommandonset, sshdconfig, dsctest, test_group_resource serde = { version = "1.0", features = ["derive"] } # dsc, dsc-lib, dscecho, dsc-lib-osinfo, osinfo, process, registry, dsc-lib-registry, runcommandonset, sshdconfig, dsctest, test_group_resource, y2j -serde_json = { version = "1.0", features = ["preserve_order"] } +serde_json = { version = "1.0.149", features = ["preserve_order"] } # dsc, dsc-lib, y2j serde_yaml = { version = "0.9" } # dsc-lib-jsonschema-macros @@ -217,45 +217,45 @@ syn = { version = "2.0" } # dsc, y2j syntect = { version = "5.3", features = ["default-fancy"], default-features = false } # dsc, process -sysinfo = { version = "0.38" } +sysinfo = { version = "0.38.4" } # sshdconfig tempfile = { version = "3.27" } # dsc, dsc-lib, registry, dsc-lib-registry, sshdconfig -thiserror = { version = "2.0" } +thiserror = { version = "2.0.18" } # dsc, dsc-lib, dsc-bicep-ext -tokio = { version = "1.50" } +tokio = { version = "1.52.1" } # dsc-bicep-ext -tokio-stream = { version = "0.1" } +tokio-stream = { version = "0.1.18" } # dsc -tokio-util = { version = "0.7" } +tokio-util = { version = "0.7.18" } # dsc-bicep-ext -tonic = { version = "0.14" } +tonic = { version = "0.14.5" } # dsc-bicep-ext -tonic-prost = { version = "0.14" } +tonic-prost = { version = "0.14.5" } # dsc-bicep-ext -tonic-reflection = { version = "0.14" } +tonic-reflection = { version = "0.14.5" } # dsc, dsc-lib, dsc-bicep-ext, registry, dsc-lib-registry, runcommandonset, sshdconfig -tracing = { version = "0.1" } +tracing = { version = "0.1.44" } # dsc, dsc-lib -tracing-indicatif = { version = "0.3" } +tracing-indicatif = { version = "0.3.14" } # dsc, dsc-bicep-ext, registry, dsc-lib-registry, runcommandonset, sshdconfig -tracing-subscriber = { version = "0.3", features = ["ansi", "env-filter", "json"] } +tracing-subscriber = { version = "0.3.23", features = ["ansi", "env-filter", "json"] } # dsc-lib, sshdconfig, tree-sitter-dscexpression, tree-sitter-ssh-server-config -tree-sitter = { version = "0.26" } +tree-sitter = { version = "0.26.8" } # tree-sitter-dscexpression, tree-sitter-ssh-server-config -tree-sitter-language = { version = "0.1" } +tree-sitter-language = { version = "0.1.7" } # dsc-lib, sshdconfig, tree-sitter-dscexpression, tree-sitter-ssh-server-config -tree-sitter-rust = { version = "0.24" } +tree-sitter-rust = { version = "0.24.2" } # registry, dsc-lib-registry, dsctest utfx = { version = "0.1" } # dsc-lib -uuid = { version = "1.23", features = ["v4"] } +uuid = { version = "1.23.1", features = ["v4"] } # dsc-lib, dsc-lib-jsonschema -url = { version = "2.5" } +url = { version = "2.5.8" } # dsc-lib, dsc-lib-jsonschema urlencoding = { version = "2.1" } # dsc-lib -which = { version = "8.0" } +which = { version = "8.0.2" } # dsc-lib ipnetwork = { version = "0.21" } # WindowsUpdate, windows_service @@ -271,9 +271,9 @@ windows = { version = "0.62", features = [ # build-only dependencies # dsc-lib, dsc-lib-registry, sshdconfig, tree-sitter-dscexpression, tree-sitter-ssh-server-config -cc = { version = "1.2" } +cc = { version = "1.2.60" } # dsc -tonic-prost-build = { version = "0.14" } +tonic-prost-build = { version = "0.14.5" } # test-only dependencies # dsc-lib-jsonschema, dsc-lib diff --git a/dsc/Cargo.toml b/dsc/Cargo.toml index 58de39f86..a76bc448c 100644 --- a/dsc/Cargo.toml +++ b/dsc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "dsc" -version = "3.2.0-preview.14" +version = "3.3.0-preview.1" edition = "2024" [dependencies] diff --git a/dsc/src/mcp/mcp_server.rs b/dsc/src/mcp/mcp_server.rs index 7ac3b1dd1..272e8f471 100644 --- a/dsc/src/mcp/mcp_server.rs +++ b/dsc/src/mcp/mcp_server.rs @@ -36,7 +36,7 @@ impl Default for McpServer { } } -#[tool_handler] +#[tool_handler(router = self.tool_router)] impl ServerHandler for McpServer { fn get_info(&self) -> ServerInfo { let mut info = ServerInfo::new( From 9770a22e2fac9502fd3f64260ff2f34f616e8588 Mon Sep 17 00:00:00 2001 From: Steve Lee Date: Fri, 17 Apr 2026 12:05:25 -0700 Subject: [PATCH 18/37] Update deps --- Cargo.lock | 783 +++++++++++++++++++++++++---------------------------- Cargo.toml | 6 + 2 files changed, 368 insertions(+), 421 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 621494359..53b0cf018 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -24,9 +24,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.1.3" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" dependencies = [ "memchr", ] @@ -63,9 +63,9 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78" +checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000" [[package]] name = "anstyle-parse" @@ -78,35 +78,38 @@ dependencies = [ [[package]] name = "anstyle-query" -version = "1.1.4" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e231f6134f61b71076a3eab506c379d4f36122f2af15a9ff04415ea4c3339e2" +checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" dependencies = [ - "windows-sys 0.60.2", + "windows-sys", ] [[package]] name = "anstyle-wincon" -version = "3.0.10" +version = "3.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e0633414522a32ffaac8ac6cc8f748e090c5717661fddeea04219e2344f5f2a" +checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" dependencies = [ "anstyle", "once_cell_polyfill", - "windows-sys 0.60.2", + "windows-sys", ] [[package]] name = "anyhow" -version = "1.0.100" +version = "1.0.102" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61" +checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c" [[package]] name = "arc-swap" -version = "1.7.1" +version = "1.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69f7f8c3906b62b754cd5326047894316021dcfe5a194c8ea52bdd94934a3457" +checksum = "6a3a1fd6f75306b68087b831f025c712524bcb19aad54e557b1129cfa0a2b207" +dependencies = [ + "rustversion", +] [[package]] name = "arrayvec" @@ -161,9 +164,9 @@ checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" [[package]] name = "axum" -version = "0.8.7" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b098575ebe77cb6d14fc7f32749631a6e44edbef6b796f89b020e99ba20d425" +checksum = "31b698c5f9a010f6573133b09e0de5408834d0c82f8d7475a89fc1867a71cd90" dependencies = [ "axum-core", "bytes", @@ -186,9 +189,9 @@ dependencies = [ [[package]] name = "axum-core" -version = "0.5.5" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59446ce19cd142f8833f856eb31f3eb097812d1479ab224f54d72428ca21ea22" +checksum = "08c78f31d7b1291f7ee735c1c6780ccde7785daae9a9206026862dab7d8792d1" dependencies = [ "bytes", "futures-core", @@ -210,9 +213,9 @@ checksum = "022dfe9eb35f19ebbcb51e0b40a5ab759f46ad60cadf7297e0bd085afb50e076" [[package]] name = "base62" -version = "2.2.3" +version = "2.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1adf9755786e27479693dedd3271691a92b5e242ab139cacb9fb8e7fb5381111" +checksum = "cd637ac531c60eb7fbc4684dc061c2d7d90d73d758181aa02eeff0464b9eee4b" [[package]] name = "base64" @@ -252,9 +255,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.9.4" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2261d10cca569e4643e526d8dc2e62e433cc8aba21ab764233731f8d369bf394" +checksum = "c4512299f36f043ab09a583e57bceb5a5aab7a73db1805848e8fef3c9e8c78b3" [[package]] name = "block-buffer" @@ -282,9 +285,9 @@ checksum = "dc0b364ead1874514c8c2855ab558056ebfeb775653e7ae45ff72f28f8f3166c" [[package]] name = "bstr" -version = "1.12.0" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "234113d19d0d7d613b40e86fb654acf958910802bcceab913a4f9e7cda03b1a4" +checksum = "63044e1ae8e69f3b5a92c736ca6269b8d12fa7efe39bf34ddb06d102cf0e2cab" dependencies = [ "memchr", "serde", @@ -292,9 +295,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.19.0" +version = "3.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" +checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb" [[package]] name = "bytecount" @@ -304,9 +307,9 @@ checksum = "175812e0be2bccb6abe50bb8d566126198344f707e304f45c648fd8f2cc0365e" [[package]] name = "bytes" -version = "1.10.1" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" +checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" [[package]] name = "cc" @@ -320,9 +323,9 @@ dependencies = [ [[package]] name = "cfg-if" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fd1289c04a9ea8cb22300a459a72a385d7c73d3259e2ed7dcb2af674838cfa9" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" [[package]] name = "cfg_aliases" @@ -395,21 +398,20 @@ checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9" [[package]] name = "colorchoice" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" +checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570" [[package]] name = "console" -version = "0.16.1" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b430743a6eb14e9764d4260d4c0d8123087d504eeb9c48f2b2a5e810dd369df4" +checksum = "d64e8af5551369d19cf50138de61f1c42074ab970f74e99be916646777f8fc87" dependencies = [ "encode_unicode", "libc", - "once_cell", "unicode-width 0.2.2", - "windows-sys 0.61.2", + "windows-sys", ] [[package]] @@ -420,9 +422,9 @@ checksum = "18f12cc9948ed9604230cdddc7c86e270f9401ccbe3c2e98a4378c5e7632212f" [[package]] name = "convert_case" -version = "0.7.1" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb402b8d4c85569410425650ce3eddc7d698ed96d39a73f941b08fb63082f1e7" +checksum = "633458d4ef8c78b72454de2d54fd6ab2e60f9e02be22f3c6104cdc8a4e0fceb9" dependencies = [ "unicode-segmentation", ] @@ -482,7 +484,7 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d8b9f2e4c67f833b660cdb0a3523065869fb35570177239812ed4c905aeff87b" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.11.1", "crossterm_winapi", "derive_more", "document-features", @@ -505,9 +507,9 @@ dependencies = [ [[package]] name = "crypto-common" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" dependencies = [ "generic-array", "typenum", @@ -521,7 +523,7 @@ checksum = "e0b1fab2ae45819af2d0731d60f2afe17227ebb1a1538a236da84c93e9a60162" dependencies = [ "dispatch2", "nix 0.31.2", - "windows-sys 0.61.2", + "windows-sys", ] [[package]] @@ -595,15 +597,15 @@ dependencies = [ [[package]] name = "data-encoding" -version = "2.9.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a2330da5de22e8a3cb63252ce2abb30116bf5265e89c0e01bc17015ce30a476" +checksum = "d7a1e2f27636f116493b8b860f5546edb47c8d8f8ea73e1d2a20be88e28d1fea" [[package]] name = "deranged" -version = "0.5.4" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a41953f86f8a05768a6cda24def994fd2f424b04ec5c719cf89989779f199071" +checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c" dependencies = [ "powerfmt", ] @@ -641,22 +643,23 @@ dependencies = [ [[package]] name = "derive_more" -version = "2.0.1" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "093242cf7570c207c83073cf82f79706fe7b8317e98620a47d5be7c3d8497678" +checksum = "d751e9e49156b02b44f9c1815bcb94b984cdcc4396ecc32521c739452808b134" dependencies = [ "derive_more-impl", ] [[package]] name = "derive_more-impl" -version = "2.0.1" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda628edc44c4bb645fbe0f758797143e4e07926f7ebf4e9bdfbd3d2ce621df3" +checksum = "799a97264921d8623a957f6c3b9011f3b5492f557bbb7a5a19b7fa6d06ba8dcb" dependencies = [ "convert_case", "proc-macro2", "quote", + "rustc_version", "syn", ] @@ -687,11 +690,11 @@ dependencies = [ [[package]] name = "dispatch2" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89a09f22a6c6069a18470eb92d2298acf25463f14256d24778e1230d789a2aec" +checksum = "1e0e367e4e7da84520dedcac1901e4da967309406d1e51017ae1abfb97adbd38" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.11.1", "block2", "libc", "objc2", @@ -710,9 +713,9 @@ dependencies = [ [[package]] name = "document-features" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95249b50c6c185bee49034bcb378a49dc2b5dff0be90ff6616d31d64febab05d" +checksum = "d4b8a88685455ed29a21542a33abd9cb6510b6b129abadabdcef0f4c55bc8f61" dependencies = [ "litrs", ] @@ -1023,7 +1026,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.61.2", + "windows-sys", ] [[package]] @@ -1050,9 +1053,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.3.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" +checksum = "9f1f227452a390804cdb637b74a86990f2a7d7ba4b7d5693aac9b4dd6defd8d6" [[package]] name = "find-msvc-tools" @@ -1068,9 +1071,9 @@ checksum = "1d674e81391d1e1ab681a28d99df07927c6d4aa5b027d7da16ba32d1d21ecd99" [[package]] name = "flate2" -version = "1.1.4" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc5a4e564e38c699f2880d3fda590bedc2e69f3f84cd48b457bd892ce61d0aa9" +checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c" dependencies = [ "crc32fast", "miniz_oxide", @@ -1132,9 +1135,9 @@ checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" [[package]] name = "futures" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" +checksum = "8b147ee9d1f6d097cef9ce628cd2ee62288d963e16fb287bd9286455b241382d" dependencies = [ "futures-channel", "futures-core", @@ -1147,9 +1150,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +checksum = "07bbe89c50d7a535e539b8c17bc0b49bdb77747034daa8087407d655f3f7cc1d" dependencies = [ "futures-core", "futures-sink", @@ -1157,15 +1160,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" +checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d" [[package]] name = "futures-executor" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" +checksum = "baf29c38818342a3b26b5b923639e7b1f4a61fc5e76102d4b1981c6dc7a7579d" dependencies = [ "futures-core", "futures-task", @@ -1174,15 +1177,15 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" +checksum = "cecba35d7ad927e23624b22ad55235f2239cfa44fd10428eecbeba6d6a717718" [[package]] name = "futures-macro" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" +checksum = "e835b70203e41293343137df5c0664546da5745f82ec9b84d40be8336958447b" dependencies = [ "proc-macro2", "quote", @@ -1191,21 +1194,21 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" +checksum = "c39754e157331b013978ec91992bde1ac089843443c49cbc7f46150b0fad0893" [[package]] name = "futures-task" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" +checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393" [[package]] name = "futures-util" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6" dependencies = [ "futures-channel", "futures-core", @@ -1215,7 +1218,6 @@ dependencies = [ "futures-task", "memchr", "pin-project-lite", - "pin-utils", "slab", ] @@ -1231,9 +1233,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" +checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" dependencies = [ "cfg-if", "js-sys", @@ -1251,20 +1253,20 @@ dependencies = [ "cfg-if", "js-sys", "libc", - "r-efi", + "r-efi 5.3.0", "wasip2", "wasm-bindgen", ] [[package]] name = "getrandom" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "139ef39800118c7683f2fd3c98c1b23c09ae076556b435f8e9064ae108aaeeec" +checksum = "0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555" dependencies = [ "cfg-if", "libc", - "r-efi", + "r-efi 6.0.0", "wasip2", "wasip3", ] @@ -1277,9 +1279,9 @@ checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" [[package]] name = "globset" -version = "0.4.16" +version = "0.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54a1028dfc5f5df5da8a56a73e6c153c9a9708ec57232470703592a3f18e49f5" +checksum = "52dfc19153a48bde0cbd630453615c8151bce3a5adfac7a0aebfbf0a1e1f57e3" dependencies = [ "aho-corasick", "bstr", @@ -1301,9 +1303,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.12" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3c0b69cfcb4e1b9f1bf2f53f95f766e4661169728ec61cd3fe5a0166f2d1386" +checksum = "2f44da3a8150a6703ed5d34e164b875fd14c2cdab9af1252a9a1020bde2bdc54" dependencies = [ "atomic-waker", "bytes", @@ -1329,15 +1331,21 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.16.0" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5419bdc4f6a9207fbeba6d11b604d481addf78ecd10c11ad51e76c2f6482748d" +checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" dependencies = [ "allocator-api2", "equivalent", "foldhash 0.2.0", ] +[[package]] +name = "hashbrown" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f467dd6dccf739c208452f8014c75c18bb8301b050ad1cfb27153803edb0f51" + [[package]] name = "heck" version = "0.5.0" @@ -1346,12 +1354,11 @@ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "http" -version = "1.3.1" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" +checksum = "e3ba2a386d7f85a81f119ad7498ebe444d2e22c2af0b86b069416ace48b3311a" dependencies = [ "bytes", - "fnv", "itoa", ] @@ -1392,9 +1399,9 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "hyper" -version = "1.7.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb3aa54a13a0dfe7fbe3a59e0c76093041720fdc77b110cc0fc260fafb4dc51e" +checksum = "6299f016b246a94207e63da54dbe807655bf9e00044f73ded42c3ac5305fbcca" dependencies = [ "atomic-waker", "bytes", @@ -1407,7 +1414,6 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "pin-utils", "smallvec", "tokio", "want", @@ -1428,14 +1434,13 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.17" +version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c6995591a8f1380fcb4ba966a252a4b29188d51d2b89e3a252f5305be65aea8" +checksum = "96547c2556ec9d12fb1578c4eaf448b04993e7fb79cbaad930a656880a6bdfa0" dependencies = [ "base64", "bytes", "futures-channel", - "futures-core", "futures-util", "http", "http-body", @@ -1452,9 +1457,9 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.64" +version = "0.1.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33e57f83510bb73707521ebaffa789ec8caf86f9657cad665b092b581d40e9fb" +checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -1476,12 +1481,13 @@ dependencies = [ [[package]] name = "icu_collections" -version = "2.0.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "200072f5d0e3614556f94a9930d5dc3e0662a652823904c3a75dc3b0af7fee47" +checksum = "2984d1cd16c883d7935b9e07e44071dca8d917fd52ecc02c04d5fa0b5a3f191c" dependencies = [ "displaydoc", "potential_utf", + "utf8_iter", "yoke", "zerofrom", "zerovec", @@ -1489,9 +1495,9 @@ dependencies = [ [[package]] name = "icu_locale_core" -version = "2.0.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cde2700ccaed3872079a65fb1a78f6c0a36c91570f28755dda67bc8f7d9f00a" +checksum = "92219b62b3e2b4d88ac5119f8904c10f8f61bf7e95b640d25ba3075e6cac2c29" dependencies = [ "displaydoc", "litemap", @@ -1502,11 +1508,10 @@ dependencies = [ [[package]] name = "icu_normalizer" -version = "2.0.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "436880e8e18df4d7bbc06d58432329d6458cc84531f7ac5f024e93deadb37979" +checksum = "c56e5ee99d6e3d33bd91c5d85458b6005a22140021cc324cea84dd0e72cff3b4" dependencies = [ - "displaydoc", "icu_collections", "icu_normalizer_data", "icu_properties", @@ -1517,42 +1522,38 @@ dependencies = [ [[package]] name = "icu_normalizer_data" -version = "2.0.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00210d6893afc98edb752b664b8890f0ef174c8adbb8d0be9710fa66fbbf72d3" +checksum = "da3be0ae77ea334f4da67c12f149704f19f81d1adf7c51cf482943e84a2bad38" [[package]] name = "icu_properties" -version = "2.0.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "016c619c1eeb94efb86809b015c58f479963de65bdb6253345c1a1276f22e32b" +checksum = "bee3b67d0ea5c2cca5003417989af8996f8604e34fb9ddf96208a033901e70de" dependencies = [ - "displaydoc", "icu_collections", "icu_locale_core", "icu_properties_data", "icu_provider", - "potential_utf", "zerotrie", "zerovec", ] [[package]] name = "icu_properties_data" -version = "2.0.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "298459143998310acd25ffe6810ed544932242d3f07083eee1084d83a71bd632" +checksum = "8e2bbb201e0c04f7b4b3e14382af113e17ba4f63e2c9d2ee626b720cbce54a14" [[package]] name = "icu_provider" -version = "2.0.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03c80da27b5f4187909049ee2d72f276f0d9f99a42c306bd0131ecfe04d8e5af" +checksum = "139c4cf31c8b5f33d7e199446eff9c1e02decfc2f0eec2c8d71f65befa45b421" dependencies = [ "displaydoc", "icu_locale_core", - "stable_deref_trait", - "tinystr", "writeable", "yoke", "zerofrom", @@ -1595,9 +1596,9 @@ dependencies = [ [[package]] name = "ignore" -version = "0.4.23" +version = "0.4.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d89fd380afde86567dfba715db065673989d6253f42b88179abd3eae47bda4b" +checksum = "d3d782a365a015e0f5c04902246139249abf769125006fbe7649e2ee88169b4a" dependencies = [ "crossbeam-deque", "globset", @@ -1611,12 +1612,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.11.4" +version = "2.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b0f83760fb341a774ed326568e19f5a863af4a952def8c39f9ab92fd95b88e5" +checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9" dependencies = [ "equivalent", - "hashbrown 0.16.0", + "hashbrown 0.17.0", "serde", "serde_core", ] @@ -1637,9 +1638,9 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.11.0" +version = "2.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" +checksum = "d98f6fed1fde3f8c21bc40a1abb88dd75e67924f9cffc3ef95607bad8017f8e2" [[package]] name = "ipnetwork" @@ -1649,9 +1650,9 @@ checksum = "cf370abdafd54d13e54a620e8c3e1145f28e46cc9d704bc6d94414559df41763" [[package]] name = "iri-string" -version = "0.7.8" +version = "0.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbc5ebe9c3a1a7a5127f920a418f7585e9e758e911d0466ed004f393b0e380b2" +checksum = "25e659a4bb38e810ebc252e53b5814ff908a8c58c2a9ce2fae1bbec24cbf4e20" dependencies = [ "memchr", "serde", @@ -1668,9 +1669,9 @@ dependencies = [ [[package]] name = "is_terminal_polyfill" -version = "1.70.1" +version = "1.70.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" +checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" [[package]] name = "itertools" @@ -1681,18 +1682,29 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" +dependencies = [ + "either", +] + [[package]] name = "itoa" -version = "1.0.15" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" +checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" [[package]] name = "js-sys" -version = "0.3.86" +version = "0.3.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d36139f1c97c42c0c86a411910b04e48d4939a0376e6e0f989420cbdee0120e5" +checksum = "2964e92d1d9dc3364cae4d718d93f227e3abb088e747d92e0395bfdedf1c12ca" dependencies = [ + "cfg-if", + "futures-util", "once_cell", "wasm-bindgen", ] @@ -1738,9 +1750,9 @@ checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" [[package]] name = "libc" -version = "0.2.183" +version = "0.2.185" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5b646652bf6661599e1da8901b3b9522896f01e736bad5f723fe7a3a27f899d" +checksum = "52ff2c0fe9bc6cb6b14a0592c2ff4fa9ceb83eea9db979b0487cd054946a2b8f" [[package]] name = "linked-hash-map" @@ -1756,15 +1768,15 @@ checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" [[package]] name = "litemap" -version = "0.8.0" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "241eaef5fd12c88705a01fc1066c48c4b36e0dd4377dcdc7ec3942cea7a69956" +checksum = "92daf443525c4cce67b150400bc2316076100ce0b3686209eb8cf3c31612e6f0" [[package]] name = "litrs" -version = "0.4.2" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5e54036fe321fd421e10d732f155734c4e4afd610dd556d9a82833ab3ee0bed" +checksum = "11d3d7f243d5c5a8b9bb5d6dd2b1602c0cb0b9db1621bafc7ed66e35ff9fe092" [[package]] name = "lock_api" @@ -1777,9 +1789,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.28" +version = "0.4.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432" +checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" [[package]] name = "matchers" @@ -1798,9 +1810,9 @@ checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3" [[package]] name = "memchr" -version = "2.7.6" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" +checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" [[package]] name = "miette" @@ -1849,7 +1861,7 @@ dependencies = [ "libc", "log", "wasi", - "windows-sys 0.61.2", + "windows-sys", ] [[package]] @@ -1873,7 +1885,7 @@ version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74523f3a35e05aba87a1d978330aef40f67b0304ac79c1c00b294c9830543db6" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.11.1", "cfg-if", "cfg_aliases", "libc", @@ -1885,7 +1897,7 @@ version = "0.31.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5d6d0705320c1e6ba1d912b5e37cf18071b6c2e9b7fa8215a1e8a7651966f5d3" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.11.1", "cfg-if", "cfg_aliases", "libc", @@ -1897,25 +1909,25 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf23ab2b905654b4cb177e30b629937b3868311d4e1cba859f899c041046e69b" dependencies = [ - "windows-sys 0.61.2", + "windows-sys", ] [[package]] name = "ntapi" -version = "0.4.1" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8a3895c6391c39d7fe7ebc444a87eb2991b2a0bc718fdabd071eec617fc68e4" +checksum = "c3b335231dfd352ffb0f8017f3b6027a4917f7df785ea2143d8af2adc66980ae" dependencies = [ "winapi", ] [[package]] name = "nu-ansi-term" -version = "0.50.1" +version = "0.50.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4a28e057d01f97e61255210fcff094d74ed0466038633e95017f5beb68e4399" +checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" dependencies = [ - "windows-sys 0.52.0", + "windows-sys", ] [[package]] @@ -1959,9 +1971,9 @@ dependencies = [ [[package]] name = "num-conv" -version = "0.1.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" +checksum = "c6673768db2d862beb9b39a78fdcb1a69439615d5794a1be50caa9bc92c81967" [[package]] name = "num-integer" @@ -2011,9 +2023,9 @@ checksum = "51e219e79014df21a225b1860a479e2dcd7cbd9130f4defd4bd0e191ea31d67d" dependencies = [ "base64", "chrono", - "getrandom 0.2.16", + "getrandom 0.2.17", "http", - "rand 0.8.5", + "rand 0.8.6", "serde", "serde_json", "serde_path_to_error", @@ -2024,29 +2036,29 @@ dependencies = [ [[package]] name = "objc2" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7c2599ce0ec54857b29ce62166b0ed9b4f6f1a70ccc9a71165b6154caca8c05" +checksum = "3a12a8ed07aefc768292f076dc3ac8c48f3781c8f2d5851dd3d98950e8c5a89f" dependencies = [ "objc2-encode", ] [[package]] name = "objc2-cloud-kit" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17614fdcd9b411e6ff1117dfb1d0150f908ba83a7df81b1f118005fe0a8ea15d" +checksum = "73ad74d880bb43877038da939b7427bba67e9dd42004a18b809ba7d87cee241c" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.11.1", "objc2", "objc2-foundation", ] [[package]] name = "objc2-core-data" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291fbbf7d29287518e8686417cf7239c74700fd4b607623140a7d4a3c834329d" +checksum = "0b402a653efbb5e82ce4df10683b6b28027616a2715e90009947d50b8dd298fa" dependencies = [ "objc2", "objc2-foundation", @@ -2058,18 +2070,18 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.11.1", "dispatch2", "objc2", ] [[package]] name = "objc2-core-graphics" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "989c6c68c13021b5c2d6b71456ebb0f9dc78d752e86a98da7c716f4f9470f5a4" +checksum = "e022c9d066895efa1345f8e33e584b9f958da2fd4cd116792e15e07e4720a807" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.11.1", "dispatch2", "objc2", "objc2-core-foundation", @@ -2078,9 +2090,9 @@ dependencies = [ [[package]] name = "objc2-core-image" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79b3dc0cc4386b6ccf21c157591b34a7f44c8e75b064f85502901ab2188c007e" +checksum = "e5d563b38d2b97209f8e861173de434bd0214cf020e3423a52624cd1d989f006" dependencies = [ "objc2", "objc2-foundation", @@ -2088,14 +2100,26 @@ dependencies = [ [[package]] name = "objc2-core-location" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac0f75792558aa9d618443bbb5db7426a7a0b6fddf96903f86ef9ad02e135740" +checksum = "ca347214e24bc973fc025fd0d36ebb179ff30536ed1f80252706db19ee452009" dependencies = [ "objc2", "objc2-foundation", ] +[[package]] +name = "objc2-core-text" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cde0dfb48d25d2b4862161a4d5fcc0e3c24367869ad306b0c9ec0073bfed92d" +dependencies = [ + "bitflags 2.11.1", + "objc2", + "objc2-core-foundation", + "objc2-core-graphics", +] + [[package]] name = "objc2-encode" version = "4.1.0" @@ -2104,11 +2128,11 @@ checksum = "ef25abbcd74fb2609453eb695bd2f860d389e457f67dc17cafc8b8cbc89d0c33" [[package]] name = "objc2-foundation" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "900831247d2fe1a09a683278e5384cfb8c80c79fe6b166f9d14bfdde0ea1b03c" +checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.11.1", "block2", "libc", "objc2", @@ -2127,22 +2151,22 @@ dependencies = [ [[package]] name = "objc2-io-surface" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7282e9ac92529fa3457ce90ebb15f4ecbc383e8338060960760fa2cf75420c3c" +checksum = "180788110936d59bab6bd83b6060ffdfffb3b922ba1396b312ae795e1de9d81d" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.11.1", "objc2", "objc2-core-foundation", ] [[package]] name = "objc2-quartz-core" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ffb6a0cd5f182dc964334388560b12a57f7b74b3e2dec5e2722aa2dfb2ccd5" +checksum = "96c1358452b371bf9f104e21ec536d37a650eb10f7ee379fff67d2e08d537f1f" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.11.1", "objc2", "objc2-core-foundation", "objc2-foundation", @@ -2150,11 +2174,11 @@ dependencies = [ [[package]] name = "objc2-ui-kit" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25b1312ad7bc8a0e92adae17aa10f90aae1fb618832f9b993b022b591027daed" +checksum = "d87d638e33c06f577498cbcc50491496a3ed4246998a7fbba7ccb98b1e7eab22" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.11.1", "block2", "objc2", "objc2-cloud-kit", @@ -2163,6 +2187,7 @@ dependencies = [ "objc2-core-graphics", "objc2-core-image", "objc2-core-location", + "objc2-core-text", "objc2-foundation", "objc2-quartz-core", "objc2-user-notifications", @@ -2170,9 +2195,9 @@ dependencies = [ [[package]] name = "objc2-user-notifications" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a3f5ec77a81d9e0c5a0b32159b0cb143d7086165e79708351e02bf37dfc65cd" +checksum = "9df9128cbbfef73cda168416ccf7f837b62737d748333bfe9ab71c245d76613e" dependencies = [ "objc2", "objc2-foundation", @@ -2180,15 +2205,15 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.21.3" +version = "1.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" [[package]] name = "once_cell_polyfill" -version = "1.70.1" +version = "1.70.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4895175b425cb1f87721b59f0f286c2092bd4af812243672510e1ac53e2e0ad" +checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" [[package]] name = "os_info" @@ -2203,7 +2228,7 @@ dependencies = [ "objc2-foundation", "objc2-ui-kit", "serde", - "windows-sys 0.61.2", + "windows-sys", ] [[package]] @@ -2237,9 +2262,9 @@ dependencies = [ [[package]] name = "pastey" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57d6c094ee800037dff99e02cab0eaf3142826586742a270ab3d7a62656bd27a" +checksum = "b867cad97c0791bbd3aaa6472142568c6c9e8f71937e98379f584cfb0cf35bec" [[package]] name = "path-absolutize" @@ -2267,28 +2292,29 @@ checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" [[package]] name = "petgraph" -version = "0.7.1" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3672b37090dbd86368a4145bc067582552b29c27377cad4e0a306c97f9bd7772" +checksum = "8701b58ea97060d5e5b155d383a69952a60943f0e6dfe30b04c287beb0b27455" dependencies = [ "fixedbitset", + "hashbrown 0.15.5", "indexmap", ] [[package]] name = "pin-project" -version = "1.1.10" +version = "1.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677f1add503faace112b9f1373e43e9e054bfdd22ff1a63c1bc485eaec6a6a8a" +checksum = "f1749c7ed4bcaf4c3d0a3efc28538844fb29bcdd7d2b67b2be7e20ba861ff517" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.10" +version = "1.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" +checksum = "d9b20ed30f105399776b9c883e68e536ef602a16ae6f596d2c473591d6ad64c6" dependencies = [ "proc-macro2", "quote", @@ -2297,15 +2323,9 @@ dependencies = [ [[package]] name = "pin-project-lite" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" - -[[package]] -name = "pin-utils" -version = "0.1.0" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" [[package]] name = "plist" @@ -2328,9 +2348,9 @@ checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49" [[package]] name = "potential_utf" -version = "0.1.3" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84df19adbe5b5a0782edcab45899906947ab039ccf4573713735ee7de1e6b08a" +checksum = "0103b1cef7ec0cf76490e969665504990193874ea05c85ff9bab8b911d0a0564" dependencies = [ "zerovec", ] @@ -2391,15 +2411,14 @@ dependencies = [ [[package]] name = "prost-build" -version = "0.14.1" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac6c3320f9abac597dcbc668774ef006702672474aad53c6d596b62e487b40b1" +checksum = "343d3bd7056eda839b03204e68deff7d1b13aba7af2b2fd16890697274262ee7" dependencies = [ "heck", - "itertools", + "itertools 0.14.0", "log", "multimap", - "once_cell", "petgraph", "prettyplease", "prost", @@ -2418,7 +2437,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "27c6023962132f4b30eb4c172c91ce92d933da334c59c23cddee82358ddafb0b" dependencies = [ "anyhow", - "itertools", + "itertools 0.14.0", "proc-macro2", "quote", "syn", @@ -2426,38 +2445,38 @@ dependencies = [ [[package]] name = "prost-types" -version = "0.14.1" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9b4db3d6da204ed77bb26ba83b6122a73aeb2e87e25fbf7ad2e84c4ccbf8f72" +checksum = "8991c4cbdb8bc5b11f0b074ffe286c30e523de90fee5ba8132f1399f23cb3dd7" dependencies = [ "prost", ] [[package]] name = "pulldown-cmark" -version = "0.13.0" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e8bbe1a966bd2f362681a44f6edce3c2310ac21e4d5067a6e7ec396297a6ea0" +checksum = "7c3a14896dfa883796f1cb410461aef38810ea05f2b2c33c5aded3649095fdad" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.11.1", "memchr", "unicase", ] [[package]] name = "pulldown-cmark-to-cmark" -version = "21.1.0" +version = "22.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8246feae3db61428fd0bb94285c690b460e4517d83152377543ca802357785f1" +checksum = "50793def1b900256624a709439404384204a5dc3a6ec580281bfaac35e882e90" dependencies = [ "pulldown-cmark", ] [[package]] name = "quick-xml" -version = "0.38.3" +version = "0.38.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42a232e7487fc2ef313d96dde7948e7a3c05101870d8985e4fd8d26aedd27b89" +checksum = "b66c2058c55a409d601666cffe35f04333cf1013010882cec174a7467cd4e21c" dependencies = [ "memchr", ] @@ -2477,6 +2496,12 @@ version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" +[[package]] +name = "r-efi" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" + [[package]] name = "rand" version = "0.3.23" @@ -2502,9 +2527,9 @@ dependencies = [ [[package]] name = "rand" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +checksum = "5ca0ecfa931c29007047d1bc58e623ab12e5590e8c7cc53200d5202b69266d8a" dependencies = [ "libc", "rand_chacha", @@ -2542,7 +2567,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.16", + "getrandom 0.2.17", ] [[package]] @@ -2560,7 +2585,7 @@ version = "0.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.11.1", ] [[package]] @@ -2592,7 +2617,7 @@ dependencies = [ "ahash", "fluent-uri", "getrandom 0.3.4", - "hashbrown 0.16.0", + "hashbrown 0.16.1", "parking_lot", "percent-encoding", "serde_json", @@ -2612,9 +2637,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c" +checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f" dependencies = [ "aho-corasick", "memchr", @@ -2623,9 +2648,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.6" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "caf4aa5b0f434c91fe5c7f1ecb6a5ece2130b02ad2a590589dda5146df959001" +checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a" [[package]] name = "registry" @@ -2760,7 +2785,7 @@ dependencies = [ "arc-swap", "base62", "globwalk", - "itertools", + "itertools 0.11.0", "lazy_static", "normpath", "proc-macro2", @@ -2773,17 +2798,26 @@ dependencies = [ "triomphe", ] +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] + [[package]] name = "rustix" version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.11.1", "errno", "libc", "linux-raw-sys", - "windows-sys 0.61.2", + "windows-sys", ] [[package]] @@ -2794,9 +2828,9 @@ checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" [[package]] name = "ryu" -version = "1.0.20" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" +checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" [[package]] name = "same-file" @@ -2986,30 +3020,31 @@ dependencies = [ [[package]] name = "signal-hook-registry" -version = "1.4.6" +version = "1.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2a4719bff48cee6b39d12c020eeb490953ad2443b7055bd0b21fca26bd8c28b" +checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b" dependencies = [ + "errno", "libc", ] [[package]] name = "simd-adler32" -version = "0.3.7" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" +checksum = "703d5c7ef118737c72f1af64ad2f6f8c5e1921f818cdcb97b8fe6fc69bf66214" [[package]] name = "siphasher" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d" +checksum = "b2aa850e253778c88a04c3d7323b043aeda9d3e30d5971937c1855769763678e" [[package]] name = "slab" -version = "0.4.11" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589" +checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" [[package]] name = "smallvec" @@ -3024,14 +3059,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3a766e1110788c36f4fa1c2b71b387a7815aa65f88ce0229841826633d93723e" dependencies = [ "libc", - "windows-sys 0.61.2", + "windows-sys", ] [[package]] name = "stable_deref_trait" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" [[package]] name = "streaming-iterator" @@ -3118,10 +3153,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" dependencies = [ "fastrand", - "getrandom 0.4.1", + "getrandom 0.4.2", "once_cell", "rustix", - "windows-sys 0.61.2", + "windows-sys", ] [[package]] @@ -3219,30 +3254,30 @@ dependencies = [ [[package]] name = "time" -version = "0.3.44" +version = "0.3.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91e7d9e3bb61134e77bde20dd4825b97c010155709965fedf0f49bb138e52a9d" +checksum = "743bd48c283afc0388f9b8827b976905fb217ad9e647fae3a379a9283c4def2c" dependencies = [ "deranged", "itoa", "num-conv", "powerfmt", - "serde", + "serde_core", "time-core", "time-macros", ] [[package]] name = "time-core" -version = "0.1.6" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40868e7c1d2f0b8d73e4a8c7f0ff63af4f6d19be117e90bd73eb1d62cf831c6b" +checksum = "7694e1cfe791f8d31026952abf09c69ca6f6fa4e1a1229e18988f06a04a12dca" [[package]] name = "time-macros" -version = "0.2.24" +version = "0.2.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30cfb0125f12d9c277f35663a0a33f8c30190f4e4574868a330595412d34ebf3" +checksum = "2e70e4c5a0e0a8a4823ad65dfe1a6930e4f4d756dcd9dd7939022b5e8c501215" dependencies = [ "num-conv", "time-core", @@ -3250,9 +3285,9 @@ dependencies = [ [[package]] name = "tinystr" -version = "0.8.1" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d4f6d1145dcb577acf783d4e601bc1d76a13337bb54e6233add580b07344c8b" +checksum = "c8323304221c2a851516f22236c5722a72eaa19749016521d6dff0824447d96d" dependencies = [ "displaydoc", "zerovec", @@ -3271,7 +3306,7 @@ dependencies = [ "signal-hook-registry", "socket2", "tokio-macros", - "windows-sys 0.61.2", + "windows-sys", ] [[package]] @@ -3381,9 +3416,9 @@ dependencies = [ [[package]] name = "tonic-build" -version = "0.14.2" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c40aaccc9f9eccf2cd82ebc111adc13030d23e887244bc9cfa5d1d636049de3" +checksum = "1882ac3bf5ef12877d7ed57aad87e75154c11931c2ba7e6cde5e22d63522c734" dependencies = [ "prettyplease", "proc-macro2", @@ -3434,9 +3469,9 @@ dependencies = [ [[package]] name = "tower" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" +checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4" dependencies = [ "futures-core", "futures-util", @@ -3457,7 +3492,7 @@ version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d4e6559d53cc268e5031cd8429d05415bc4cb4aefc4aa5d6cc35fbf5b924a1f8" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.11.1", "bytes", "futures-util", "http", @@ -3654,15 +3689,15 @@ checksum = "0b993bddc193ae5bd0d623b49ec06ac3e9312875fdae725a975c51db1cc1677f" [[package]] name = "unicode-ident" -version = "1.0.19" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f63a545481291138910575129486daeaf8ac54aee4387fe7906919f7830c7d9d" +checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" [[package]] name = "unicode-segmentation" -version = "1.12.0" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" +checksum = "9629274872b2bfaf8d66f5f15725007f635594914870f65218920345aa11aa8c" [[package]] name = "unicode-width" @@ -3684,9 +3719,9 @@ checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" [[package]] name = "unit-prefix" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "323402cff2dd658f39ca17c789b502021b3f18707c91cdf22e3838e1b4023817" +checksum = "81e544489bf3d8ef66c953931f56617f423cd4b5494be343d9b9d3dda037b9a3" [[package]] name = "unsafe-libyaml" @@ -3737,7 +3772,7 @@ version = "1.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ddd74a9687298c6858e9b88ec8935ec45d22e8fd5e6394fa1bd4e99a87789c76" dependencies = [ - "getrandom 0.4.1", + "getrandom 0.4.2", "js-sys", "wasm-bindgen", ] @@ -3818,11 +3853,11 @@ checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] name = "wasip2" -version = "1.0.1+wasi-0.2.4" +version = "1.0.2+wasi-0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0562428422c63773dad2c345a1882263bbf4d65cf3f42e90921f787ef5ad58e7" +checksum = "9517f9239f02c069db75e65f174b3da828fe5f5b945c4dd26bd25d89c03ebcf5" dependencies = [ - "wit-bindgen 0.46.0", + "wit-bindgen", ] [[package]] @@ -3831,14 +3866,14 @@ version = "0.4.0+wasi-0.3.0-rc-2026-01-06" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5428f8bf88ea5ddc08faddef2ac4a67e390b88186c703ce6dbd955e1c145aca5" dependencies = [ - "wit-bindgen 0.51.0", + "wit-bindgen", ] [[package]] name = "wasm-bindgen" -version = "0.2.109" +version = "0.2.118" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ff9c7baef35ac3c0e17d8bfc9ad75eb62f85a2f02bccc906699dadb0aa9c622" +checksum = "0bf938a0bacb0469e83c1e148908bd7d5a6010354cf4fb73279b7447422e3a89" dependencies = [ "cfg-if", "once_cell", @@ -3849,23 +3884,19 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.59" +version = "0.4.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d24699cd39db9966cf6e2ef10d2f72779c961ad905911f395ea201c3ec9f545d" +checksum = "f371d383f2fb139252e0bfac3b81b265689bf45b6874af544ffa4c975ac1ebf8" dependencies = [ - "cfg-if", - "futures-util", "js-sys", - "once_cell", "wasm-bindgen", - "web-sys", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.109" +version = "0.2.118" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39455e84ad887a0bbc93c116d72403f1bb0a39e37dd6f235a43e2128a0c7f1fd" +checksum = "eeff24f84126c0ec2db7a449f0c2ec963c6a49efe0698c4242929da037ca28ed" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3873,9 +3904,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.109" +version = "0.2.118" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dff4761f60b0b51fd13fec8764167b7bbcc34498ce3e52805fe1db6f2d56b6d6" +checksum = "9d08065faf983b2b80a79fd87d8254c409281cf7de75fc4b773019824196c904" dependencies = [ "bumpalo", "proc-macro2", @@ -3886,9 +3917,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.109" +version = "0.2.118" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc6a171c53d98021a93a474c4a4579d76ba97f9517d871bc12e27640f218b6dd" +checksum = "5fd04d9e306f1907bd13c6361b5c6bfc7b3b3c095ed3f8a9246390f8dbdee129" dependencies = [ "unicode-ident", ] @@ -3934,7 +3965,7 @@ version = "0.244.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.11.1", "hashbrown 0.15.5", "indexmap", "semver", @@ -3942,9 +3973,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.86" +version = "0.3.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "668fa5d00434e890a452ab060d24e3904d1be93f7bb01b70e5603baa2b8ab23b" +checksum = "4f2dfbb17949fa2088e5d39408c48368947b86f7834484e87b73de55bc14d97d" dependencies = [ "js-sys", "wasm-bindgen", @@ -3991,7 +4022,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.61.2", + "windows-sys", ] [[package]] @@ -4007,7 +4038,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6" dependencies = [ "windows-core 0.58.0", - "windows-targets 0.52.6", + "windows-targets", ] [[package]] @@ -4041,7 +4072,7 @@ dependencies = [ "windows-interface 0.58.0", "windows-result 0.2.0", "windows-strings 0.1.0", - "windows-targets 0.52.6", + "windows-targets", ] [[package]] @@ -4134,7 +4165,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" dependencies = [ - "windows-targets 0.52.6", + "windows-targets", ] [[package]] @@ -4153,7 +4184,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" dependencies = [ "windows-result 0.2.0", - "windows-targets 0.52.6", + "windows-targets", ] [[package]] @@ -4165,24 +4196,6 @@ dependencies = [ "windows-link", ] -[[package]] -name = "windows-sys" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" -dependencies = [ - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-sys" -version = "0.60.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" -dependencies = [ - "windows-targets 0.53.5", -] - [[package]] name = "windows-sys" version = "0.61.2" @@ -4198,31 +4211,14 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.6", - "windows_aarch64_msvc 0.52.6", - "windows_i686_gnu 0.52.6", - "windows_i686_gnullvm 0.52.6", - "windows_i686_msvc 0.52.6", - "windows_x86_64_gnu 0.52.6", - "windows_x86_64_gnullvm 0.52.6", - "windows_x86_64_msvc 0.52.6", -] - -[[package]] -name = "windows-targets" -version = "0.53.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" -dependencies = [ - "windows-link", - "windows_aarch64_gnullvm 0.53.1", - "windows_aarch64_msvc 0.53.1", - "windows_i686_gnu 0.53.1", - "windows_i686_gnullvm 0.53.1", - "windows_i686_msvc 0.53.1", - "windows_x86_64_gnu 0.53.1", - "windows_x86_64_gnullvm 0.53.1", - "windows_x86_64_msvc 0.53.1", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", ] [[package]] @@ -4240,24 +4236,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" - [[package]] name = "windows_aarch64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" -[[package]] -name = "windows_aarch64_msvc" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" - [[package]] name = "windows_firewall" version = "0.1.0" @@ -4274,36 +4258,18 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" -[[package]] -name = "windows_i686_gnu" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" - [[package]] name = "windows_i686_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" -[[package]] -name = "windows_i686_gnullvm" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" - [[package]] name = "windows_i686_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" -[[package]] -name = "windows_i686_msvc" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" - [[package]] name = "windows_service" version = "0.1.0" @@ -4320,51 +4286,27 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" -[[package]] -name = "windows_x86_64_gnu" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" - [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" - [[package]] name = "windows_x86_64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" -[[package]] -name = "windows_x86_64_msvc" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" - [[package]] name = "winnow" -version = "0.7.13" +version = "0.7.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21a0236b59786fed61e2a80582dd500fe61f18b5dca67a4a067d0bc9039339cf" +checksum = "df79d97927682d2fd8adb29682d1140b343be4ac0f08fd68b7765d9c059d3945" dependencies = [ "memchr", ] -[[package]] -name = "wit-bindgen" -version = "0.46.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59" - [[package]] name = "wit-bindgen" version = "0.51.0" @@ -4423,7 +4365,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2" dependencies = [ "anyhow", - "bitflags 2.9.4", + "bitflags 2.11.1", "indexmap", "log", "serde", @@ -4455,9 +4397,9 @@ dependencies = [ [[package]] name = "writeable" -version = "0.6.1" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea2f10b9bb0928dfb1b42b65e1f9e36f7f54dbdf08457afefb38afcdec4fa2bb" +checksum = "1ffae5123b2d3fc086436f8834ae3ab053a283cfac8fe0a0b8eaae044768a4c4" [[package]] name = "xtask" @@ -4500,11 +4442,10 @@ checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" [[package]] name = "yoke" -version = "0.8.0" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f41bb01b8226ef4bfd589436a297c53d118f65921786300e427be8d487695cc" +checksum = "abe8c5fda708d9ca3df187cae8bfb9ceda00dd96231bed36e445a1a48e66f9ca" dependencies = [ - "serde", "stable_deref_trait", "yoke-derive", "zerofrom", @@ -4512,9 +4453,9 @@ dependencies = [ [[package]] name = "yoke-derive" -version = "0.8.0" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6" +checksum = "de844c262c8848816172cef550288e7dc6c7b7814b4ee56b3e1553f275f1858e" dependencies = [ "proc-macro2", "quote", @@ -4524,18 +4465,18 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.8.27" +version = "0.8.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0894878a5fa3edfd6da3f88c4805f4c8558e2b996227a3d864f47fe11e38282c" +checksum = "eed437bf9d6692032087e337407a86f04cd8d6a16a37199ed57949d415bd68e9" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.27" +version = "0.8.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88d2b8d9c68ad2b9e4340d7832716a4d21a22a1154777ad56ea55c51a9cf3831" +checksum = "70e3cd084b1788766f53af483dd21f93881ff30d7320490ec3ef7526d203bad4" dependencies = [ "proc-macro2", "quote", @@ -4544,18 +4485,18 @@ dependencies = [ [[package]] name = "zerofrom" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" +checksum = "69faa1f2a1ea75661980b013019ed6687ed0e83d069bc1114e2cc74c6c04c4df" dependencies = [ "zerofrom-derive", ] [[package]] name = "zerofrom-derive" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" +checksum = "11532158c46691caf0f2593ea8358fed6bbf68a0315e80aae9bd41fbade684a1" dependencies = [ "proc-macro2", "quote", @@ -4565,9 +4506,9 @@ dependencies = [ [[package]] name = "zerotrie" -version = "0.2.2" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36f0bbd478583f79edad978b407914f61b2972f5af6fa089686016be8f9af595" +checksum = "0f9152d31db0792fa83f70fb2f83148effb5c1f5b8c7686c3459e361d9bc20bf" dependencies = [ "displaydoc", "yoke", @@ -4576,9 +4517,9 @@ dependencies = [ [[package]] name = "zerovec" -version = "0.11.4" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7aa2bd55086f1ab526693ecbe444205da57e25f4489879da80635a46d90e73b" +checksum = "90f911cbc359ab6af17377d242225f4d75119aec87ea711a880987b18cd7b239" dependencies = [ "yoke", "zerofrom", @@ -4587,9 +4528,9 @@ dependencies = [ [[package]] name = "zerovec-derive" -version = "0.11.1" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f" +checksum = "625dc425cab0dca6dc3c3319506e6593dcb08a9f387ea3b284dbd52a92c40555" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index 482b08567..18c31d016 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -148,6 +148,8 @@ strip = "symbols" # See split-debuginfo - allows us to drop the size b base32 = { version = "0.5" } # dsc-lib base64 = { version = "0.22" } +# used by other crates +bytes = { version = "1.11.1" } # dsc-lib, sshdconfig chrono = { version = "0.4.44" } # dsc, dsc-lib, dsc-bicep-ext, dscecho, registry, runcommandonset, sshdconfig, dsctest, test_group_resource @@ -192,6 +194,8 @@ prost = { version = "0.14.3" } proc-macro2 = { version = "1.0" } # dsc-lib-jsonschema-macros quote = { version = "1.0" } +# used by other crates +rand = { version = "0.10.1" } # dsc, dsc-lib regex = { version = "1.12.3" } # registry, dsc-lib, dsc-lib-registry, dsctest @@ -222,6 +226,8 @@ sysinfo = { version = "0.38.4" } tempfile = { version = "3.27" } # dsc, dsc-lib, registry, dsc-lib-registry, sshdconfig thiserror = { version = "2.0.18" } +# used by other crates +time = { version = "0.3.47" } # dsc, dsc-lib, dsc-bicep-ext tokio = { version = "1.52.1" } # dsc-bicep-ext From f96262bf38f01f26aee56a30bbc1277eadcc430a Mon Sep 17 00:00:00 2001 From: "G.Reijn" <26114636+Gijsreyn@users.noreply.github.com> Date: Tue, 21 Apr 2026 07:05:58 +0200 Subject: [PATCH 19/37] Add `dism_dsc` reference documentation --- .../examples/export-features-on-demand.md | 151 +++++++ .../examples/get-feature-on-demand.md | 139 +++++++ .../install-remove-feature-on-demand.md | 167 ++++++++ .../Windows/FeatureOnDemandList/index.md | 380 ++++++++++++++++++ .../enable-disable-optional-features.md | 198 +++++++++ .../examples/export-optional-features.md | 144 +++++++ .../examples/get-optional-feature.md | 117 ++++++ .../Windows/OptionalFeatureList/index.md | 367 +++++++++++++++++ docs/reference/resources/overview.md | 4 + 9 files changed, 1667 insertions(+) create mode 100644 docs/reference/resources/Microsoft/Windows/FeatureOnDemandList/examples/export-features-on-demand.md create mode 100644 docs/reference/resources/Microsoft/Windows/FeatureOnDemandList/examples/get-feature-on-demand.md create mode 100644 docs/reference/resources/Microsoft/Windows/FeatureOnDemandList/examples/install-remove-feature-on-demand.md create mode 100644 docs/reference/resources/Microsoft/Windows/FeatureOnDemandList/index.md create mode 100644 docs/reference/resources/Microsoft/Windows/OptionalFeatureList/examples/enable-disable-optional-features.md create mode 100644 docs/reference/resources/Microsoft/Windows/OptionalFeatureList/examples/export-optional-features.md create mode 100644 docs/reference/resources/Microsoft/Windows/OptionalFeatureList/examples/get-optional-feature.md create mode 100644 docs/reference/resources/Microsoft/Windows/OptionalFeatureList/index.md diff --git a/docs/reference/resources/Microsoft/Windows/FeatureOnDemandList/examples/export-features-on-demand.md b/docs/reference/resources/Microsoft/Windows/FeatureOnDemandList/examples/export-features-on-demand.md new file mode 100644 index 000000000..7bffc721a --- /dev/null +++ b/docs/reference/resources/Microsoft/Windows/FeatureOnDemandList/examples/export-features-on-demand.md @@ -0,0 +1,151 @@ +--- +description: > + Examples showing how to export and filter Windows Features on Demand (capabilities) using the + Microsoft.Windows/FeatureOnDemandList resource. +ms.date: 04/21/2026 +ms.topic: reference +title: Export Features on Demand +--- + +# Export Features on Demand + +This example shows how you can use the `Microsoft.Windows/FeatureOnDemandList` resource to +enumerate Windows Features on Demand (capabilities) on a system, optionally filtering the results +by identity, state, display name, or description. + +> [!IMPORTANT] +> All operations with `Microsoft.Windows/FeatureOnDemandList` require an elevated (administrator) +> session. Run your terminal as administrator before executing these commands. + +## Export all capabilities + +To retrieve a complete list of all capabilities on the system, use the [dsc resource export][01] +command without any input. + +```powershell +dsc resource export --resource Microsoft.Windows/FeatureOnDemandList +``` + +DSC returns a configuration document that includes all capabilities and their current states: + +```yaml +$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json +resources: +- name: Microsoft.Windows/FeatureOnDemandList + type: Microsoft.Windows/FeatureOnDemandList + properties: + capabilities: + - identity: OpenSSH.Client~~~~0.0.1.0 + state: Installed + - identity: OpenSSH.Server~~~~0.0.1.0 + state: NotPresent + - identity: Language.Basic~~~en-US~0.0.1.0 + state: Installed + # ... additional capabilities +``` + +> [!NOTE] +> When exporting without filters, the resource uses a fast enumeration path that returns only +> `identity` and `state` for each capability. To retrieve additional properties such as +> `displayName`, `description`, `downloadSize`, and `installSize`, use an export filter as shown +> in the examples below. + +## Export only installed capabilities + +To list only the capabilities currently installed on the system, provide a filter with +`state: Installed`. + +```powershell +$filter = @{ + capabilities = @( + @{ state = 'Installed' } + ) +} | ConvertTo-Json -Depth 3 + +dsc resource export --resource Microsoft.Windows/FeatureOnDemandList --input $filter +``` + +```yaml +$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json +resources: +- name: Microsoft.Windows/FeatureOnDemandList + type: Microsoft.Windows/FeatureOnDemandList + properties: + capabilities: + - identity: OpenSSH.Client~~~~0.0.1.0 + state: Installed + - identity: Language.Basic~~~en-US~0.0.1.0 + state: Installed + # ... additional installed capabilities +``` + +## Export capabilities by identity pattern + +You can filter capabilities by identity using wildcard (`*`) patterns. The match is +case-insensitive. + +```powershell +$filter = @{ + capabilities = @( + @{ identity = 'OpenSSH*' } + ) +} | ConvertTo-Json -Depth 3 + +dsc resource export --resource Microsoft.Windows/FeatureOnDemandList --input $filter +``` + +```yaml +$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json +resources: +- name: Microsoft.Windows/FeatureOnDemandList + type: Microsoft.Windows/FeatureOnDemandList + properties: + capabilities: + - identity: OpenSSH.Client~~~~0.0.1.0 + state: Installed + - identity: OpenSSH.Server~~~~0.0.1.0 + state: NotPresent +``` + +## Export capabilities with full details + +To retrieve full details including `displayName`, `description`, `downloadSize`, and +`installSize`, include those properties as filters. A wildcard (`*`) in a filter property matches +all values for that field and triggers the full-info lookup. + +```powershell +$filter = @{ + capabilities = @( + @{ + identity = 'OpenSSH*' + displayName = '*' + } + ) +} | ConvertTo-Json -Depth 3 + +dsc resource export --resource Microsoft.Windows/FeatureOnDemandList --input $filter +``` + +```yaml +$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json +resources: +- name: Microsoft.Windows/FeatureOnDemandList + type: Microsoft.Windows/FeatureOnDemandList + properties: + capabilities: + - identity: OpenSSH.Client~~~~0.0.1.0 + state: Installed + displayName: OpenSSH Client + description: Open SSH-based secure shell (SSH) client... + downloadSize: 0 + installSize: 4894720 + - identity: OpenSSH.Server~~~~0.0.1.0 + state: NotPresent + displayName: OpenSSH Server + description: Open SSH-based secure shell (SSH) server... + downloadSize: 1468500 + installSize: 1839104 +``` + + +[01]: ../../../../../../cli/resource/export.md diff --git a/docs/reference/resources/Microsoft/Windows/FeatureOnDemandList/examples/get-feature-on-demand.md b/docs/reference/resources/Microsoft/Windows/FeatureOnDemandList/examples/get-feature-on-demand.md new file mode 100644 index 000000000..22726039f --- /dev/null +++ b/docs/reference/resources/Microsoft/Windows/FeatureOnDemandList/examples/get-feature-on-demand.md @@ -0,0 +1,139 @@ +--- +description: > + Examples showing how to retrieve the current state of Windows features on demand (capabilities) + using the Microsoft.Windows/FeatureOnDemandList resource. +ms.date: 04/21/2026 +ms.topic: reference +title: Get feature on demand state +--- + +# Get feature on demand state + +This example shows how you can use the `Microsoft.Windows/FeatureOnDemandList` resource to +retrieve the current state of Windows features on demand (capabilities). The examples use +`OpenSSH.Client~~~~0.0.1.0` as a representative capability identity. + +> [!IMPORTANT] +> All operations with `Microsoft.Windows/FeatureOnDemandList` require an elevated (administrator) +> session. Run your terminal as administrator before executing these commands. + +## Find capability identity strings + +Before you can get the state of a capability, you need its identity string. Use the following +command to list all capabilities and their identities: + +```powershell +dism /Online /Get-Capabilities /Format:Table +``` + +Capability identities follow the format `CapabilityName~~~~LanguageTag~Version`, for example: + +- `OpenSSH.Client~~~~0.0.1.0` +- `OpenSSH.Server~~~~0.0.1.0` +- `Language.Basic~~~en-US~0.0.1.0` + +## Get a single capability + +The following snippet shows how to retrieve the state of the OpenSSH client capability using the +[dsc resource get][01] command. + +```powershell +$instance = @{ + capabilities = @( + @{ identity = 'OpenSSH.Client~~~~0.0.1.0' } + ) +} | ConvertTo-Json -Depth 3 + +dsc resource get --resource Microsoft.Windows/FeatureOnDemandList --input $instance +``` + +When the capability is installed, DSC returns output similar to the following: + +```yaml +actualState: + capabilities: + - identity: OpenSSH.Client~~~~0.0.1.0 + state: Installed + displayName: OpenSSH Client + description: >- + Open SSH-based secure shell (SSH) client, required for secure key management and access + to remote machines. + downloadSize: 0 + installSize: 4894720 +``` + +When the capability is not installed, the `state` field reads `NotPresent`: + +```yaml +actualState: + capabilities: + - identity: OpenSSH.Client~~~~0.0.1.0 + state: NotPresent + displayName: OpenSSH Client + description: >- + Open SSH-based secure shell (SSH) client, required for secure key management and access + to remote machines. + downloadSize: 4026000 + installSize: 4894720 +``` + +## Get multiple capabilities in a single request + +You can retrieve the state of multiple capabilities in a single call by including multiple entries +in the `capabilities` array. + +```powershell +$instance = @{ + capabilities = @( + @{ identity = 'OpenSSH.Client~~~~0.0.1.0' } + @{ identity = 'OpenSSH.Server~~~~0.0.1.0' } + ) +} | ConvertTo-Json -Depth 3 + +dsc resource get --resource Microsoft.Windows/FeatureOnDemandList --input $instance +``` + +```yaml +actualState: + capabilities: + - identity: OpenSSH.Client~~~~0.0.1.0 + state: Installed + displayName: OpenSSH Client + description: Open SSH-based secure shell (SSH) client... + downloadSize: 0 + installSize: 4894720 + - identity: OpenSSH.Server~~~~0.0.1.0 + state: NotPresent + displayName: OpenSSH Server + description: Open SSH-based secure shell (SSH) server... + downloadSize: 1468500 + installSize: 1839104 +``` + +## Get a non-existent capability + +When you request a capability identity that is not recognized by DISM, the resource returns +`_exist: false` instead of raising an error. + +```powershell +$instance = @{ + capabilities = @( + @{ identity = 'NonExistent.Capability~~~~0.0.1.0' } + ) +} | ConvertTo-Json -Depth 3 + +dsc resource get --resource Microsoft.Windows/FeatureOnDemandList --input $instance +``` + +```yaml +actualState: + capabilities: + - identity: NonExistent.Capability~~~~0.0.1.0 + _exist: false +``` + +The `_exist: false` response indicates the capability identity is not recognized by DISM on this +system. + + +[01]: ../../../../../../cli/resource/get.md diff --git a/docs/reference/resources/Microsoft/Windows/FeatureOnDemandList/examples/install-remove-feature-on-demand.md b/docs/reference/resources/Microsoft/Windows/FeatureOnDemandList/examples/install-remove-feature-on-demand.md new file mode 100644 index 000000000..07ca6ca1b --- /dev/null +++ b/docs/reference/resources/Microsoft/Windows/FeatureOnDemandList/examples/install-remove-feature-on-demand.md @@ -0,0 +1,167 @@ +--- +description: > + Examples showing how to install and remove Windows features on demand (capabilities) using the + Microsoft.Windows/FeatureOnDemandList resource. +ms.date: 04/21/2026 +ms.topic: reference +title: Install and remove features on demand +--- + +# Install and remove features on demand + +This example shows how you can use the `Microsoft.Windows/FeatureOnDemandList` resource to install +and remove Windows features on demand (capabilities). The examples use +`OpenSSH.Client~~~~0.0.1.0` as a representative capability identity. + +> [!IMPORTANT] +> All operations with `Microsoft.Windows/FeatureOnDemandList` require an elevated (administrator) +> session. Run your terminal as administrator before executing these commands. + +> [!NOTE] +> Installing a capability may require internet access or an appropriately configured Windows Update +> or WSUS source. Installing large capabilities may take several minutes to complete. + +## Install a capability + +To install a capability, set its `state` to `Installed` and use the [dsc resource set][01] +command. + +```powershell +$instance = @{ + capabilities = @( + @{ + identity = 'OpenSSH.Client~~~~0.0.1.0' + state = 'Installed' + } + ) +} | ConvertTo-Json -Depth 3 + +dsc resource set --resource Microsoft.Windows/FeatureOnDemandList --input $instance +``` + +When the resource installs the capability, DSC returns the updated state: + +```yaml +beforeState: + capabilities: + - identity: OpenSSH.Client~~~~0.0.1.0 + state: NotPresent + displayName: OpenSSH Client + description: Open SSH-based secure shell (SSH) client... + downloadSize: 4026000 + installSize: 4894720 +afterState: + capabilities: + - identity: OpenSSH.Client~~~~0.0.1.0 + state: Installed + displayName: OpenSSH Client + description: Open SSH-based secure shell (SSH) client... + downloadSize: 0 + installSize: 4894720 +changedProperties: +- capabilities +``` + +If a system restart is required to complete the installation, the response includes a +`_restartRequired` property at the top level: + +```yaml +afterState: + _restartRequired: + - system: MYCOMPUTER + capabilities: + - identity: SomeCapability~~~~0.0.1.0 + state: InstallPending + ... +changedProperties: +- capabilities +``` + +## Remove a capability + +To remove a capability, set its `state` to `NotPresent` and use the [dsc resource set][01] command. + +```powershell +$instance = @{ + capabilities = @( + @{ + identity = 'OpenSSH.Client~~~~0.0.1.0' + state = 'NotPresent' + } + ) +} | ConvertTo-Json -Depth 3 + +dsc resource set --resource Microsoft.Windows/FeatureOnDemandList --input $instance +``` + +```yaml +beforeState: + capabilities: + - identity: OpenSSH.Client~~~~0.0.1.0 + state: Installed + displayName: OpenSSH Client + description: Open SSH-based secure shell (SSH) client... + downloadSize: 0 + installSize: 4894720 +afterState: + capabilities: + - identity: OpenSSH.Client~~~~0.0.1.0 + state: NotPresent + displayName: OpenSSH Client + description: Open SSH-based secure shell (SSH) client... + downloadSize: 4026000 + installSize: 4894720 +changedProperties: +- capabilities +``` + +## Manage multiple capabilities in a single operation + +You can install or remove multiple capabilities in a single **Set** call by specifying multiple +entries in the `capabilities` array. The resource processes each entry independently. + +```powershell +$instance = @{ + capabilities = @( + @{ + identity = 'OpenSSH.Client~~~~0.0.1.0' + state = 'Installed' + } + @{ + identity = 'OpenSSH.Server~~~~0.0.1.0' + state = 'NotPresent' + } + ) +} | ConvertTo-Json -Depth 3 + +dsc resource set --resource Microsoft.Windows/FeatureOnDemandList --input $instance +``` + +## Use in a configuration document + +You can also use the resource in a DSC configuration document to declaratively manage capabilities +across a system. + +```yaml +# features-on-demand.config.dsc.yaml +$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json +resources: + - name: Manage OpenSSH capabilities + type: Microsoft.Windows/FeatureOnDemandList + properties: + capabilities: + - identity: OpenSSH.Client~~~~0.0.1.0 + state: Installed + - identity: OpenSSH.Server~~~~0.0.1.0 + state: NotPresent +``` + +Apply the configuration with the [dsc config set][02] command: + +```powershell +dsc config set --file ./features-on-demand.config.dsc.yaml +``` + + +[01]: ../../../../../../cli/resource/set.md +[02]: ../../../../../../cli/config/set.md diff --git a/docs/reference/resources/Microsoft/Windows/FeatureOnDemandList/index.md b/docs/reference/resources/Microsoft/Windows/FeatureOnDemandList/index.md new file mode 100644 index 000000000..1e5e0bbde --- /dev/null +++ b/docs/reference/resources/Microsoft/Windows/FeatureOnDemandList/index.md @@ -0,0 +1,380 @@ +--- +description: Microsoft.Windows/FeatureOnDemandList resource reference documentation +ms.date: 04/21/2026 +ms.topic: reference +title: Microsoft.Windows/FeatureOnDemandList +--- + +# Microsoft.Windows/FeatureOnDemandList + +## Synopsis + +Manage Windows features on demand (capabilities) using the DISM API. + +## Metadata + +```yaml +Version : 0.1.0 +Kind : resource +Tags : [Windows, dism, capability, featureondemand, fod] +Author : Microsoft +``` + +## Instance definition syntax + +```yaml +resources: + - name: + type: Microsoft.Windows/FeatureOnDemandList + properties: + # Required properties + capabilities: + - identity: string + # Instance properties + state: Installed | NotPresent +``` + +## Description + +The `Microsoft.Windows/FeatureOnDemandList` resource enables you to idempotently manage Windows +features on demand (also known as capabilities) using the DISM API. Features on demand are optional +Windows components that are not part of the base OS image and may need to be downloaded from +Windows Update or a local source before use. Examples include language packs, accessibility tools, +the OpenSSH client and server, and developer tools like the RSAT (Remote Server Administration +Tools) suite. + +The resource can: + +- Retrieve the current state of one or more capabilities by identity. +- Install capabilities (`Installed`), downloading them from Windows Update if necessary. +- Remove capabilities from the system (`NotPresent`). +- Export a list of all capabilities on the system, optionally filtered by identity, state, display + name, or description. + +> [!NOTE] +> This resource is installed with DSC itself on Windows systems. +> +> You can update this resource by updating DSC. When you update DSC, the updated version of this +> resource is automatically available. + +## Requirements + +- The resource is only usable on a Windows system. +- All operations require an elevated (administrator) process context. +- Installing capabilities may require internet access or a configured Windows Update / WSUS source. + +## Capabilities + +The resource has the following capabilities: + +- `get` - You can use the resource to retrieve the actual state of one or more capability + instances. +- `set` - You can use the resource to enforce the desired state for one or more capability + instances. +- `export` - You can use the resource to enumerate all capabilities on the system, with optional + filtering. + +This resource uses the synthetic test functionality of DSC to determine whether an instance is in +the desired state. For more information about resource capabilities, see +[DSC resource capabilities][01]. + +## Examples + +1. [Get feature on demand state][02] - Shows how to retrieve the current state of a Windows + capability. +1. [Install and remove features on demand][03] - Shows how to install and remove Windows + capabilities using the `dsc resource set` command. +1. [Export features on demand][04] - Shows how to enumerate all capabilities on the system, with + and without filters. + +## Properties + +The following list describes the properties for the resource. + +- **Required properties:** The following properties are always + required when defining an instance of the resource. + + - [capabilities](#capabilities) - An array of capability entries. + +- **Read-only properties:** The resource returns the following + properties, but they aren't configurable. For more information about read-only properties, see + the "Read-only resource properties" section in [DSC resource properties][05]. + + - [_restartRequired](#_restartrequired) - Indicates that a system restart is required to complete + the state change. + +### capabilities + +
Expand for capabilities property metadata + +```yaml +Type : array +IsRequired : true +IsKey : false +IsReadOnly : false +``` + +
+ +An array of capability entries. Each entry is an object describing a Windows capability (Feature on +Demand). For the **Get** operation, each entry must specify [`identity`](#identity). For the **Set** +operation, each entry must specify both [`identity`](#identity) and [`state`](#state). For the +**Export** operation, the array is optional and each entry can filter results using +[`identity`](#identity), [`state`](#state), [`displayName`](#displayname), or +[`description`](#description) with wildcard support. + +Each entry in `capabilities` has the following properties: + +- [identity](#identity) - The identity string of the capability. +- [_exist](#_exist) - Indicates whether the capability is recognized by DISM. +- [state](#state) - The current or desired state of the capability. +- [displayName](#displayname) - The display name of the capability. +- [description](#description) - The description of the capability. +- [downloadSize](#downloadsize) - The download size of the capability in bytes. +- [installSize](#installsize) - The install size of the capability in bytes. + +#### identity + +
Expand for capabilities[*].identity property metadata + +```yaml +Type : string +IsRequired : true (get, set) / false (export) +IsKey : false +IsReadOnly : false +``` + +
+ +The identity string that uniquely identifies the Windows capability. For **Get** and **Set** +operations, this property is required for each entry. For **Export** operations, it's optional and +supports wildcard (`*`) patterns for case-insensitive filtering. + +Capability identities typically follow the format `CapabilityName~~~~LanguageTag~Version`, for +example `OpenSSH.Client~~~~0.0.1.0` or `Language.Basic~~~en-US~0.0.1.0`. + +Use the `dism /Online /Get-Capabilities` command to list available capability identities on your +system. + +#### _exist + +
Expand for capabilities[*]._exist property metadata + +```yaml +Type : boolean +IsRequired : false +IsKey : false +IsReadOnly : true +``` + +
+ +Indicates whether the capability exists on the system. The resource sets this property to `false` +in the **Get** response when the requested `identity` is not recognized by DISM. When `_exist` is +`false`, the `state`, `displayName`, `description`, `downloadSize`, and `installSize` properties +are not returned. + +#### state + +
Expand for capabilities[*].state property metadata + +```yaml +Type : string +IsRequired : true (set) / false (get, export) +IsKey : false +IsReadOnly : false (set input) / true (get/export output) +ValidValues : [NotPresent, UninstallPending, Staged, Removed, Installed, + InstallPending, Superseded, PartiallyInstalled] +SetValues : [Installed, NotPresent] +``` + +
+ +The state of the capability. **Get** and **Export** operations return one of the eight DISM +capability state values. **Set** operations accept only the following two values as desired state: + +| Value | Description | +|:-------------|:-------------------------------------------------------------------------------| +| `Installed` | The capability is installed. The resource installs it if not already present. | +| `NotPresent` | The capability is removed from the system. | + +The following table describes all possible state values returned by **Get** and **Export**: + +| Value | Description | +|:---------------------|:--------------------------------------------------------------------------| +| `NotPresent` | The capability is not installed and not staged. | +| `UninstallPending` | A removal operation is pending, requiring a restart to complete. | +| `Staged` | The capability payload is on disk but the capability is not installed. | +| `Removed` | The capability has been removed. | +| `Installed` | The capability is fully installed and operational. | +| `InstallPending` | An install operation is pending, requiring a restart to complete. | +| `Superseded` | The capability has been replaced by another component. | +| `PartiallyInstalled` | The capability is only partially installed. | + +#### displayName + +
Expand for capabilities[*].displayName property metadata + +```yaml +Type : string +IsRequired : false +IsKey : false +IsReadOnly : true +``` + +
+ +The human-readable display name of the capability. This property is returned by **Get** and +**Export** operations. For **Export** operations, you can specify this property as a filter value +with wildcard (`*`) support for case-insensitive matching. + +#### description + +
Expand for capabilities[*].description property metadata + +```yaml +Type : string +IsRequired : false +IsKey : false +IsReadOnly : true +``` + +
+ +A brief description of the capability. This property is returned by **Get** and **Export** +operations. For **Export** operations, you can specify this property as a filter value with +wildcard (`*`) support for case-insensitive matching. + +#### downloadSize + +
Expand for capabilities[*].downloadSize property metadata + +```yaml +Type : integer +IsRequired : false +IsKey : false +IsReadOnly : true +``` + +
+ +The size in bytes that must be downloaded to install the capability. This property is returned by +**Get** and **Export** operations. + +#### installSize + +
Expand for capabilities[*].installSize property metadata + +```yaml +Type : integer +IsRequired : false +IsKey : false +IsReadOnly : true +``` + +
+ +The size in bytes that the capability occupies on disk after installation. This property is returned +by **Get** and **Export** operations. + +### _restartRequired + +
Expand for _restartRequired property metadata + +```yaml +Type : array +IsRequired : false +IsKey : false +IsReadOnly : true +``` + +
+ +Returned at the top level of the **Set** operation response when DISM reports that a system restart +is required to complete the requested state changes. Each entry in the array is an object with a +`system` property containing the name of the computer. + +When no restart is required, this property is omitted from the response. + +## Instance validating schema + +The following snippet contains the JSON Schema that validates an instance of the resource. + +```json +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "required": ["capabilities"], + "additionalProperties": false, + "properties": { + "_restartRequired": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + }, + "capabilities": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "identity": { "type": "string" }, + "_exist": { "type": "boolean" }, + "state": { + "type": "string", + "enum": [ + "NotPresent", "UninstallPending", "Staged", "Removed", + "Installed", "InstallPending", "Superseded", "PartiallyInstalled" + ] + }, + "displayName": { "type": "string" }, + "description": { "type": "string" }, + "downloadSize": { "type": "integer" }, + "installSize": { "type": "integer" } + } + } + } + } +} +``` + +## Exit codes + +The resource returns the following exit codes from operations: + +- [0](#exit-code-0) - Success +- [1](#exit-code-1) - Error + +### Exit code 0 + +Indicates the resource operation completed without errors. The resource writes the result JSON to +stdout. + +### Exit code 1 + +Indicates the resource operation failed. The resource writes a descriptive error message to stderr. +Common causes include: + +- The `capabilities` array is empty. +- The `identity` property is missing from a capability entry in a **Get** or **Set** operation. +- The `state` property is missing from a capability entry in a **Set** operation. +- The desired `state` value is not one of the accepted **Set** values (`Installed`, `NotPresent`). +- The requested capability `identity` is not recognized by DISM. +- The DISM API returned an error while querying or modifying capability state. +- The process is not running with elevated privileges. + +## See also + +- [Microsoft.Windows/OptionalFeatureList resource][06] +- [Windows features on demand documentation][07] + + +[01]: ../../../../../concepts/resources/capabilities.md +[02]: ./examples/get-feature-on-demand.md +[03]: ./examples/install-remove-feature-on-demand.md +[04]: ./examples/export-features-on-demand.md +[05]: ../../../../../concepts/resources/properties.md#read-only-resource-properties +[06]: ../OptionalFeatureList/index.md +[07]: /windows-hardware/manufacture/desktop/features-on-demand-v2--capabilities diff --git a/docs/reference/resources/Microsoft/Windows/OptionalFeatureList/examples/enable-disable-optional-features.md b/docs/reference/resources/Microsoft/Windows/OptionalFeatureList/examples/enable-disable-optional-features.md new file mode 100644 index 000000000..14c654c66 --- /dev/null +++ b/docs/reference/resources/Microsoft/Windows/OptionalFeatureList/examples/enable-disable-optional-features.md @@ -0,0 +1,198 @@ +--- +description: > + Examples showing how to enable and disable Windows Optional features using the + Microsoft.Windows/OptionalFeatureList resource. +ms.date: 04/21/2026 +ms.topic: reference +title: Enable and disable optional features +--- + +# Enable and disable optional features + +This example shows how you can use the `Microsoft.Windows/OptionalFeatureList` resource to enable +and disable Windows Optional features on a system. The examples use `TelnetClient` as a +representative feature name. + +> [!IMPORTANT] +> All operations with `Microsoft.Windows/OptionalFeatureList` require an elevated (administrator) +> session. Run your terminal as administrator before executing these commands. + +## Enable an optional feature + +To enable an optional feature, set its `state` to `Installed` and use the [dsc resource set][01] +command. + +```powershell +$instance = @{ + features = @( + @{ + featureName = 'TelnetClient' + state = 'Installed' + } + ) +} | ConvertTo-Json -Depth 3 + +dsc resource set --resource Microsoft.Windows/OptionalFeatureList --input $instance +``` + +When the resource enables the feature, DSC returns the updated state: + +```yaml +beforeState: + features: + - featureName: TelnetClient + state: Disabled + displayName: Telnet Client + description: Includes Telnet Client + restartRequired: No +afterState: + features: + - featureName: TelnetClient + state: Installed + displayName: Telnet Client + description: Includes Telnet Client + restartRequired: No +changedProperties: +- features +``` + +If a system restart is required to complete the operation, the response includes a +`_restartRequired` property at the top level: + +```yaml +afterState: + _restartRequired: + - system: MYCOMPUTER + features: + - featureName: SomeFeature + state: InstallPending + ... +changedProperties: +- features +``` + +## Disable an optional feature (keep payload staged) + +To disable a feature while keeping the feature payload on disk (so it can be re-enabled quickly +without source media), set `state` to `NotPresent`. + +```powershell +$instance = @{ + features = @( + @{ + featureName = 'TelnetClient' + state = 'NotPresent' + } + ) +} | ConvertTo-Json -Depth 3 + +dsc resource set --resource Microsoft.Windows/OptionalFeatureList --input $instance +``` + +```yaml +beforeState: + features: + - featureName: TelnetClient + state: Installed + displayName: Telnet Client + description: Includes Telnet Client + restartRequired: No +afterState: + features: + - featureName: TelnetClient + state: Disabled + displayName: Telnet Client + description: Includes Telnet Client + restartRequired: No +changedProperties: +- features +``` + +## Disable an optional feature and remove its payload + +To disable a feature and completely remove its payload from disk, set `state` to `Removed`. This +frees disk space but requires source media (or Windows Update access) to re-enable the feature +later. + +```powershell +$instance = @{ + features = @( + @{ + featureName = 'TelnetClient' + state = 'Removed' + } + ) +} | ConvertTo-Json -Depth 3 + +dsc resource set --resource Microsoft.Windows/OptionalFeatureList --input $instance +``` + +```yaml +beforeState: + features: + - featureName: TelnetClient + state: Installed + displayName: Telnet Client + description: Includes Telnet Client + restartRequired: No +afterState: + features: + - featureName: TelnetClient + state: Removed + displayName: Telnet Client + description: Includes Telnet Client + restartRequired: No +changedProperties: +- features +``` + +## Manage multiple features in a single operation + +You can enable or disable multiple features in a single **Set** call by specifying multiple entries +in the `features` array. + +```powershell +$instance = @{ + features = @( + @{ + featureName = 'TelnetClient' + state = 'Installed' + } + @{ + featureName = 'TFTP' + state = 'NotPresent' + } + ) +} | ConvertTo-Json -Depth 3 + +dsc resource set --resource Microsoft.Windows/OptionalFeatureList --input $instance +``` + +## Use in a configuration document + +You can also use the resource in a DSC configuration document to declaratively manage optional +features across a system. + +```yaml +# optional-features.config.dsc.yaml +$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json +resources: + - name: Enable Telnet Client + type: Microsoft.Windows/OptionalFeatureList + properties: + features: + - featureName: TelnetClient + state: Installed + - featureName: TFTP + state: NotPresent +``` + +Apply the configuration with the [dsc config set][02] command: + +```powershell +dsc config set --file ./optional-features.config.dsc.yaml +``` + + +[01]: ../../../../../../cli/resource/set.md +[02]: ../../../../../../cli/config/set.md diff --git a/docs/reference/resources/Microsoft/Windows/OptionalFeatureList/examples/export-optional-features.md b/docs/reference/resources/Microsoft/Windows/OptionalFeatureList/examples/export-optional-features.md new file mode 100644 index 000000000..578feceb6 --- /dev/null +++ b/docs/reference/resources/Microsoft/Windows/OptionalFeatureList/examples/export-optional-features.md @@ -0,0 +1,144 @@ +--- +description: > + Examples showing how to export and filter Windows Optional features using the + Microsoft.Windows/OptionalFeatureList resource. +ms.date: 04/21/2026 +ms.topic: reference +title: Export optional features +--- + +# Export optional features + +This example shows how you can use the `Microsoft.Windows/OptionalFeatureList` resource to +enumerate Windows Optional features on a system, optionally filtering the results by name, state, +display name, or description. + +> [!IMPORTANT] +> All operations with `Microsoft.Windows/OptionalFeatureList` require an elevated (administrator) +> session. Run your terminal as administrator before executing these commands. + +## Export all optional features + +To retrieve a complete list of all optional features on the system, use the [dsc resource export][01] +command without any input. + +```powershell +dsc resource export --resource Microsoft.Windows/OptionalFeatureList +``` + +DSC returns a configuration document that includes all optional features and their current states: + +```yaml +$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json +resources: +- name: Microsoft.Windows/OptionalFeatureList + type: Microsoft.Windows/OptionalFeatureList + properties: + features: + - featureName: TFTP + state: Disabled + - featureName: TelnetClient + state: Disabled + - featureName: Containers-DisposableClientVM + state: Disabled + # ... additional features +``` + +> [!NOTE] +> When exporting without filters, the resource uses a fast enumeration path that returns only +> `featureName` and `state` for each feature. To retrieve additional properties such as +> `displayName` and `description`, use an export filter as shown in the examples below. + +## Export only installed features + +To list only the features that are currently enabled, provide a filter with `state: Installed`. + +```powershell +$filter = @{ + features = @( + @{ state = 'Installed' } + ) +} | ConvertTo-Json -Depth 3 + +dsc resource export --resource Microsoft.Windows/OptionalFeatureList --input $filter +``` + +```yaml +$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json +resources: +- name: Microsoft.Windows/OptionalFeatureList + type: Microsoft.Windows/OptionalFeatureList + properties: + features: + - featureName: NetFx4-AdvSrvs + state: Installed + - featureName: WCF-Services45 + state: Installed + # ... additional installed features +``` + +## Export features by name pattern + +You can filter features by name using wildcard (`*`) patterns. The match is case-insensitive. + +```powershell +$filter = @{ + features = @( + @{ featureName = 'Hyper-V*' } + ) +} | ConvertTo-Json -Depth 3 + +dsc resource export --resource Microsoft.Windows/OptionalFeatureList --input $filter +``` + +```yaml +$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json +resources: +- name: Microsoft.Windows/OptionalFeatureList + type: Microsoft.Windows/OptionalFeatureList + properties: + features: + - featureName: Microsoft-Hyper-V + state: Installed + - featureName: Microsoft-Hyper-V-Management-Clients + state: Installed + - featureName: Microsoft-Hyper-V-Management-PowerShell + state: Installed + - featureName: Microsoft-Hyper-V-Tools-All + state: Installed +``` + +## Export features with full details + +To retrieve full details including `displayName` and `description`, include those properties as +filters. An empty string (`""`) or a wildcard (`*`) matches all values for that field. + +```powershell +$filter = @{ + features = @( + @{ + featureName = 'TelnetClient' + displayName = '*' + } + ) +} | ConvertTo-Json -Depth 3 + +dsc resource export --resource Microsoft.Windows/OptionalFeatureList --input $filter +``` + +```yaml +$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json +resources: +- name: Microsoft.Windows/OptionalFeatureList + type: Microsoft.Windows/OptionalFeatureList + properties: + features: + - featureName: TelnetClient + state: Disabled + displayName: Telnet Client + description: Includes Telnet Client + restartRequired: No +``` + + +[01]: ../../../../../../cli/resource/export.md diff --git a/docs/reference/resources/Microsoft/Windows/OptionalFeatureList/examples/get-optional-feature.md b/docs/reference/resources/Microsoft/Windows/OptionalFeatureList/examples/get-optional-feature.md new file mode 100644 index 000000000..d69364f08 --- /dev/null +++ b/docs/reference/resources/Microsoft/Windows/OptionalFeatureList/examples/get-optional-feature.md @@ -0,0 +1,117 @@ +--- +description: > + Examples showing how to retrieve the current state of Windows Optional Features using the + Microsoft.Windows/OptionalFeatureList resource. +ms.date: 04/21/2026 +ms.topic: reference +title: Get optional feature state +--- + +# Get optional feature state + +This example shows how you can use the `Microsoft.Windows/OptionalFeatureList` resource to retrieve +the current state of Windows Optional Features. The examples use `TelnetClient` as a +representative feature name. + +> [!IMPORTANT] +> All operations with `Microsoft.Windows/OptionalFeatureList` require an elevated (administrator) +> session. Run your terminal as administrator before executing these commands. + +## Get a single feature + +The following snippet shows how to retrieve the state of the `TelnetClient` feature using the +[dsc resource get][01] command. + +```powershell +$instance = @{ + features = @( + @{ featureName = 'TelnetClient' } + ) +} | ConvertTo-Json -Depth 3 + +dsc resource get --resource Microsoft.Windows/OptionalFeatureList --input $instance +``` + +When the feature is disabled, DSC returns output similar to the following: + +```yaml +actualState: + features: + - featureName: TelnetClient + state: Disabled + displayName: Telnet Client + description: Includes Telnet Client + restartRequired: No +``` + +When the feature is enabled, the `state` field reads `Installed`: + +```yaml +actualState: + features: + - featureName: TelnetClient + state: Installed + displayName: Telnet Client + description: Includes Telnet Client + restartRequired: No +``` + +## Get multiple features in a single request + +You can retrieve the state of multiple features in a single call by including multiple entries in +the `features` array. + +```powershell +$instance = @{ + features = @( + @{ featureName = 'TelnetClient' } + @{ featureName = 'TFTP' } + ) +} | ConvertTo-Json -Depth 3 + +dsc resource get --resource Microsoft.Windows/OptionalFeatureList --input $instance +``` + +DSC returns the state of all requested features in a single response: + +```yaml +actualState: + features: + - featureName: TelnetClient + state: Disabled + displayName: Telnet Client + description: Includes Telnet Client + restartRequired: No + - featureName: TFTP + state: Disabled + displayName: TFTP Client + description: Includes TFTP Client + restartRequired: No +``` + +## Get a non-existent feature + +When you request a feature name that is not recognized by DISM, the resource returns `_exist: false` +instead of raising an error. + +```powershell +$instance = @{ + features = @( + @{ featureName = 'NonExistent-Feature-XYZ' } + ) +} | ConvertTo-Json -Depth 3 + +dsc resource get --resource Microsoft.Windows/OptionalFeatureList --input $instance +``` + +```yaml +actualState: + features: + - featureName: NonExistent-Feature-XYZ + _exist: false +``` + +The `_exist: false` response indicates the feature name is not recognized by DISM on this system. + + +[01]: ../../../../../../cli/resource/get.md diff --git a/docs/reference/resources/Microsoft/Windows/OptionalFeatureList/index.md b/docs/reference/resources/Microsoft/Windows/OptionalFeatureList/index.md new file mode 100644 index 000000000..3f769bc4c --- /dev/null +++ b/docs/reference/resources/Microsoft/Windows/OptionalFeatureList/index.md @@ -0,0 +1,367 @@ +--- +description: Microsoft.Windows/OptionalFeatureList resource reference documentation +ms.date: 04/21/2026 +ms.topic: reference +title: Microsoft.Windows/OptionalFeatureList +--- + +# Microsoft.Windows/OptionalFeatureList + +## Synopsis + +Manage Windows Optional features using the DISM API. + +## Metadata + +```yaml +Version : 0.1.0 +Kind : resource +Tags : [Windows, dism, optionalfeature, feature] +Author : Microsoft +``` + +## Instance definition syntax + +```yaml +resources: + - name: + type: Microsoft.Windows/OptionalFeatureList + properties: + # Required properties + features: + - featureName: string + # Instance properties + state: Installed | NotPresent | Removed +``` + +## Description + +The `Microsoft.Windows/OptionalFeatureList` resource enables you to idempotently manage Windows +Optional features using the DISM API. Optional features are components built into Windows that can +be enabled or disabled without downloading additional content. Examples include Hyper-V, +Windows Subsystem for Linux, and Internet Information Services (IIS). + +The resource can: + +- Retrieve the current state of one or more optional features by name. +- Enable optional features (`Installed`). +- Disable optional features while keeping the feature payload staged (`NotPresent`). +- Disable optional features and remove the associated payload from the system (`Removed`). +- Export a list of all optional features on the system, optionally filtered by name, state, display + name, or description. + +> [!NOTE] +> This resource is installed with DSC itself on Windows systems. +> +> You can update this resource by updating DSC. When you update DSC, the updated version of this +> resource is automatically available. + +## Requirements + +- The resource is only usable on a Windows system. +- All operations require an elevated (administrator) process context. + +## Capabilities + +The resource has the following capabilities: + +- `get` - You can use the resource to retrieve the actual state of one or more optional feature + instances. +- `set` - You can use the resource to enforce the desired state for one or more optional feature + instances. +- `export` - You can use the resource to enumerate all optional features on the system, with + optional filtering. + +This resource uses the synthetic test functionality of DSC to determine whether an instance is in +the desired state. For more information about resource capabilities, see +[DSC resource capabilities][01]. + +## Examples + +1. [Get optional feature state][02] - Shows how to retrieve the current state of a Windows + Optional Feature. +1. [Enable and disable optional features][03] - Shows how to enable and disable Windows Optional + Features using the `dsc resource set` command. +1. [Export optional features][04] - Shows how to enumerate all optional features on the system, + with and without filters. + +## Properties + +The following list describes the properties for the resource. + +- **Required properties:** The following properties are always + required when defining an instance of the resource. + + - [features](#features) - An array of optional feature entries. + +- **Read-only properties:** The resource returns the following + properties, but they aren't configurable. For more information about read-only properties, see + the "Read-only resource properties" section in [DSC resource properties][05]. + + - [_restartRequired](#_restartrequired) - Indicates that a system restart is required to complete + the state change. + +### features + +
Expand for features property metadata + +```yaml +Type : array +IsRequired : true +IsKey : false +IsReadOnly : false +``` + +
+ +An array of optional feature entries. Each entry is an object describing a Windows Optional Feature. +For the **Get** operation, each entry must specify [`featureName`](#featurename). For the **Set** +operation, each entry must specify both [`featureName`](#featurename) and [`state`](#state). For +the **Export** operation, the array is optional and each entry can filter results using +[`featureName`](#featurename), [`state`](#state), [`displayName`](#displayname), or +[`description`](#description) with wildcard support. + +Each entry in `features` has the following properties: + +- [featureName](#featurename) - The name of the optional feature. +- [_exist](#_exist) - Indicates whether the feature is recognized by DISM. +- [state](#state) - The current or desired state of the feature. +- [displayName](#displayname) - The display name of the feature. +- [description](#description) - The description of the feature. +- [restartRequired](#restartrequired) - Whether a restart is required after a state change. + +#### featureName + +
Expand for features[*].featureName property metadata + +```yaml +Type : string +IsRequired : true (get, set) / false (export) +IsKey : false +IsReadOnly : false +``` + +
+ +The name of the Windows Optional Feature. For **Get** and **Set** operations, this property is +required for each entry. For the **Export** operation, it's optional and supports wildcard (`*`) +patterns for case-insensitive filtering. + +Use the `dism /Online /Get-Features` command to list available feature names on your system. + +#### _exist + +
Expand for features[*]._exist property metadata + +```yaml +Type : boolean +IsRequired : false +IsKey : false +IsReadOnly : true +``` + +
+ +Indicates whether the feature exists on the system. The resource sets this property to `false` in +the **Get** response when the requested `featureName` is not recognized by DISM. When `_exist` is +`false`, the `state`, `displayName`, `description`, and `restartRequired` properties are not +returned. + +#### state + +
Expand for features[*].state property metadata + +```yaml +Type : string +IsRequired : true (set) / false (get, export) +IsKey : false +IsReadOnly : false (set input) / true (get/export output) +ValidValues : [NotPresent, UninstallPending, Staged, Removed, Installed, + InstallPending, Superseded, PartiallyInstalled] +SetValues : [Installed, NotPresent, Removed] +``` + +
+ +The state of the optional feature. **Get** and **Export** operations return one of the eight DISM +feature state values. **Set** operations accept only the following three values as desired state: + +| Value | Description | +|:-------------|:--------------------------------------------------------------------------| +| `Installed` | The feature is enabled. The resource enables the feature if not already. | +| `NotPresent` | The feature is disabled but the payload remains on disk (staged). | +| `Removed` | The feature is disabled and the payload is removed from the system. | + +The following table describes all possible state values returned by **Get** and **Export**: + +| Value | Description | +|:---------------------|:--------------------------------------------------------------------| +| `NotPresent` | The feature is disabled with its payload removed or never staged. | +| `UninstallPending` | A disable operation is pending, requiring a restart to complete. | +| `Staged` | The feature payload is on disk but the feature is not enabled. | +| `Removed` | The feature is disabled and its source payload has been removed. | +| `Installed` | The feature is enabled and fully operational. | +| `InstallPending` | An enable operation is pending, requiring a restart to complete. | +| `Superseded` | The feature has been replaced by another component. | +| `PartiallyInstalled` | The feature is only partially installed. | + +#### displayName + +
Expand for features[*].displayName property metadata + +```yaml +Type : string +IsRequired : false +IsKey : false +IsReadOnly : true +``` + +
+ +The human-readable display name of the optional feature. This property is returned by **Get** and +**Export** operations. For **Export** operations, you can specify this property as a filter value +with wildcard (`*`) support for case-insensitive matching. + +#### description + +
Expand for features[*].description property metadata + +```yaml +Type : string +IsRequired : false +IsKey : false +IsReadOnly : true +``` + +
+ +A brief description of the optional feature. This property is returned by **Get** and **Export** +operations. For **Export** operations, you can specify this property as a filter value with +wildcard (`*`) support for case-insensitive matching. + +#### restartRequired + +
Expand for features[*].restartRequired property metadata + +```yaml +Type : string +IsRequired : false +IsKey : false +IsReadOnly : true +ValidValues : [No, Possible, Required] +``` + +
+ +Indicates whether a system restart is required after enabling or disabling the feature. This +property is returned by **Get** and **Export** operations and cannot be set. + +| Value | Description | +|:-----------|:----------------------------------------------------------| +| `No` | No restart is required after the state change. | +| `Possible` | A restart may be required depending on system conditions. | +| `Required` | A restart is required to complete the state change. | + +### _restartRequired + +
Expand for _restartRequired property metadata + +```yaml +Type : array +IsRequired : false +IsKey : false +IsReadOnly : true +``` + +
+ +Returned at the top level of the **Set** operation response when DISM reports that a system restart +is required to complete the requested state changes. Each entry in the array is an object with a +`system` property containing the name of the computer. + +When no restart is required, this property is omitted from the response. + +## Instance validating schema + +The following snippet contains the JSON Schema that validates an instance of the resource. + +```json +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "required": ["features"], + "additionalProperties": false, + "properties": { + "_restartRequired": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + }, + "features": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "featureName": { "type": "string" }, + "_exist": { "type": "boolean" }, + "state": { + "type": "string", + "enum": [ + "NotPresent", "UninstallPending", "Staged", "Removed", + "Installed", "InstallPending", "Superseded", "PartiallyInstalled" + ] + }, + "displayName": { "type": "string" }, + "description": { "type": "string" }, + "restartRequired": { + "type": "string", + "enum": ["No", "Possible", "Required"] + } + } + } + } + } +} +``` + +## Exit codes + +The resource returns the following exit codes from operations: + +- [0](#exit-code-0) - Success +- [1](#exit-code-1) - Error + +### Exit code 0 + +Indicates the resource operation completed without errors. The resource writes the result JSON to +stdout. + +### Exit code 1 + +Indicates the resource operation failed. The resource writes a descriptive error message to stderr. +Common causes include: + +- The `features` array is empty. +- The `featureName` property is missing from a feature entry in a **Get** or **Set** operation. +- The `state` property is missing from a feature entry in a **Set** operation. +- The desired `state` value is not one of the accepted **Set** values (`Installed`, `NotPresent`, + `Removed`). +- The DISM API returned an error while querying or modifying feature state. +- The process is not running with elevated privileges. + +## See also + +- [Microsoft.Windows/FeatureOnDemandList resource][06] +- [Windows Optional Features documentation][07] + + +[01]: ../../../../../concepts/resources/capabilities.md +[02]: ./examples/get-optional-feature.md +[03]: ./examples/enable-disable-optional-features.md +[04]: ./examples/export-optional-features.md +[05]: ../../../../../concepts/resources/properties.md#read-only-resource-properties +[06]: ../FeatureOnDemandList/index.md +[07]: /windows-server/administration/windows-commands/dism/dism-operating-system-package-servicing-command-line-options diff --git a/docs/reference/resources/overview.md b/docs/reference/resources/overview.md index 050999f1b..00118ec15 100644 --- a/docs/reference/resources/overview.md +++ b/docs/reference/resources/overview.md @@ -12,6 +12,8 @@ This document lists the available resources and links to the reference documenta - [Microsoft.DSC/PowerShell](./microsoft/dsc/powershell/resource.md) - [Microsoft.DSC.Debug/Echo](./microsoft/dsc/debug/echo/resource.md) - [Microsoft.DSC.Transitional/RunCommandOnSet](./microsoft/dsc/transitional/runcomandonset/resource.md) +- [Microsoft.Windows/FeatureOnDemandList](./Microsoft/Windows/FeatureOnDemandList/index.md) +- [Microsoft.Windows/OptionalFeatureList](./Microsoft/Windows/OptionalFeatureList/index.md) - [Microsoft.Windows/RebootPending](./microsoft/windows/rebootpending/resource.md) - [Microsoft.Windows/Registry](./microsoft/windows/registry/resource.md) - [Microsoft.Windows/WindowsPowerShell](./microsoft/windows/windowspowershell/resource.md) @@ -40,6 +42,8 @@ Manifest: The following built-in resources to change the state of a machine directly: - [Microsoft.DSC.Transitional/RunCommandOnSet](./microsoft/dsc/transitional/runcomandonset/resource.md) +- [Microsoft.Windows/FeatureOnDemandList](./Microsoft/Windows/FeatureOnDemandList/index.md) +- [Microsoft.Windows/OptionalFeatureList](./Microsoft/Windows/OptionalFeatureList/index.md) - [Microsoft.Windows/Registry](./microsoft/windows/registry/resource.md) ## Built-in debugging resources From 59206416356c5174d70ac1babef2f7ee33220255 Mon Sep 17 00:00:00 2001 From: Gijs <26114636+Gijsreyn@users.noreply.github.com> Date: Tue, 21 Apr 2026 08:26:38 +0200 Subject: [PATCH 20/37] Update optional feature documentation to reflect state changes from 'Disabled' to 'NotPresent' --- .../Microsoft/Windows/FeatureOnDemandList/index.md | 2 +- .../examples/enable-disable-optional-features.md | 4 ++-- .../examples/export-optional-features.md | 8 ++++---- .../OptionalFeatureList/examples/get-optional-feature.md | 6 +++--- .../Microsoft/Windows/OptionalFeatureList/index.md | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/reference/resources/Microsoft/Windows/FeatureOnDemandList/index.md b/docs/reference/resources/Microsoft/Windows/FeatureOnDemandList/index.md index 1e5e0bbde..9e03909ab 100644 --- a/docs/reference/resources/Microsoft/Windows/FeatureOnDemandList/index.md +++ b/docs/reference/resources/Microsoft/Windows/FeatureOnDemandList/index.md @@ -121,7 +121,7 @@ Demand). For the **Get** operation, each entry must specify [`identity`](#identi operation, each entry must specify both [`identity`](#identity) and [`state`](#state). For the **Export** operation, the array is optional and each entry can filter results using [`identity`](#identity), [`state`](#state), [`displayName`](#displayname), or -[`description`](#description) with wildcard support. +[`description`](#description) Wildcards are supported for [`identity`](#identity). Each entry in `capabilities` has the following properties: diff --git a/docs/reference/resources/Microsoft/Windows/OptionalFeatureList/examples/enable-disable-optional-features.md b/docs/reference/resources/Microsoft/Windows/OptionalFeatureList/examples/enable-disable-optional-features.md index 14c654c66..8c0c1ac7c 100644 --- a/docs/reference/resources/Microsoft/Windows/OptionalFeatureList/examples/enable-disable-optional-features.md +++ b/docs/reference/resources/Microsoft/Windows/OptionalFeatureList/examples/enable-disable-optional-features.md @@ -41,7 +41,7 @@ When the resource enables the feature, DSC returns the updated state: beforeState: features: - featureName: TelnetClient - state: Disabled + state: NotPresent displayName: Telnet Client description: Includes Telnet Client restartRequired: No @@ -100,7 +100,7 @@ beforeState: afterState: features: - featureName: TelnetClient - state: Disabled + state: NotPresent displayName: Telnet Client description: Includes Telnet Client restartRequired: No diff --git a/docs/reference/resources/Microsoft/Windows/OptionalFeatureList/examples/export-optional-features.md b/docs/reference/resources/Microsoft/Windows/OptionalFeatureList/examples/export-optional-features.md index 578feceb6..357278012 100644 --- a/docs/reference/resources/Microsoft/Windows/OptionalFeatureList/examples/export-optional-features.md +++ b/docs/reference/resources/Microsoft/Windows/OptionalFeatureList/examples/export-optional-features.md @@ -36,11 +36,11 @@ resources: properties: features: - featureName: TFTP - state: Disabled + state: NotPresent - featureName: TelnetClient - state: Disabled + state: NotPresent - featureName: Containers-DisposableClientVM - state: Disabled + state: NotPresent # ... additional features ``` @@ -134,7 +134,7 @@ resources: properties: features: - featureName: TelnetClient - state: Disabled + state: NotPresent displayName: Telnet Client description: Includes Telnet Client restartRequired: No diff --git a/docs/reference/resources/Microsoft/Windows/OptionalFeatureList/examples/get-optional-feature.md b/docs/reference/resources/Microsoft/Windows/OptionalFeatureList/examples/get-optional-feature.md index d69364f08..1e3f0c4a9 100644 --- a/docs/reference/resources/Microsoft/Windows/OptionalFeatureList/examples/get-optional-feature.md +++ b/docs/reference/resources/Microsoft/Windows/OptionalFeatureList/examples/get-optional-feature.md @@ -38,7 +38,7 @@ When the feature is disabled, DSC returns output similar to the following: actualState: features: - featureName: TelnetClient - state: Disabled + state: NotPresent displayName: Telnet Client description: Includes Telnet Client restartRequired: No @@ -78,12 +78,12 @@ DSC returns the state of all requested features in a single response: actualState: features: - featureName: TelnetClient - state: Disabled + state: NotPresent displayName: Telnet Client description: Includes Telnet Client restartRequired: No - featureName: TFTP - state: Disabled + state: NotPresent displayName: TFTP Client description: Includes TFTP Client restartRequired: No diff --git a/docs/reference/resources/Microsoft/Windows/OptionalFeatureList/index.md b/docs/reference/resources/Microsoft/Windows/OptionalFeatureList/index.md index 3f769bc4c..f08d4bd47 100644 --- a/docs/reference/resources/Microsoft/Windows/OptionalFeatureList/index.md +++ b/docs/reference/resources/Microsoft/Windows/OptionalFeatureList/index.md @@ -119,7 +119,7 @@ For the **Get** operation, each entry must specify [`featureName`](#featurename) operation, each entry must specify both [`featureName`](#featurename) and [`state`](#state). For the **Export** operation, the array is optional and each entry can filter results using [`featureName`](#featurename), [`state`](#state), [`displayName`](#displayname), or -[`description`](#description) with wildcard support. +[`description`](#description) with wildcard support, or by exact [`state`](#state) value. Each entry in `features` has the following properties: @@ -196,7 +196,7 @@ The following table describes all possible state values returned by **Get** and | Value | Description | |:---------------------|:--------------------------------------------------------------------| -| `NotPresent` | The feature is disabled with its payload removed or never staged. | +| `NotPresent` | The feature is disabled but the payload remains on disk (staged). | | `UninstallPending` | A disable operation is pending, requiring a restart to complete. | | `Staged` | The feature payload is on disk but the feature is not enabled. | | `Removed` | The feature is disabled and its source payload has been removed. | From fced59ab789e15c5f07da8dee7ef3de4211852df Mon Sep 17 00:00:00 2001 From: Steve Lee Date: Mon, 27 Apr 2026 14:28:32 -0700 Subject: [PATCH 21/37] Remove unused properties from Resource in config doc --- lib/dsc-lib/src/configure/config_doc.rs | 24 ------------------------ lib/dsc-lib/src/configure/mod.rs | 8 +------- 2 files changed, 1 insertion(+), 31 deletions(-) diff --git a/lib/dsc-lib/src/configure/config_doc.rs b/lib/dsc-lib/src/configure/config_doc.rs index 8e9640678..752c97210 100644 --- a/lib/dsc-lib/src/configure/config_doc.rs +++ b/lib/dsc-lib/src/configure/config_doc.rs @@ -480,31 +480,15 @@ pub struct Resource { #[serde(default)] pub name: String, // friendly unique instance name #[serde(skip_serializing_if = "Option::is_none")] - pub comments: Option, - #[serde(skip_serializing_if = "Option::is_none")] pub directives: Option, #[serde(skip_serializing_if = "Option::is_none")] pub execution_information: Option, #[serde(skip_serializing_if = "Option::is_none")] - pub location: Option, - #[serde(skip_serializing_if = "Option::is_none")] #[schemars(regex(pattern = r"^\[resourceId\(\s*'[a-zA-Z0-9\.]+/[a-zA-Z0-9]+'\s*,\s*'[a-zA-Z0-9 ]+'\s*\)]$"))] pub depends_on: Option>, #[serde(skip_serializing_if = "Option::is_none")] - pub tags: Option>, - #[serde(skip_serializing_if = "Option::is_none")] - pub identity: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub sku: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub kind: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub scope: Option, - #[serde(skip_serializing_if = "Option::is_none")] pub copy: Option, #[serde(skip_serializing_if = "Option::is_none")] - pub plan: Option, - #[serde(skip_serializing_if = "Option::is_none")] pub properties: Option>, #[serde(skip_serializing_if = "Option::is_none")] pub resources: Option>, @@ -545,19 +529,11 @@ impl Resource { depends_on: None, directives: None, execution_information: None, - kind: None, properties: None, metadata: None, condition: None, - identity: None, - sku: None, - scope: None, copy: None, - plan: None, resources: None, - comments: None, - location: None, - tags: None, require_version: None, } } diff --git a/lib/dsc-lib/src/configure/mod.rs b/lib/dsc-lib/src/configure/mod.rs index a00a0c884..e1ebf51ff 100644 --- a/lib/dsc-lib/src/configure/mod.rs +++ b/lib/dsc-lib/src/configure/mod.rs @@ -129,12 +129,6 @@ pub fn add_resource_export_results_to_configuration(resource: &DscResource, conf let mut r: Resource = config_doc::Resource::new(); r.resource_type.clone_from(&resource.type_name); let mut props: Map = serde_json::from_value(instance.clone())?; - if let Some(kind) = props.remove("_kind") { - if !kind.is_string() { - return Err(DscError::Parser(t!("configure.mod.propertyNotString", name = "_kind", value = kind).to_string())); - } - r.kind = kind.as_str().map(std::string::ToString::to_string); - } r.name = if let Some(name) = props.remove("_name") { name.as_str() .map(std::string::ToString::to_string) @@ -299,7 +293,7 @@ fn check_security_context(metadata: Option<&Metadata>, directive_security_contex let mut security_context_required: Option<&SecurityContextKind> = None; if let Some(metadata) = &metadata - && let Some(microsoft_dsc) = &metadata.microsoft + && let Some(microsoft_dsc) = &metadata.microsoft && let Some(required_security_context) = µsoft_dsc.security_context { warn!("{}", t!("configure.mod.securityContextInMetadataDeprecated")); security_context_required = Some(required_security_context); From ae7abc37d5e6d13dae2b82a6332529ec85f5e282 Mon Sep 17 00:00:00 2001 From: Steve Lee Date: Mon, 27 Apr 2026 14:46:40 -0700 Subject: [PATCH 22/37] remove used types and fix test --- dsc/tests/dsc_export.tests.ps1 | 4 +-- lib/dsc-lib/src/configure/config_doc.rs | 38 ------------------------- tools/dsctest/src/export.rs | 2 -- tools/dsctest/src/main.rs | 1 - 4 files changed, 1 insertion(+), 44 deletions(-) diff --git a/dsc/tests/dsc_export.tests.ps1 b/dsc/tests/dsc_export.tests.ps1 index ab7aa6f15..bf71a6624 100644 --- a/dsc/tests/dsc_export.tests.ps1 +++ b/dsc/tests/dsc_export.tests.ps1 @@ -163,7 +163,7 @@ resources: $out.resources[1].properties.hello | Should -BeExactly 'world' } - It 'Export can surface _kind, _securityContext, and _name from a resource' { + It 'Export can surface _securityContext and _name from a resource' { $yaml = @' $schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/config/document.json resources: @@ -176,9 +176,7 @@ resources: $LASTEXITCODE | Should -Be 0 $out.resources.count | Should -Be 1 $out.resources[0].name | Should -BeExactly 'TestName' - $out.resources[0].kind | Should -BeExactly 'TestKind' $out.resources[0].metadata.'Microsoft.DSC'.securityContext | Should -BeExactly 'elevated' - $out.resources[0].properties.psobject.properties.name | Should -Not -Contain '_kind' $out.resources[0].properties.psobject.properties.name | Should -Not -Contain '_securityContext' $out.resources[0].properties.psobject.properties.name | Should -Not -Contain '_name' } diff --git a/lib/dsc-lib/src/configure/config_doc.rs b/lib/dsc-lib/src/configure/config_doc.rs index 752c97210..4a01d0294 100644 --- a/lib/dsc-lib/src/configure/config_doc.rs +++ b/lib/dsc-lib/src/configure/config_doc.rs @@ -427,44 +427,6 @@ pub struct Copy { pub batch_size: Option, } -#[derive(Debug, Clone, PartialEq, Deserialize, Serialize, JsonSchema)] -#[serde(deny_unknown_fields)] -pub struct Plan { - pub name: String, - #[serde(skip_serializing_if = "Option::is_none", rename = "promotionCode")] - pub promotion_code: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub publisher: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub product: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub version: Option, -} - -#[derive(Debug, Clone, PartialEq, Deserialize, Serialize, JsonSchema)] -#[serde(deny_unknown_fields)] -pub struct Identity { - #[serde(skip_serializing_if = "Option::is_none")] - pub r#type: Option, - #[serde(skip_serializing_if = "Option::is_none", rename = "userAssignedIdentities")] - pub user_assigned_identities: Option>, -} - -#[derive(Debug, Clone, PartialEq, Deserialize, Serialize, JsonSchema)] -#[serde(deny_unknown_fields)] -pub struct Sku { - #[serde(skip_serializing_if = "Option::is_none")] - pub name: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub tier: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub size: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub family: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub capacity: Option, -} - #[derive(Debug, Clone, PartialEq, Deserialize, Serialize, JsonSchema, DscRepoSchema)] #[serde(deny_unknown_fields, rename_all = "camelCase")] #[dsc_repo_schema(base_name = "document.resource", folder_path = "config")] diff --git a/tools/dsctest/src/export.rs b/tools/dsctest/src/export.rs index 2e8d162f9..20c9349e5 100644 --- a/tools/dsctest/src/export.rs +++ b/tools/dsctest/src/export.rs @@ -10,8 +10,6 @@ pub struct Export { /// Number of instances to return pub count: u64, #[serde(skip_serializing_if = "Option::is_none")] - pub _kind: Option, - #[serde(skip_serializing_if = "Option::is_none")] pub _name: Option, #[serde(rename = "_securityContext", skip_serializing_if = "Option::is_none")] pub _security_context: Option, diff --git a/tools/dsctest/src/main.rs b/tools/dsctest/src/main.rs index 66d998c4d..060d07969 100644 --- a/tools/dsctest/src/main.rs +++ b/tools/dsctest/src/main.rs @@ -125,7 +125,6 @@ fn main() { for i in 0..export.count { let instance = Export { count: i, - _kind: Some("TestKind".to_string()), _name: Some("TestName".to_string()), _security_context: Some("elevated".to_string()), }; From de4fbc4c87e59e4cc66e19aacb7f42e6030fdc24 Mon Sep 17 00:00:00 2001 From: Steve Lee Date: Mon, 27 Apr 2026 14:55:10 -0700 Subject: [PATCH 23/37] update schema tests --- lib/dsc-lib/tests/integration/schemas/schema_for.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/dsc-lib/tests/integration/schemas/schema_for.rs b/lib/dsc-lib/tests/integration/schemas/schema_for.rs index d503c522b..6c0b66a06 100644 --- a/lib/dsc-lib/tests/integration/schemas/schema_for.rs +++ b/lib/dsc-lib/tests/integration/schemas/schema_for.rs @@ -47,9 +47,6 @@ macro_rules! test_schema_for { test_schema_for!(dsc_lib::configure::config_doc::DataType); test_schema_for!(dsc_lib::configure::config_doc::CopyMode); test_schema_for!(dsc_lib::configure::config_doc::Copy); - test_schema_for!(dsc_lib::configure::config_doc::Plan); - test_schema_for!(dsc_lib::configure::config_doc::Identity); - test_schema_for!(dsc_lib::configure::config_doc::Sku); test_schema_for!(dsc_lib::configure::config_doc::Resource); } #[allow(unused_must_use)] From a2d0d8ce3091958216ff34dbec62826b3892f1e7 Mon Sep 17 00:00:00 2001 From: Steve Lee Date: Thu, 30 Apr 2026 20:56:21 -0700 Subject: [PATCH 24/37] Fix adding `what-if` capability to resources --- dsc/src/subcommand.rs | 1 + dsc/tests/dsc_resource_list.tests.ps1 | 12 +++++++ .../src/discovery/command_discovery.rs | 34 +++++++++++++------ lib/dsc-lib/src/dscresources/dscresource.rs | 2 +- 4 files changed, 38 insertions(+), 11 deletions(-) diff --git a/dsc/src/subcommand.rs b/dsc/src/subcommand.rs index 25a725b32..4fab13d3b 100644 --- a/dsc/src/subcommand.rs +++ b/dsc/src/subcommand.rs @@ -807,6 +807,7 @@ pub fn list_resources( (Capability::Delete, "d"), (Capability::Export, "e"), (Capability::Resolve, "r"), + (Capability::WhatIf, "w"), ]; let mut capabilities = "-".repeat(capability_types.len()); diff --git a/dsc/tests/dsc_resource_list.tests.ps1 b/dsc/tests/dsc_resource_list.tests.ps1 index 267c72ec5..770c139f8 100644 --- a/dsc/tests/dsc_resource_list.tests.ps1 +++ b/dsc/tests/dsc_resource_list.tests.ps1 @@ -161,4 +161,16 @@ Describe 'Tests for listing resources' { $env:DSC_RESOURCE_PATH = $oldPath } } + + It 'What-if capability is added for resources supporting it' { + $out = dsc resource list 'Test/*' | ConvertFrom-Json + $LASTEXITCODE | Should -Be 0 + foreach ($resource in $out) { + if ($resource.type -like 'Test/WhatIf*') { + $resource.capabilities | Should -Contain 'whatIf' + } else { + $resource.capabilities | Should -Not -Contain 'whatIf' + } + } + } } diff --git a/lib/dsc-lib/src/discovery/command_discovery.rs b/lib/dsc-lib/src/discovery/command_discovery.rs index 181613680..036410e8b 100644 --- a/lib/dsc-lib/src/discovery/command_discovery.rs +++ b/lib/dsc-lib/src/discovery/command_discovery.rs @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -use crate::{discovery::{DiscoveryExtensionCache, DiscoveryManifestCache, DiscoveryResourceCache, discovery_trait::{DiscoveryFilter, DiscoveryKind, ResourceDiscovery}, matches_adapter_requirement}, dscresources::adapted_resource_manifest::AdaptedDscResourceManifest, parser::Statement, types::{FullyQualifiedTypeName, TypeNameFilter}}; +use crate::{discovery::{DiscoveryExtensionCache, DiscoveryManifestCache, DiscoveryResourceCache, discovery_trait::{DiscoveryFilter, DiscoveryKind, ResourceDiscovery}, matches_adapter_requirement}, dscresources::{adapted_resource_manifest::AdaptedDscResourceManifest, resource_manifest::SetDeleteArgKind}, parser::Statement, types::{FullyQualifiedTypeName, TypeNameFilter}}; use crate::{locked_clear, locked_is_empty, locked_extend, locked_clone, locked_get}; use crate::configure::{config_doc::ResourceDiscoveryMode, context::Context}; use crate::dscresources::dscresource::{Capability, DscResource, ImplementedAs}; @@ -788,37 +788,51 @@ fn load_resource_manifest(path: &Path, manifest: &ResourceManifest) -> Result = vec![]; + let mut capabilities: HashSet = HashSet::new(); if let Some(get) = &manifest.get { verify_executable(&manifest.resource_type, "get", &get.executable, path.parent().unwrap()); - capabilities.push(Capability::Get); + capabilities.insert(Capability::Get); } if let Some(set) = &manifest.set { verify_executable(&manifest.resource_type, "set", &set.executable, path.parent().unwrap()); - capabilities.push(Capability::Set); + capabilities.insert(Capability::Set); if set.handles_exist == Some(true) { - capabilities.push(Capability::SetHandlesExist); + capabilities.insert(Capability::SetHandlesExist); + } + if let Some(args) = &set.args { + if args.iter().any(|arg| matches!(arg, SetDeleteArgKind::WhatIf{ what_if_arg: _ })) { + capabilities.insert(Capability::WhatIf); + } } } if let Some(test) = &manifest.test { verify_executable(&manifest.resource_type, "test", &test.executable, path.parent().unwrap()); - capabilities.push(Capability::Test); + capabilities.insert(Capability::Test); } if let Some(delete) = &manifest.delete { verify_executable(&manifest.resource_type, "delete", &delete.executable, path.parent().unwrap()); - capabilities.push(Capability::Delete); + capabilities.insert(Capability::Delete); + if let Some(args) = &delete.args { + if args.iter().any(|arg| matches!(arg, SetDeleteArgKind::WhatIf{ what_if_arg: _ })) { + capabilities.insert(Capability::WhatIf); + } + } } if let Some(export) = &manifest.export { verify_executable(&manifest.resource_type, "export", &export.executable, path.parent().unwrap()); - capabilities.push(Capability::Export); + capabilities.insert(Capability::Export); } if let Some(resolve) = &manifest.resolve { verify_executable(&manifest.resource_type, "resolve", &resolve.executable, path.parent().unwrap()); - capabilities.push(Capability::Resolve); + capabilities.insert(Capability::Resolve); } if let Some(SchemaKind::Command(command)) = &manifest.schema { verify_executable(&manifest.resource_type, "schema", &command.executable, path.parent().unwrap()); } + if let Some(what_if) = &manifest.what_if { + verify_executable(&manifest.resource_type, "what-if", &what_if.executable, path.parent().unwrap()); + capabilities.insert(Capability::WhatIf); + } let mut resource = DscResource::new(); resource.type_name = manifest.resource_type.clone(); @@ -827,7 +841,7 @@ fn load_resource_manifest(path: &Path, manifest: &ResourceManifest) -> Result, } -#[derive(Clone, Debug, PartialEq, Deserialize, Serialize, JsonSchema, DscRepoSchema)] +#[derive(Clone, Debug, Eq, Hash, PartialEq, Deserialize, Serialize, JsonSchema, DscRepoSchema)] #[serde(rename_all = "camelCase")] #[schemars(transform = idiomaticize_string_enum)] #[dsc_repo_schema(base_name = "resourceCapabilities", folder_path = "definitions")] From cbc325a91af994baa72b7f16a52b55659c74a9df Mon Sep 17 00:00:00 2001 From: Steve Lee Date: Thu, 30 Apr 2026 21:07:11 -0700 Subject: [PATCH 25/37] Fix clippy --- lib/dsc-lib-jsonschema/.versions.json | 6 ++++-- lib/dsc-lib/src/discovery/command_discovery.rs | 12 ++++-------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/lib/dsc-lib-jsonschema/.versions.json b/lib/dsc-lib-jsonschema/.versions.json index b3c3d0a1a..6ffb355c8 100644 --- a/lib/dsc-lib-jsonschema/.versions.json +++ b/lib/dsc-lib-jsonschema/.versions.json @@ -1,9 +1,11 @@ { "latestMajor": "V3", - "latestMinor": "V3_1", - "latestPatch": "V3_1_3", + "latestMinor": "V3_2", + "latestPatch": "V3_2_0", "all": [ "V3", + "V3_2", + "V3_2_0", "V3_1", "V3_1_3", "V3_1_2", diff --git a/lib/dsc-lib/src/discovery/command_discovery.rs b/lib/dsc-lib/src/discovery/command_discovery.rs index 036410e8b..c6d316d2d 100644 --- a/lib/dsc-lib/src/discovery/command_discovery.rs +++ b/lib/dsc-lib/src/discovery/command_discovery.rs @@ -799,10 +799,8 @@ fn load_resource_manifest(path: &Path, manifest: &ResourceManifest) -> Result Result Date: Thu, 30 Apr 2026 21:14:42 -0700 Subject: [PATCH 26/37] address copilot feedback --- dsc/tests/dsc_resource_list.tests.ps1 | 1 + lib/dsc-lib/src/discovery/command_discovery.rs | 12 +++++++++--- lib/dsc-lib/src/dscresources/dscresource.rs | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/dsc/tests/dsc_resource_list.tests.ps1 b/dsc/tests/dsc_resource_list.tests.ps1 index 770c139f8..6d73e86f7 100644 --- a/dsc/tests/dsc_resource_list.tests.ps1 +++ b/dsc/tests/dsc_resource_list.tests.ps1 @@ -165,6 +165,7 @@ Describe 'Tests for listing resources' { It 'What-if capability is added for resources supporting it' { $out = dsc resource list 'Test/*' | ConvertFrom-Json $LASTEXITCODE | Should -Be 0 + $out.Count | Should -BeGreaterThan 0 foreach ($resource in $out) { if ($resource.type -like 'Test/WhatIf*') { $resource.capabilities | Should -Contain 'whatIf' diff --git a/lib/dsc-lib/src/discovery/command_discovery.rs b/lib/dsc-lib/src/discovery/command_discovery.rs index c6d316d2d..cfa46d7fb 100644 --- a/lib/dsc-lib/src/discovery/command_discovery.rs +++ b/lib/dsc-lib/src/discovery/command_discovery.rs @@ -799,7 +799,7 @@ fn load_resource_manifest(path: &Path, manifest: &ResourceManifest) -> Result Result Result = capabilities.into_iter().collect(); + capabilities.sort(); resource.type_name = manifest.resource_type.clone(); resource.kind = kind; resource.implemented_as = Some(ImplementedAs::Command); resource.deprecation_message = manifest.deprecation_message.clone(); resource.description = manifest.description.clone(); resource.version = manifest.version.clone(); - resource.capabilities = capabilities.into_iter().collect(); + resource.capabilities = capabilities; resource.path = path.to_path_buf(); resource.directory = path.parent().unwrap().to_path_buf(); resource.manifest = Some(manifest.clone()); @@ -845,6 +847,10 @@ fn load_resource_manifest(path: &Path, manifest: &ResourceManifest) -> Result bool { + args.iter().any(|arg| matches!(arg, SetDeleteArgKind::WhatIf{ what_if_arg: _ })) +} + fn load_extension_manifest(path: &Path, manifest: &ExtensionManifest) -> Result { let mut capabilities: Vec = vec![]; if let Some(discover) = &manifest.discover { diff --git a/lib/dsc-lib/src/dscresources/dscresource.rs b/lib/dsc-lib/src/dscresources/dscresource.rs index e94c587bb..21b246e01 100644 --- a/lib/dsc-lib/src/dscresources/dscresource.rs +++ b/lib/dsc-lib/src/dscresources/dscresource.rs @@ -63,7 +63,7 @@ pub struct DscResource { pub manifest: Option, } -#[derive(Clone, Debug, Eq, Hash, PartialEq, Deserialize, Serialize, JsonSchema, DscRepoSchema)] +#[derive(Clone, Debug, Eq, Hash, PartialEq, Deserialize, Serialize, JsonSchema, DscRepoSchema, Ord, PartialOrd)] #[serde(rename_all = "camelCase")] #[schemars(transform = idiomaticize_string_enum)] #[dsc_repo_schema(base_name = "resourceCapabilities", folder_path = "definitions")] From 6f8110dbf56477c7e4652ff7e690ad9b3e93abc5 Mon Sep 17 00:00:00 2001 From: Steve Lee Date: Mon, 4 May 2026 10:24:21 -0700 Subject: [PATCH 27/37] address Tess' feedback to split out SetWhatIf and DeleteWhatIf --- dsc/src/subcommand.rs | 3 ++- dsc/tests/dsc_resource_list.tests.ps1 | 21 ++++++++++--------- .../src/discovery/command_discovery.rs | 6 +++--- lib/dsc-lib/src/dscresources/dscresource.rs | 6 ++++-- 4 files changed, 20 insertions(+), 16 deletions(-) diff --git a/dsc/src/subcommand.rs b/dsc/src/subcommand.rs index 4fab13d3b..2c3bdb52c 100644 --- a/dsc/src/subcommand.rs +++ b/dsc/src/subcommand.rs @@ -802,12 +802,13 @@ pub fn list_resources( let capability_types = [ (Capability::Get, "g"), (Capability::Set, "s"), + (Capability::SetWhatIf, "w"), (Capability::SetHandlesExist, "x"), (Capability::Test, "t"), (Capability::Delete, "d"), + (Capability::DeleteWhatIf, "W"), (Capability::Export, "e"), (Capability::Resolve, "r"), - (Capability::WhatIf, "w"), ]; let mut capabilities = "-".repeat(capability_types.len()); diff --git a/dsc/tests/dsc_resource_list.tests.ps1 b/dsc/tests/dsc_resource_list.tests.ps1 index 6d73e86f7..46085f5a2 100644 --- a/dsc/tests/dsc_resource_list.tests.ps1 +++ b/dsc/tests/dsc_resource_list.tests.ps1 @@ -162,16 +162,17 @@ Describe 'Tests for listing resources' { } } - It 'What-if capability is added for resources supporting it' { - $out = dsc resource list 'Test/*' | ConvertFrom-Json + It 'What-if capability is added for resources supporting it for: ' -TestCases @( + @{ resource = 'Test/WhatIf'; capability = 'SetWhatIf' } + @{ resource = 'Test/WhatIfArgKind'; capability = 'SetWhatIf' } + @{ resource = 'Test/WhatIfDelete'; capability = 'DeleteWhatIf' } + @{ resource = 'Test/WhatIfReturnDiff'; capability = 'SetWhatIf' } + ) { + param($resource, $capability) + + $out = dsc resource list $resource | ConvertFrom-Json $LASTEXITCODE | Should -Be 0 - $out.Count | Should -BeGreaterThan 0 - foreach ($resource in $out) { - if ($resource.type -like 'Test/WhatIf*') { - $resource.capabilities | Should -Contain 'whatIf' - } else { - $resource.capabilities | Should -Not -Contain 'whatIf' - } - } + $out.Count | Should -Be 1 + $out.capabilities | Should -Contain $capability } } diff --git a/lib/dsc-lib/src/discovery/command_discovery.rs b/lib/dsc-lib/src/discovery/command_discovery.rs index cfa46d7fb..4da974bc7 100644 --- a/lib/dsc-lib/src/discovery/command_discovery.rs +++ b/lib/dsc-lib/src/discovery/command_discovery.rs @@ -800,7 +800,7 @@ fn load_resource_manifest(path: &Path, manifest: &ResourceManifest) -> Result Result Result Date: Mon, 4 May 2026 14:59:00 -0700 Subject: [PATCH 28/37] Fix stdin inherited by child processes when no input provided When invoke_command is called with input = None, the child process previously inherited the parent's stdin handle. In CI environments where the parent has a redirected pipe for stdin, this caused PowerShell child processes to block indefinitely on `$Input` (reading from the inherited pipe that never closes). The fix sets stdin to Stdio::null() when no input is provided, ensuring the child process sees an immediate EOF rather than inheriting whatever stdin handle the parent holds. Root cause: commit 1af2c8be changed the PowerShell adapter from "config": "full" to "config": "single", which routes export through a code path that calls invoke_command with no input. Previously, the full-config path always provided input so stdin was always piped. Also adds: - Integration test that detects this regression in all environments (terminal and CI) without leaving hanging threads - A -RustTestFilter parameter to build.ps1 / Test-RustProject to allow running a specific Rust test by name via the build script Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- build.ps1 | 4 ++ helpers.build.psm1 | 9 ++- .../src/dscresources/command_resource.rs | 2 + .../tests/integration/command_resource.rs | 64 +++++++++++++++++++ lib/dsc-lib/tests/integration/main.rs | 1 + 5 files changed, 78 insertions(+), 2 deletions(-) create mode 100644 lib/dsc-lib/tests/integration/command_resource.rs diff --git a/build.ps1 b/build.ps1 index 7f79e29f3..57591ee1e 100755 --- a/build.ps1 +++ b/build.ps1 @@ -89,6 +89,7 @@ param( [switch]$Test, [string[]]$Project, [switch]$ExcludeRustTests, + [string]$RustTestFilter, [switch]$ExcludePesterTests, [ValidateSet("dsc", "adapters", "extensions", "grammars", "resources")] [string[]]$PesterTestGroup, @@ -266,6 +267,9 @@ process { Architecture = $Architecture Release = $Release } + if (-not [string]::IsNullOrEmpty($RustTestFilter)) { + $rustTestParams.TestFilter = $RustTestFilter + } Write-BuildProgress @progressParams -Status "Testing Rust projects" Test-RustProject @rustTestParams @VerboseParam } diff --git a/helpers.build.psm1 b/helpers.build.psm1 index 571a6cc8b..e56d10b3b 100644 --- a/helpers.build.psm1 +++ b/helpers.build.psm1 @@ -1798,7 +1798,8 @@ function Test-RustProject { [ValidateSet('current','aarch64-pc-windows-msvc','x86_64-pc-windows-msvc','aarch64-apple-darwin','x86_64-apple-darwin','aarch64-unknown-linux-gnu','aarch64-unknown-linux-musl','x86_64-unknown-linux-gnu','x86_64-unknown-linux-musl')] $Architecture = 'current', [switch]$Release, - [switch]$Docs + [switch]$Docs, + [string]$TestFilter ) begin { @@ -1828,7 +1829,11 @@ function Test-RustProject { } else { Write-Verbose -Verbose "Testing rust projects: [$members]" } - cargo test @flags + if (-not [string]::IsNullOrEmpty($TestFilter)) { + cargo test @flags -- $TestFilter + } else { + cargo test @flags + } if ($null -ne $LASTEXITCODE -and $LASTEXITCODE -ne 0) { Write-Error "Last exit code is $LASTEXITCODE, rust tests failed" diff --git a/lib/dsc-lib/src/dscresources/command_resource.rs b/lib/dsc-lib/src/dscresources/command_resource.rs index 8a3b2e646..306bb2ef8 100644 --- a/lib/dsc-lib/src/dscresources/command_resource.rs +++ b/lib/dsc-lib/src/dscresources/command_resource.rs @@ -767,6 +767,8 @@ async fn run_process_async(executable: &str, args: Option>, input: O let mut command = Command::new(executable); if input.is_some() { command.stdin(Stdio::piped()); + } else { + command.stdin(Stdio::null()); } command.stdout(Stdio::piped()); command.stderr(Stdio::piped()); diff --git a/lib/dsc-lib/tests/integration/command_resource.rs b/lib/dsc-lib/tests/integration/command_resource.rs new file mode 100644 index 000000000..86f8e0670 --- /dev/null +++ b/lib/dsc-lib/tests/integration/command_resource.rs @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +#[cfg(test)] +mod invoke_command { + use dsc_lib::{dscresources::command_resource::invoke_command, types::ExitCodesMap}; + + /// Verifies that when `invoke_command` is called with `input = None`, the child process + /// receives an immediate EOF on stdin (i.e., stdin is set to null) rather than inheriting + /// the parent's stdin handle. + /// + /// This is a regression test for the hang introduced in DSC 3.2.0 when the PowerShell + /// adapter changed from `"config": "full"` to `"config": "single"`. In single mode, the + /// adapter's export operation is called with no input, leaving stdin unset in the previous + /// code. Child processes that read from stdin would then block indefinitely when the parent + /// process itself had an open stdin handle — either a TTY in a terminal or a pipe in CI. + /// + /// The test uses a timed async read rather than a blocking read so that the child process + /// always exits within a bounded time. If stdin is null (the fix), `ReadAsync` completes + /// immediately returning 0 bytes (EOF), which maps to -1. If stdin is inherited (the bug), + /// `ReadAsync` blocks until the timeout fires and the test receives -2, which fails the + /// assertion. + #[test] + fn no_input_does_not_block_on_stdin() { + let exit_codes = ExitCodesMap::default(); + + // Use PowerShell's own async timeout so the child process always exits within ~5s, + // regardless of fix status. We never leave a hanging thread: + // byte:-1 → ReadAsync got EOF immediately → stdin was null → PASS + // byte:-2 → ReadAsync timed out (5 s) → stdin was NOT null → FAIL + let ps_command = concat!( + "$reader = [Console]::OpenStandardInput();", + "$buf = [byte[]]::new(1);", + "$task = $reader.ReadAsync($buf, 0, 1);", + "$completed = $task.Wait(5000);", + "$b = if ($completed) { if ($task.Result -eq 0) { -1 } else { $buf[0] } } else { -2 };", + "Write-Output \"byte:$b\"" + ); + + let result = invoke_command( + "pwsh", + Some(vec![ + "-NonInteractive".to_string(), + "-NoProfile".to_string(), + "-Command".to_string(), + ps_command.to_string(), + ]), + None, // no input — the scenario that caused the hang + None, + None, + &exit_codes, + ).expect("invoke_command should succeed"); + + let (exit_code, stdout, _stderr) = result; + assert_eq!(exit_code, 0, "Command should exit 0"); + // -1 means ReadAsync got EOF immediately, confirming stdin was set to null. + // -2 means stdin was open (inherited) and the read timed out after 5s. + assert!( + stdout.contains("byte:-1"), + "Expected EOF (byte:-1) from null stdin, got: {stdout:?}\n\ + 'byte:-2' means stdin was inherited from the parent rather than set to null." + ); + } +} diff --git a/lib/dsc-lib/tests/integration/main.rs b/lib/dsc-lib/tests/integration/main.rs index 28aca9416..3a005a0ac 100644 --- a/lib/dsc-lib/tests/integration/main.rs +++ b/lib/dsc-lib/tests/integration/main.rs @@ -13,5 +13,6 @@ //! minimize compilation times. If we defined the tests one level higher in the `tests` folder, //! Rust would generate numerous binaries to execute our tests. +#[cfg(test)] mod command_resource; #[cfg(test)] mod schemas; #[cfg(test)] mod types; From c57e0e8fe603978818c230322214d1f66ca33b6b Mon Sep 17 00:00:00 2001 From: "G.Reijn" <26114636+Gijsreyn@users.noreply.github.com> Date: Fri, 1 May 2026 11:37:19 +0200 Subject: [PATCH 29/37] Add manifest patterns for DSC resource discovery --- extensions/powershell/powershell.discover.ps1 | 3 +++ extensions/powershell/powershell.dsc.extension.json | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/extensions/powershell/powershell.discover.ps1 b/extensions/powershell/powershell.discover.ps1 index d8cced58a..df36f16c0 100644 --- a/extensions/powershell/powershell.discover.ps1 +++ b/extensions/powershell/powershell.discover.ps1 @@ -81,6 +81,9 @@ function Invoke-DscResourceDiscovery { '*.dsc.adaptedresource.json' '*.dsc.adaptedresource.yaml' '*.dsc.adaptedresource.yml' + '*.dsc.manifests.json' + '*.dsc.manifests.yaml' + '*.dsc.manifests.yml' ) $enumOptions = [System.IO.EnumerationOptions]@{ IgnoreInaccessible = $true; RecurseSubdirectories = $true } foreach ($pattern in $searchPatterns) { diff --git a/extensions/powershell/powershell.dsc.extension.json b/extensions/powershell/powershell.dsc.extension.json index 5323dc614..16081a13a 100644 --- a/extensions/powershell/powershell.dsc.extension.json +++ b/extensions/powershell/powershell.dsc.extension.json @@ -1,7 +1,7 @@ { "$schema": "https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.json", "type": "Microsoft.PowerShell/Discover", - "version": "0.1.0", + "version": "0.1.1", "description": "Discovers DSC resources packaged in PowerShell 7 modules.", "condition": "[not(equals(tryWhich('pwsh'), null()))]", "discover": { From 8a0afd09f8e9a0132409b174b97337ef6fac4601 Mon Sep 17 00:00:00 2001 From: "G.Reijn" <26114636+Gijsreyn@users.noreply.github.com> Date: Fri, 1 May 2026 14:10:52 +0200 Subject: [PATCH 30/37] Update tests --- dsc/tests/dsc_extension_discover.tests.ps1 | 2 +- .../powershell/powershell.discover.tests.ps1 | 39 +++++++++++++++++++ 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/dsc/tests/dsc_extension_discover.tests.ps1 b/dsc/tests/dsc_extension_discover.tests.ps1 index c754ae292..7b0fc17c7 100644 --- a/dsc/tests/dsc_extension_discover.tests.ps1 +++ b/dsc/tests/dsc_extension_discover.tests.ps1 @@ -26,7 +26,7 @@ Describe 'Discover extension tests' { if ($IsWindows) { $out.Count | Should -Be 3 -Because ($out | Out-String) $out[0].type | Should -BeExactly 'Microsoft.PowerShell/Discover' - $out[0].version | Should -BeExactly '0.1.0' + $out[0].version | Should -BeExactly '0.1.1' $out[0].capabilities | Should -BeExactly @('discover') $out[0].manifest | Should -Not -BeNullOrEmpty $out[1].type | Should -BeExactly 'Microsoft.Windows.Appx/Discover' diff --git a/extensions/powershell/powershell.discover.tests.ps1 b/extensions/powershell/powershell.discover.tests.ps1 index 540181fcb..783df14c8 100644 --- a/extensions/powershell/powershell.discover.tests.ps1 +++ b/extensions/powershell/powershell.discover.tests.ps1 @@ -47,6 +47,39 @@ BeforeAll { $adaptedManifestPath = Join-Path $TestDrive "fake.dsc.adaptedresource.json" $fakeAdaptedManifest | ConvertTo-Json -Depth 10 | Set-Content -Path $adaptedManifestPath + $fakeManifestList = @{ + '$schema' = "https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.json" + resources = @( + @{ + type = "Test/FakeListedResource" + version = "0.1.0" + kind = "resource" + get = @{ + executable = "fakeListedResource" + args = @( + "get", + @{ + jsonInputArg = "--input" + mandatory = $true + } + ) + } + } + ) + adaptedResources = @( + @{ + type = "Test/FakeListedAdaptedResource" + kind = "resource" + version = "0.1.0" + requireAdapter = "Microsoft.Adapter/PowerShell" + path = "FakeAdapted.psd1" + } + ) + } + + $manifestListPath = Join-Path $TestDrive "fake.dsc.manifests.json" + $fakeManifestList | ConvertTo-Json -Depth 10 | Set-Content -Path $manifestListPath + $fakePsd1Path = Join-Path $TestDrive "FakeAdapted.psd1" Set-Content -Path $fakePsd1Path -Value "@{ ModuleVersion = '0.1.0' }" $script:OldPSModulePath = $env:PSModulePath @@ -162,4 +195,10 @@ Describe 'Tests for PowerShell resource discovery' { $out = & $script:discoverScript | ConvertFrom-Json $out.manifestPath | Should -Contain $adaptedManifestPath } + + It 'Should discover *.dsc.manifests.* manifest-list files' { + Remove-Item -Force -ErrorAction SilentlyContinue -Path $script:cacheFilePath + $out = & $script:discoverScript | ConvertFrom-Json + $out.manifestPath | Should -Contain $manifestListPath + } } From 38da4364cae9b80451caa4c6adf0e275d7f8cf03 Mon Sep 17 00:00:00 2001 From: "G.Reijn" <26114636+Gijsreyn@users.noreply.github.com> Date: Fri, 1 May 2026 14:39:31 +0200 Subject: [PATCH 31/37] Update version check for discovered resources to 0.1.1 --- dsc/tests/dsc_extension_discover.tests.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dsc/tests/dsc_extension_discover.tests.ps1 b/dsc/tests/dsc_extension_discover.tests.ps1 index 7b0fc17c7..57ab35f1b 100644 --- a/dsc/tests/dsc_extension_discover.tests.ps1 +++ b/dsc/tests/dsc_extension_discover.tests.ps1 @@ -40,7 +40,7 @@ Describe 'Discover extension tests' { } else { $out.Count | Should -Be 2 -Because ($out | Out-String) $out[0].type | Should -BeExactly 'Microsoft.PowerShell/Discover' - $out[0].version | Should -BeExactly '0.1.0' + $out[0].version | Should -BeExactly '0.1.1' $out[0].capabilities | Should -BeExactly @('discover') $out[0].manifest | Should -Not -BeNullOrEmpty $out[1].type | Should -BeExactly 'Test/Discover' From 4ff2287f0306bd12cb20e6d25c63a20953efea54 Mon Sep 17 00:00:00 2001 From: JohnMcPMS Date: Tue, 5 May 2026 09:01:07 -0700 Subject: [PATCH 32/37] reduce timeout --- lib/dsc-lib/tests/integration/command_resource.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/dsc-lib/tests/integration/command_resource.rs b/lib/dsc-lib/tests/integration/command_resource.rs index 86f8e0670..6f87c88b8 100644 --- a/lib/dsc-lib/tests/integration/command_resource.rs +++ b/lib/dsc-lib/tests/integration/command_resource.rs @@ -24,15 +24,15 @@ mod invoke_command { fn no_input_does_not_block_on_stdin() { let exit_codes = ExitCodesMap::default(); - // Use PowerShell's own async timeout so the child process always exits within ~5s, + // Use PowerShell's own async timeout so the child process always exits within ~2s, // regardless of fix status. We never leave a hanging thread: // byte:-1 → ReadAsync got EOF immediately → stdin was null → PASS - // byte:-2 → ReadAsync timed out (5 s) → stdin was NOT null → FAIL + // byte:-2 → ReadAsync timed out (2 s) → stdin was NOT null → FAIL let ps_command = concat!( "$reader = [Console]::OpenStandardInput();", "$buf = [byte[]]::new(1);", "$task = $reader.ReadAsync($buf, 0, 1);", - "$completed = $task.Wait(5000);", + "$completed = $task.Wait(2000);", "$b = if ($completed) { if ($task.Result -eq 0) { -1 } else { $buf[0] } } else { -2 };", "Write-Output \"byte:$b\"" ); @@ -54,7 +54,7 @@ mod invoke_command { let (exit_code, stdout, _stderr) = result; assert_eq!(exit_code, 0, "Command should exit 0"); // -1 means ReadAsync got EOF immediately, confirming stdin was set to null. - // -2 means stdin was open (inherited) and the read timed out after 5s. + // -2 means stdin was open (inherited) and the read timed out after 2s. assert!( stdout.contains("byte:-1"), "Expected EOF (byte:-1) from null stdin, got: {stdout:?}\n\ From 849e2822439d276f4225a263e1b4f7989e57995d Mon Sep 17 00:00:00 2001 From: "Steve Lee (POWERSHELL HE/HIM) (from Dev Box)" Date: Tue, 5 May 2026 18:06:35 -0700 Subject: [PATCH 33/37] Add `Microsoft.Windows/RegistryList` resource --- Cargo.lock | 2 +- lib/dsc-lib-jsonschema/.versions.json | 6 +- lib/dsc-lib-registry/Cargo.toml | 2 +- lib/dsc-lib-registry/locales/en-us.toml | 2 - lib/dsc-lib-registry/src/lib.rs | 28 ++- lib/dsc-lib/locales/en-us.toml | 2 +- resources/registry/.project.data.json | 2 +- resources/registry/locales/en-us.toml | 1 + .../registry/registry.dsc.manifests.json | 122 ++++++++++++ resources/registry/registry.dsc.resource.json | 64 ------- resources/registry/src/args.rs | 9 +- resources/registry/src/main.rs | 179 ++++++++++++------ resources/registry/src/types.rs | 12 ++ .../tests/registry.config.get.tests.ps1 | 2 +- .../registry/tests/registrylist_get.tests.ps1 | 38 ++++ .../registry/tests/registrylist_set.tests.ps1 | 57 ++++++ .../tests/registrylist_whatif.tests.ps1 | 77 ++++++++ 17 files changed, 466 insertions(+), 139 deletions(-) create mode 100644 resources/registry/registry.dsc.manifests.json delete mode 100644 resources/registry/registry.dsc.resource.json create mode 100644 resources/registry/src/types.rs create mode 100644 resources/registry/tests/registrylist_get.tests.ps1 create mode 100644 resources/registry/tests/registrylist_set.tests.ps1 create mode 100644 resources/registry/tests/registrylist_whatif.tests.ps1 diff --git a/Cargo.lock b/Cargo.lock index 53b0cf018..e64487eee 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -861,7 +861,7 @@ dependencies = [ [[package]] name = "dsc-lib-registry" -version = "0.1.0" +version = "1.1.0" dependencies = [ "cc", "crossterm", diff --git a/lib/dsc-lib-jsonschema/.versions.json b/lib/dsc-lib-jsonschema/.versions.json index b3c3d0a1a..6ffb355c8 100644 --- a/lib/dsc-lib-jsonschema/.versions.json +++ b/lib/dsc-lib-jsonschema/.versions.json @@ -1,9 +1,11 @@ { "latestMajor": "V3", - "latestMinor": "V3_1", - "latestPatch": "V3_1_3", + "latestMinor": "V3_2", + "latestPatch": "V3_2_0", "all": [ "V3", + "V3_2", + "V3_2_0", "V3_1", "V3_1_3", "V3_1_2", diff --git a/lib/dsc-lib-registry/Cargo.toml b/lib/dsc-lib-registry/Cargo.toml index 0bc2e34dd..d03c862f8 100644 --- a/lib/dsc-lib-registry/Cargo.toml +++ b/lib/dsc-lib-registry/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "dsc-lib-registry" -version = "0.1.0" +version = "1.1.0" edition = "2024" [package.metadata.i18n] diff --git a/lib/dsc-lib-registry/locales/en-us.toml b/lib/dsc-lib-registry/locales/en-us.toml index 50f33e555..add2844ea 100644 --- a/lib/dsc-lib-registry/locales/en-us.toml +++ b/lib/dsc-lib-registry/locales/en-us.toml @@ -17,5 +17,3 @@ unsupportedValueDataType = "Unsupported registry value data type" whatIfCreateKey = "Key '%{subkey}' not found, would create it" whatIfDeleteValue = "Would delete value '%{value_name}'" whatIfDeleteSubkey = "Would delete subkey '%{subkey_name}'" -removeErrorKeyNotExist = "Key already does not exist" -removeDeletingSubKey = "Deleting subkey '%{name}' using %{parent}" diff --git a/lib/dsc-lib-registry/src/lib.rs b/lib/dsc-lib-registry/src/lib.rs index 48e18affc..902abda9f 100644 --- a/lib/dsc-lib-registry/src/lib.rs +++ b/lib/dsc-lib-registry/src/lib.rs @@ -29,8 +29,8 @@ impl RegistryHelper { /// # Errors /// /// * `RegistryError` - The error that occurred. - pub fn new_from_json(config: &str) -> Result { - let registry: Registry = match serde_json::from_str(config) { + pub fn new_from_json(registry_entry: &str) -> Result { + let registry: Registry = match serde_json::from_str(registry_entry) { Ok(config) => config, Err(e) => return Err(RegistryError::Json(e)), }; @@ -47,6 +47,28 @@ impl RegistryHelper { ) } + /// Create a new `RegistryHelper` from registry configuration. + /// + /// # Arguments + /// + /// * `config` - The registry configuration struct. + /// + /// # Errors + /// + /// * `RegistryError` - The error that occurred. + pub fn new_from_registry(registry_entry: &Registry) -> Result { + let (hive, subkey) = get_hive_from_path(®istry_entry.key_path)?; + + Ok( + Self { + config: registry_entry.clone(), + hive, + subkey: subkey.to_string(), + what_if: false + } + ) + } + /// Create a new `RegistryHelper`. /// /// # Arguments @@ -266,7 +288,6 @@ impl RegistryHelper { Ok(reg_key) => reg_key, // handle NotFound error Err(RegistryError::RegistryKeyNotFound(_)) => { - eprintln!("{}", t!("registry_helper.removeErrorKeyNotExist")); return Ok(None); }, Err(RegistryError::RegistryKey(key::Error::PermissionDenied(_, _))) => { @@ -318,7 +339,6 @@ impl RegistryHelper { ..Default::default() })); } - eprintln!("{}", t!("registry_helper.removeDeletingSubKey", name = subkey_name, parent = parent_reg_key)); let Ok(subkey_name) = UCString::::from_str(subkey_name) else { return self.handle_error_or_what_if(RegistryError::Utf16Conversion("subkey_name".to_string())); }; diff --git a/lib/dsc-lib/locales/en-us.toml b/lib/dsc-lib/locales/en-us.toml index c6645b8ad..81083031c 100644 --- a/lib/dsc-lib/locales/en-us.toml +++ b/lib/dsc-lib/locales/en-us.toml @@ -42,7 +42,7 @@ valueCouldNotBeTransformedAsString = "Property value '%{value}' could not be tra elevationRequired = "Elevated security context required" restrictedRequired = "Restricted security context required" desired = "Desired state: %{state}" -handlesExist = "Resource handles _exist or _exist is true" +handlesExist = "Resource set handles _exist" implementsDelete = "Resource implements delete and _exist is false" groupNotSupportedForDelete = "Group resources not supported for delete" deleteNotSupported = "Resource '%{resource}' does not support `delete` and does not handle `_exist` as false" diff --git a/resources/registry/.project.data.json b/resources/registry/.project.data.json index 2ff010f4f..7d43b44a7 100644 --- a/resources/registry/.project.data.json +++ b/resources/registry/.project.data.json @@ -9,7 +9,7 @@ ], "CopyFiles": { "Windows": [ - "registry.dsc.resource.json" + "registry.dsc.manifests.json" ] } } diff --git a/resources/registry/locales/en-us.toml b/resources/registry/locales/en-us.toml index 22cf3a564..eb2f897af 100644 --- a/resources/registry/locales/en-us.toml +++ b/resources/registry/locales/en-us.toml @@ -26,6 +26,7 @@ findArgsRecurseHelp = "Recursively find." findArgsKeysOnlyHelp = "Only find keys." findArgsValuesOnlyHelp = "Only find values." schemaAbout = "Retrieve JSON schema." +schemaArgsListHelp = "Retrieve JSON schema for RegistryList." [main] tracingInitError = "Unable to set global default tracing subscriber. Tracing is disabled." diff --git a/resources/registry/registry.dsc.manifests.json b/resources/registry/registry.dsc.manifests.json new file mode 100644 index 000000000..260b860d8 --- /dev/null +++ b/resources/registry/registry.dsc.manifests.json @@ -0,0 +1,122 @@ +{ + "resources": [ + { + "$schema": "https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.json", + "type": "Microsoft.Windows/Registry", + "description": "Manage Windows Registry keys and values", + "tags": [ + "Windows" + ], + "version": "1.0.0", + "get": { + "executable": "registry", + "args": [ + "config", + "get", + { + "jsonInputArg": "--input", + "mandatory": true + } + ] + }, + "set": { + "executable": "registry", + "args": [ + "config", + "set", + { + "jsonInputArg": "--input", + "mandatory": true + }, + { + "whatIfArg": "-w" + } + ], + "whatIfReturns": "state" + }, + "delete": { + "executable": "registry", + "args": [ + "config", + "delete", + { + "jsonInputArg": "--input", + "mandatory": true + }, + { + "whatIfArg": "-w" + } + ] + }, + "exitCodes": { + "0": "Success", + "1": "Invalid parameter", + "2": "Invalid input", + "3": "Registry error", + "4": "JSON serialization failed" + }, + "schema": { + "command": { + "executable": "registry", + "args": [ + "schema" + ] + } + } + }, + { + "$schema": "https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.json", + "type": "Microsoft.Windows/RegistryList", + "description": "Manage multiple Windows Registry keys and values", + "tags": [ + "Windows" + ], + "version": "1.0.0", + "get": { + "executable": "registry", + "args": [ + "config", + "get", + "--list", + { + "jsonInputArg": "--input", + "mandatory": true + } + ] + }, + "set": { + "executable": "registry", + "args": [ + "config", + "set", + "--list", + { + "jsonInputArg": "--input", + "mandatory": true + }, + { + "whatIfArg": "-w" + } + ], + "whatIfReturns": "state", + "handlesExist": true + }, + "exitCodes": { + "0": "Success", + "1": "Invalid parameter", + "2": "Invalid input", + "3": "Registry error", + "4": "JSON serialization failed" + }, + "schema": { + "command": { + "executable": "registry", + "args": [ + "schema", + "--list" + ] + } + } + } + ] +} diff --git a/resources/registry/registry.dsc.resource.json b/resources/registry/registry.dsc.resource.json deleted file mode 100644 index 40f416f61..000000000 --- a/resources/registry/registry.dsc.resource.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "$schema": "https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.json", - "type": "Microsoft.Windows/Registry", - "description": "Manage Windows Registry keys and values", - "tags": [ - "Windows" - ], - "version": "1.0.0", - "get": { - "executable": "registry", - "args": [ - "config", - "get", - { - "jsonInputArg": "--input", - "mandatory": true - } - ] - }, - "set": { - "executable": "registry", - "args": [ - "config", - "set", - { - "jsonInputArg": "--input", - "mandatory": true - }, - { - "whatIfArg": "-w" - } - ], - "whatIfReturns": "state" - }, - "delete": { - "executable": "registry", - "args": [ - "config", - "delete", - { - "jsonInputArg": "--input", - "mandatory": true - }, - { - "whatIfArg": "-w" - } - ] - }, - "exitCodes": { - "0": "Success", - "1": "Invalid parameter", - "2": "Invalid input", - "3": "Registry error", - "4": "JSON serialization failed" - }, - "schema": { - "command": { - "executable": "registry", - "args": [ - "schema" - ] - } - } -} diff --git a/resources/registry/src/args.rs b/resources/registry/src/args.rs index cbd72d885..08e36f349 100644 --- a/resources/registry/src/args.rs +++ b/resources/registry/src/args.rs @@ -18,11 +18,15 @@ pub enum ConfigSubCommand { Get { #[clap(short, long, required = true, help = t!("args.configArgsInputHelp").to_string())] input: String, + #[clap(short, long, hide = true)] + list: bool, }, #[clap(name = "set", about = t!("args.configSetAbout").to_string())] Set { #[clap(short, long, required = true, help = t!("args.configArgsInputHelp").to_string())] input: String, + #[clap(short, long, hide = true)] + list: bool, #[clap(short = 'w', long, help = t!("args.configArgsWhatIfHelp").to_string())] what_if: bool, }, @@ -81,5 +85,8 @@ pub enum SubCommand { subcommand: ConfigSubCommand, }, #[clap(name = "schema", about = t!("args.schemaAbout").to_string())] - Schema, + Schema { + #[clap(short, long, help = t!("args.schemaArgsListHelp").to_string())] + list: bool, + } } diff --git a/resources/registry/src/main.rs b/resources/registry/src/main.rs index 8511dcdc5..885188fc1 100644 --- a/resources/registry/src/main.rs +++ b/resources/registry/src/main.rs @@ -12,10 +12,12 @@ use dsc_lib_registry::{config::Registry, RegistryHelper}; use rust_i18n::t; use schemars::schema_for; use std::process::exit; -use tracing::{debug, error}; +use tracing::{error, trace}; use tracing_subscriber::{filter::LevelFilter, prelude::__tracing_subscriber_SubscriberExt, EnvFilter, Layer}; +use types::RegistryList; mod args; +mod types; rust_i18n::i18n!("locales", fallback = "en-us"); @@ -33,83 +35,114 @@ fn main() { let args = Arguments::parse(); match args.subcommand { args::SubCommand::Query { key_path, value_name, recurse } => { - debug!("Get key_path: {key_path}, value_name: {value_name:?}, recurse: {recurse}"); + trace!("Get key_path: {key_path}, value_name: {value_name:?}, recurse: {recurse}"); }, args::SubCommand::Set { key_path, value } => { - debug!("Set key_path: {key_path}, value: {value}"); + trace!("Set key_path: {key_path}, value: {value}"); }, args::SubCommand::Remove { key_path, value_name, recurse } => { - debug!("Remove key_path: {key_path}, value_name: {value_name:?}, recurse: {recurse}"); + trace!("Remove key_path: {key_path}, value_name: {value_name:?}, recurse: {recurse}"); }, args::SubCommand::Find { key_path, find, recurse, keys_only, values_only } => { - debug!("Find key_path: {key_path}, find: {find}, recurse: {recurse:?}, keys_only: {keys_only:?}, values_only: {values_only:?}"); + trace!("Find key_path: {key_path}, find: {find}, recurse: {recurse:?}, keys_only: {keys_only:?}, values_only: {values_only:?}"); }, args::SubCommand::Config { subcommand } => { match subcommand { - args::ConfigSubCommand::Get{input} => { - debug!("Get input: {input}"); - let reg_helper = match RegistryHelper::new_from_json(&input) { - Ok(reg_helper) => reg_helper, - Err(err) => { - error!("{err}"); - exit(EXIT_INVALID_INPUT); - } - }; - match reg_helper.get() { - Ok(reg_config) => { - let json = serde_json::to_string(®_config).unwrap(); - println!("{json}"); - }, - Err(err) => { - error!("{err}"); - exit(EXIT_REGISTRY_ERROR); - } - } - }, - args::ConfigSubCommand::Set{input, what_if} => { - debug!("Set input: {input}, what_if: {what_if}"); - let mut reg_helper = match RegistryHelper::new_from_json(&input) { - Ok(reg_helper) => reg_helper, - Err(err) => { - error!("{err}"); - exit(EXIT_INVALID_INPUT); - } - }; - if what_if { reg_helper.enable_what_if(); } - - // In what-if, if the desired state is _exist: false, route to delete - if what_if - && let Ok(desired) = serde_json::from_str::(&input) - && matches!(desired.exist, Some(false)) { - match reg_helper.remove() { - Ok(Some(reg_config)) => { + args::ConfigSubCommand::Get{input, list} => { + trace!("Get input: {input}"); + let mut output = RegistryList { registry_entries: vec![] }; + let reg_list = import_input(&input, list); + for reg in reg_list.registry_entries { + let reg_helper = match RegistryHelper::new_from_registry(®) { + Ok(helper) => helper, + Err(err) => { + error!("{err}"); + exit(EXIT_INVALID_INPUT); + } + }; + match reg_helper.get() { + Ok(reg_config) => { + if list { + output.registry_entries.push(reg_config); + } else { let json = serde_json::to_string(®_config).unwrap(); println!("{json}"); - }, - Ok(None) => {}, - Err(err) => { - error!("{err}"); - exit(EXIT_REGISTRY_ERROR); + exit(EXIT_SUCCESS); } + }, + Err(err) => { + error!("{err}"); + exit(EXIT_REGISTRY_ERROR); } - return; } - - match reg_helper.set() { - Ok(reg_config) => { - if let Some(config) = reg_config { - let json = serde_json::to_string(&config).unwrap(); - println!("{json}"); + } + let json = serde_json::to_string(&output).unwrap(); + println!("{json}"); + exit(EXIT_SUCCESS); + }, + args::ConfigSubCommand::Set{input, list, what_if} => { + trace!("Set input: {input}, what_if: {what_if}"); + let mut output = RegistryList { registry_entries: vec![] }; + let reg_list = import_input(&input, list); + for reg in reg_list.registry_entries { + let mut reg_helper = match RegistryHelper::new_from_registry(®) { + Ok(helper) => helper, + Err(err) => { + error!("{err}"); + exit(EXIT_INVALID_INPUT); + } + }; + if what_if { reg_helper.enable_what_if(); } + if let Some(exist) = reg.exist && !exist { + match reg_helper.remove() { + Ok(Some(reg_config)) => { + if what_if { + if list { + output.registry_entries.push(reg_config); + } else { + let json = serde_json::to_string(®_config).unwrap(); + println!("{json}"); + exit(EXIT_SUCCESS); + } + } + }, + Ok(None) => {}, + Err(err) => { + error!("{err}"); + exit(EXIT_REGISTRY_ERROR); + } + } + continue; + } + match reg_helper.set() { + Ok(reg_config) => { + if what_if && let Some(config) = reg_config { + if list { + output.registry_entries.push(config); + } else { + let json = serde_json::to_string(&config).unwrap(); + println!("{json}"); + exit(EXIT_SUCCESS); + } + } + if !list { + exit(EXIT_SUCCESS); + } + }, + Err(err) => { + error!("{err}"); + exit(EXIT_REGISTRY_ERROR); } - }, - Err(err) => { - error!("{err}"); - exit(EXIT_REGISTRY_ERROR); } } + if what_if { + let json = serde_json::to_string(&output).unwrap(); + println!("{json}"); + } + exit(EXIT_SUCCESS); }, args::ConfigSubCommand::Delete{input, what_if} => { - debug!("Delete input: {input}, what_if: {what_if}"); + trace!("Delete input: {input}, what_if: {what_if}"); let mut reg_helper = match RegistryHelper::new_from_json(&input) { Ok(reg_helper) => reg_helper, Err(err) => { @@ -132,8 +165,12 @@ fn main() { }, } }, - args::SubCommand::Schema => { - let schema = schema_for!(Registry); + args::SubCommand::Schema{list} => { + let schema = if list { + schema_for!(RegistryList) + } else { + schema_for!(Registry) + }; let json =serde_json::to_string(&schema).unwrap(); println!("{json}"); }, @@ -142,6 +179,26 @@ fn main() { exit(EXIT_SUCCESS); } +fn import_input(input: &str, list: bool) -> RegistryList { + if list { + match serde_json::from_str::(input) { + Ok(reg_list) => reg_list, + Err(err) => { + error!("{err}"); + exit(EXIT_INVALID_INPUT); + } + } + } else { + match serde_json::from_str::(input) { + Ok(reg) => RegistryList { registry_entries: vec![reg] }, + Err(err) => { + error!("{err}"); + exit(EXIT_INVALID_INPUT); + } + } + } +} + pub fn enable_tracing() { // default filter to trace level let filter = EnvFilter::builder().with_default_directive(LevelFilter::TRACE.into()).parse("").unwrap_or_default(); diff --git a/resources/registry/src/types.rs b/resources/registry/src/types.rs new file mode 100644 index 000000000..f4ddf7471 --- /dev/null +++ b/resources/registry/src/types.rs @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +use dsc_lib_registry::config::Registry; +use schemars::JsonSchema; +use serde::{Deserialize, Serialize}; + +#[derive(Serialize, Deserialize, JsonSchema)] +#[serde(rename_all = "camelCase")] +pub struct RegistryList { + pub registry_entries: Vec, +} diff --git a/resources/registry/tests/registry.config.get.tests.ps1 b/resources/registry/tests/registry.config.get.tests.ps1 index c012d673f..1f335ce92 100644 --- a/resources/registry/tests/registry.config.get.tests.ps1 +++ b/resources/registry/tests/registry.config.get.tests.ps1 @@ -41,7 +41,7 @@ Describe 'Registry config get tests' { $out = registry config get --input $json 2>&1 $LASTEXITCODE | Should -Be 0 $result = $out | ConvertFrom-Json - $result[0].level | Should -BeExactly 'DEBUG' + $result[0].level | Should -BeExactly 'TRACE' $result[0].fields.message | Should -BeLike 'Get Input:*' } } diff --git a/resources/registry/tests/registrylist_get.tests.ps1 b/resources/registry/tests/registrylist_get.tests.ps1 new file mode 100644 index 000000000..07b4cf3cf --- /dev/null +++ b/resources/registry/tests/registrylist_get.tests.ps1 @@ -0,0 +1,38 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. + +Describe 'Registry list get tests' { + It 'Can get a registry list' -Skip:(!$IsWindows) { + $config_yaml = @' + $schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json + resources: + - name: Reg 1 + type: Microsoft.Windows/RegistryList + properties: + registryEntries: + - keyPath: HKLM\Software\Microsoft\Windows\CurrentVersion + valueName: ProgramFilesDir + - keyPath: HKLM\Software\Microsoft\Windows\CurrentVersion + valueName: ProgramFilesPath + - keyPath: HKLM\Software\Microsoft\Windows\CurrentVersion + valueName: CommonFilesDir + - keyPath: HKLM\Software\Microsoft\Windows\CurrentVersion + valueName: NonExistentValue +'@ + $out = dsc config get --input $config_yaml 2>$TestDrive/error.log | ConvertFrom-Json + $LASTEXITCODE | Should -Be 0 + $out.results.result[0].actualState.registryEntries.Count | Should -Be 4 -Because ($out | ConvertTo-Json -Depth 10) + $out.results.result[0].actualState.registryEntries[0].keyPath | Should -BeExactly 'HKLM\Software\Microsoft\Windows\CurrentVersion' + $out.results.result[0].actualState.registryEntries[0].valueName | Should -BeExactly 'ProgramFilesDir' + $out.results.result[0].actualState.registryEntries[0].valueData.String | Should -BeExactly $env:ProgramFiles + $out.results.result[0].actualState.registryEntries[1].keyPath | Should -BeExactly 'HKLM\Software\Microsoft\Windows\CurrentVersion' + $out.results.result[0].actualState.registryEntries[1].valueName | Should -BeExactly 'ProgramFilesPath' + $out.results.result[0].actualState.registryEntries[1].valueData.ExpandString | Should -BeExactly '%ProgramFiles%' + $out.results.result[0].actualState.registryEntries[2].keyPath | Should -BeExactly 'HKLM\Software\Microsoft\Windows\CurrentVersion' + $out.results.result[0].actualState.registryEntries[2].valueName | Should -BeExactly 'CommonFilesDir' + $out.results.result[0].actualState.registryEntries[2].valueData.String | Should -BeExactly ($env:ProgramFiles + '\Common Files') + $out.results.result[0].actualState.registryEntries[3].keyPath | Should -BeExactly 'HKLM\Software\Microsoft\Windows\CurrentVersion' + $out.results.result[0].actualState.registryEntries[3].valueName | Should -BeExactly 'NonExistentValue' + $out.results.result[0].actualState.registryEntries[3]._exist | Should -BeFalse + } +} diff --git a/resources/registry/tests/registrylist_set.tests.ps1 b/resources/registry/tests/registrylist_set.tests.ps1 new file mode 100644 index 000000000..5161e109d --- /dev/null +++ b/resources/registry/tests/registrylist_set.tests.ps1 @@ -0,0 +1,57 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. + +Describe 'Registry list set tests' -Skip:(!$IsWindows) { + BeforeEach { + Remove-Item -Path 'HKCU:\1' -Recurse -ErrorAction Ignore + } + + AfterEach { + Remove-Item -Path 'HKCU:\1' -Recurse -ErrorAction Ignore + } + + It 'Can set a registry list' -Skip:(!$IsWindows) { + $config_yaml = @' + $schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json + resources: + - name: Reg 1 + type: Microsoft.Windows/RegistryList + properties: + registryEntries: + - keyPath: HKCU\1\2\3 + valueName: Hello + valueData: + String: World + - keyPath: HKCU\1\2\4 + valueName: Hello2 + valueData: + String: World2 + - keyPath: HKCU\1\2\5 + _exist: false + - keyPath: HKCU\1\2\6 + _exist: false + valueName: Hello4 + valueData: + String: World4 +'@ + $out = dsc config set --input $config_yaml 2>$TestDrive/error.log | ConvertFrom-Json + $LASTEXITCODE | Should -Be 0 + $out.results.result[0].afterState.registryEntries.Count | Should -Be 4 -Because ($out | ConvertTo-Json -Depth 10) + $out.results.result[0].afterState.registryEntries[0].keyPath | Should -BeExactly 'HKCU\1\2\3' + $out.results.result[0].afterState.registryEntries[0].valueName | Should -BeExactly 'Hello' + $out.results.result[0].afterState.registryEntries[0].valueData.String | Should -BeExactly 'World' + (Get-ItemProperty -Path 'HKCU:\1\2\3' -Name 'Hello').Hello | Should -BeExactly 'World' + $out.results.result[0].afterState.registryEntries[1].keyPath | Should -BeExactly 'HKCU\1\2\4' + $out.results.result[0].afterState.registryEntries[1].valueName | Should -BeExactly 'Hello2' + $out.results.result[0].afterState.registryEntries[1].valueData.String | Should -BeExactly 'World2' + (Get-ItemProperty -Path 'HKCU:\1\2\4' -Name 'Hello2').Hello2 | Should -BeExactly 'World2' + $out.results.result[0].afterState.registryEntries[2].keyPath | Should -BeExactly 'HKCU\1\2\5' + $out.results.result[0].afterState.registryEntries[2]._exist | Should -BeFalse + Get-Item -Path 'HKCU:\1\2\5' -ErrorAction Ignore | Should -BeNullOrEmpty + $out.results.result[0].afterState.registryEntries[3].keyPath | Should -BeExactly 'HKCU\1\2\6' + $out.results.result[0].afterState.registryEntries[3]._exist | Should -BeFalse + $out.results.result[0].afterState.registryEntries[3].valueName | Should -BeNullOrEmpty + $out.results.result[0].afterState.registryEntries[3].valueData | Should -BeNullOrEmpty + (Get-ItemProperty -Path 'HKCU:\1\2\6' -Name 'Hello4' -ErrorAction Ignore).Hello4 | Should -BeNullOrEmpty + } +} diff --git a/resources/registry/tests/registrylist_whatif.tests.ps1 b/resources/registry/tests/registrylist_whatif.tests.ps1 new file mode 100644 index 000000000..5bc6737ca --- /dev/null +++ b/resources/registry/tests/registrylist_whatif.tests.ps1 @@ -0,0 +1,77 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. + +Describe 'Registry list set what-if tests' -Skip:(!$IsWindows) { + BeforeEach { + Remove-Item -Path 'HKCU:\1' -Recurse -ErrorAction Ignore + } + + AfterEach { + Remove-Item -Path 'HKCU:\1' -Recurse -ErrorAction Ignore + } + + It 'Can set a registry list' -Skip:(!$IsWindows) { + $before_config_yaml = @' + $schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json + resources: + - name: Reg 1 + type: Microsoft.Windows/RegistryList + properties: + registryEntries: + - keyPath: HKCU\1\2\3 + valueName: Hello + valueData: + String: World_before + - keyPath: HKCU\1\2\4 + valueName: Hello2 + valueData: + String: World2_before + - keyPath: HKCU\1\2\5 + - keyPath: HKCU\1\2\6 + valueName: Hello4 + valueData: + String: World4_before +'@ + dsc config set --input $before_config_yaml 2>$TestDrive/error.log + $LASTEXITCODE | Should -Be 0 -Because (Get-Content -Path $TestDrive/error.log -Raw) + + $after_config_yaml = @' + $schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json + resources: + - name: Reg 1 + type: Microsoft.Windows/RegistryList + properties: + registryEntries: + - keyPath: HKCU\1\2\3 + valueName: Hello + valueData: + String: World_after + - keyPath: HKCU\1\2\4 + valueName: Hello2 + valueData: + String: World2_after + - keyPath: HKCU\1\2\5 + _exist: false + - keyPath: HKCU\1\2\6 + _exist: false + valueName: Hello4 + valueData: + String: World4_after +'@ + + $out = dsc config set --what-if --input $after_config_yaml 2>$TestDrive/error.log | ConvertFrom-Json + $LASTEXITCODE | Should -Be 0 -Because (Get-Content -Path $TestDrive/error.log -Raw) + $out.results.result[0].afterState.registryEntries.Count | Should -Be 4 -Because ($out | ConvertTo-Json -Depth 10) + $out.results.result[0].afterState.registryEntries[0].keyPath | Should -BeExactly 'HKCU\1\2\3' + $out.results.result[0].afterState.registryEntries[0].valueName | Should -BeExactly 'Hello' + $out.results.result[0].afterState.registryEntries[0].valueData.String | Should -BeExactly 'World_after' + $out.results.result[0].afterState.registryEntries[1].keyPath | Should -BeExactly 'HKCU\1\2\4' + $out.results.result[0].afterState.registryEntries[1].valueName | Should -BeExactly 'Hello2' + $out.results.result[0].afterState.registryEntries[1].valueData.String | Should -BeExactly 'World2_after' + $out.results.result[0].afterState.registryEntries[2].keyPath | Should -BeExactly 'HKCU\1\2\5' + $out.results.result[0].afterState.registryEntries[2]._metadata.whatIf[0] | Should -Match "Would delete subkey '5'" + $out.results.result[0].afterState.registryEntries[3].keyPath | Should -BeExactly 'HKCU\1\2\6' + $out.results.result[0].afterState.registryEntries[3]._metadata.whatIf[0] | Should -Match "Would delete value 'Hello4'" + $out.results.result[0].afterState.registryEntries[3].valueName | Should -BeExactly 'Hello4' + } +} From 57905b636fc4cf60d880b31198bd8235981383a4 Mon Sep 17 00:00:00 2001 From: Steve Lee Date: Tue, 5 May 2026 18:27:21 -0700 Subject: [PATCH 34/37] Update Appx with improved display name and not have entries in Start Menu --- helpers.build.psm1 | 8 ++++---- packaging/msix/AppxManifest.xml | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/helpers.build.psm1 b/helpers.build.psm1 index 571a6cc8b..9f7c21042 100644 --- a/helpers.build.psm1 +++ b/helpers.build.psm1 @@ -1475,7 +1475,7 @@ function Test-Clippy { Set-DefaultWorkspaceMemberGroup @workspaceParams } } - + process { $clippyFlags = @( '--%' @@ -2087,7 +2087,7 @@ function Build-DscMsixPackage { throw 'MSIX requires a specific architecture' } - $displayName = 'DesiredStateConfiguration' + $displayName = 'Desired State Configuration' $productName = 'DesiredStateConfiguration' if ($isPreview) { @@ -2112,10 +2112,10 @@ function Build-DscMsixPackage { $productVersion = $productVersion -replace '(\d+)$', "$previewNumber.0" if ($isPrivate) { - $displayName += "-Private" + $displayName += " (Private)" } else { - $displayName += "-Preview" + $displayName += " (Preview)" } } else { # appx requires a version in the format of major.minor.build.revision with revision being 0 diff --git a/packaging/msix/AppxManifest.xml b/packaging/msix/AppxManifest.xml index be1ad6880..6b33119e6 100644 --- a/packaging/msix/AppxManifest.xml +++ b/packaging/msix/AppxManifest.xml @@ -36,7 +36,7 @@ - + @@ -47,7 +47,7 @@ - + @@ -58,7 +58,7 @@ - + From 6c1d0f458e2dc28692978aef4a8567d9ee0a7a0f Mon Sep 17 00:00:00 2001 From: "Steve Lee (POWERSHELL HE/HIM) (from Dev Box)" Date: Tue, 5 May 2026 23:14:19 -0700 Subject: [PATCH 35/37] fix tests to explicit read from stdin --- .../tests/windowsupdate_export.tests.ps1 | 44 ++++++++--------- .../tests/windowsupdate_get.tests.ps1 | 48 +++++++++---------- .../tests/windowsupdate_set.tests.ps1 | 24 +++++----- 3 files changed, 58 insertions(+), 58 deletions(-) diff --git a/resources/WindowsUpdate/tests/windowsupdate_export.tests.ps1 b/resources/WindowsUpdate/tests/windowsupdate_export.tests.ps1 index c12a3a54b..e043c384c 100644 --- a/resources/WindowsUpdate/tests/windowsupdate_export.tests.ps1 +++ b/resources/WindowsUpdate/tests/windowsupdate_export.tests.ps1 @@ -8,7 +8,7 @@ Describe 'Windows Update Export operation tests' { Context 'Export operation' { It 'should return UpdateList with array of updates' -Skip:(!$IsWindows) { - $out = '{"updates":[{}]}' | dsc resource export -r $resourceType -o json 2>&1 + $out = '{"updates":[{}]}' | dsc resource export -r $resourceType -f - -o json 2>&1 $LASTEXITCODE | Should -Be 0 $config = $out | ConvertFrom-Json @@ -18,7 +18,7 @@ Describe 'Windows Update Export operation tests' { } It 'should work without input filter' -Skip:(!$IsWindows) { - $out = '' | dsc resource export -r $resourceType -o json 2>&1 + $out = dsc resource export -r $resourceType -o json 2>&1 $LASTEXITCODE | Should -Be 0 $config = $out | ConvertFrom-Json @@ -28,7 +28,7 @@ Describe 'Windows Update Export operation tests' { It 'should filter by isInstalled=true' -Skip:(!$IsWindows) { $json = '{"updates":[{"isInstalled": true}]}' - $out = $json | dsc resource export -r $resourceType -o json 2>&1 + $out = $json | dsc resource export -r $resourceType -f - -o json 2>&1 $LASTEXITCODE | Should -Be 0 $config = $out | ConvertFrom-Json @@ -42,7 +42,7 @@ Describe 'Windows Update Export operation tests' { It 'should filter by isInstalled=false' -Skip:(!$IsWindows) { $json = '{"updates":[{"isInstalled": false}]}' - $out = $json | dsc resource export -r $resourceType -o json 2>&1 + $out = $json | dsc resource export -r $resourceType -f - -o json 2>&1 $LASTEXITCODE | Should -Be 0 $config = $out | ConvertFrom-Json @@ -56,7 +56,7 @@ Describe 'Windows Update Export operation tests' { It 'should filter by title with wildcard in middle' -Skip:(!$IsWindows) { $json = '{"updates":[{"title": "*Windows*"}]}' - $out = $json | dsc resource export -r $resourceType -o json 2>&1 + $out = $json | dsc resource export -r $resourceType -f - -o json 2>&1 if ($LASTEXITCODE -eq 0) { $config = $out | ConvertFrom-Json @@ -70,7 +70,7 @@ Describe 'Windows Update Export operation tests' { } It 'should return proper structure for each update' -Skip:(!$IsWindows) { - $out = '{"updates":[{}]}' | dsc resource export -r $resourceType -o json 2>&1 + $out = '{"updates":[{}]}' | dsc resource export -r $resourceType -f - -o json 2>&1 $LASTEXITCODE | Should -Be 0 $config = $out | ConvertFrom-Json @@ -92,7 +92,7 @@ Describe 'Windows Update Export operation tests' { It 'should fail when wildcard filter has no matches' -Skip:(!$IsWindows) { $json = '{"updates":[{"title": "ThisUpdateShouldNeverExist99999*"}]}' - $stderr = $json | dsc resource export -r $resourceType -o json 2>&1 + $stderr = $json | dsc resource export -r $resourceType -f - -o json 2>&1 # Should fail because the filter has criteria but no matches $LASTEXITCODE | Should -Not -Be 0 @@ -111,7 +111,7 @@ Describe 'Windows Update Export operation tests' { } ) } | ConvertTo-Json -Depth 10 -Compress - $stderr = $json | dsc resource export -r $resourceType 2>&1 + $stderr = $json | dsc resource export -r $resourceType -f - 2>&1 # Should fail because the filter has criteria but no matches $LASTEXITCODE | Should -Not -Be 0 @@ -128,7 +128,7 @@ Describe 'Windows Update Export operation tests' { @{} ) } | ConvertTo-Json -Depth 10 -Compress - $out = $json | dsc resource export -r $resourceType -o json 2>&1 + $out = $json | dsc resource export -r $resourceType -f - -o json 2>&1 $LASTEXITCODE | Should -Be 0 $config = $out | ConvertFrom-Json @@ -138,7 +138,7 @@ Describe 'Windows Update Export operation tests' { It 'should fail if any filter with criteria has no matches' -Skip:(!$IsWindows) { # Get an actual update - $allOut = '{"updates":[{}]}' | dsc resource export -r $resourceType -o json 2>&1 + $allOut = '{"updates":[{}]}' | dsc resource export -r $resourceType -f - -o json 2>&1 if ($LASTEXITCODE -eq 0) { $allConfig = $allOut | ConvertFrom-Json @@ -157,7 +157,7 @@ Describe 'Windows Update Export operation tests' { } ) } | ConvertTo-Json -Depth 10 -Compress - $stderr = $json | dsc resource export -r $resourceType 2>&1 + $stderr = $json | dsc resource export -r $resourceType -f - 2>&1 # Should fail because second filter has no matches $LASTEXITCODE | Should -Not -Be 0 @@ -171,7 +171,7 @@ Describe 'Windows Update Export operation tests' { It 'should return results when all filters find matches' -Skip:(!$IsWindows) { # Get actual updates - $allOut = '{"updates":[{}]}' | dsc resource export -r $resourceType -o json 2>&1 + $allOut = '{"updates":[{}]}' | dsc resource export -r $resourceType -f - -o json 2>&1 if ($LASTEXITCODE -eq 0) { $allConfig = $allOut | ConvertFrom-Json @@ -190,7 +190,7 @@ Describe 'Windows Update Export operation tests' { } ) } | ConvertTo-Json -Depth 10 -Compress - $out = $json | dsc resource export -r $resourceType -o json 2>&1 + $out = $json | dsc resource export -r $resourceType -f - -o json 2>&1 $LASTEXITCODE | Should -Be 0 $config = $out | ConvertFrom-Json @@ -205,7 +205,7 @@ Describe 'Windows Update Export operation tests' { It 'should filter by msrcSeverity' -Skip:(!$IsWindows) { $json = '{"updates":[{"msrcSeverity": "Critical"}]}' - $out = $json | dsc resource export -r $resourceType -o json 2>&1 + $out = $json | dsc resource export -r $resourceType -f - -o json 2>&1 if ($LASTEXITCODE -eq 0) { $config = $out | ConvertFrom-Json @@ -220,7 +220,7 @@ Describe 'Windows Update Export operation tests' { It 'should filter by updateType Software' -Skip:(!$IsWindows) { $json = '{"updates":[{"updateType": "Software"}]}' - $out = $json | dsc resource export -r $resourceType -o json 2>&1 + $out = $json | dsc resource export -r $resourceType -f - -o json 2>&1 if ($LASTEXITCODE -eq 0) { $config = $out | ConvertFrom-Json @@ -235,7 +235,7 @@ Describe 'Windows Update Export operation tests' { It 'should support OR logic with multiple filters in array' -Skip:(!$IsWindows) { # Get some updates to use as filters - $allOut = '{"updates":[{}]}' | dsc resource export -r $resourceType -o json 2>&1 + $allOut = '{"updates":[{}]}' | dsc resource export -r $resourceType -f - -o json 2>&1 if ($LASTEXITCODE -eq 0) { $allConfig = $allOut | ConvertFrom-Json @@ -245,7 +245,7 @@ Describe 'Windows Update Export operation tests' { $id1 = $allResult.updates[0].id $id2 = $allResult.updates[1].id $json = "{`"updates`":[{`"id`": `"$id1`"}, {`"id`": `"$id2`"}]}" - $out = $json | dsc resource export -r $resourceType -o json 2>&1 + $out = $json | dsc resource export -r $resourceType -f - -o json 2>&1 $LASTEXITCODE | Should -Be 0 $config = $out | ConvertFrom-Json @@ -267,7 +267,7 @@ Describe 'Windows Update Export operation tests' { It 'should support AND logic within single filter object' -Skip:(!$IsWindows) { # Multiple properties in one filter = AND logic $json = '{"updates":[{"isInstalled": true, "updateType": "Software"}]}' - $out = $json | dsc resource export -r $resourceType -o json 2>&1 + $out = $json | dsc resource export -r $resourceType -f - -o json 2>&1 if ($LASTEXITCODE -eq 0) { $config = $out | ConvertFrom-Json @@ -284,7 +284,7 @@ Describe 'Windows Update Export operation tests' { It 'should not return duplicates when multiple filters match same update' -Skip:(!$IsWindows) { # Get an update with known properties - $allOut = '{"updates":[{}]}' | dsc resource export -r $resourceType -o json 2>&1 + $allOut = '{"updates":[{}]}' | dsc resource export -r $resourceType -f - -o json 2>&1 if ($LASTEXITCODE -eq 0) { $allConfig = $allOut | ConvertFrom-Json @@ -294,7 +294,7 @@ Describe 'Windows Update Export operation tests' { # Use the same ID in both filters - this should only return one update # Even though technically both filters specify the same criteria $json = "{`"updates`":[{`"id`": `"$($testUpdate.id)`"}, {`"id`": `"$($testUpdate.id)`"}]}" - $out = $json | dsc resource export -r $resourceType -o json 2>&1 + $out = $json | dsc resource export -r $resourceType -f - -o json 2>&1 $LASTEXITCODE | Should -Be 0 -Because $out $config = $out | ConvertFrom-Json @@ -308,7 +308,7 @@ Describe 'Windows Update Export operation tests' { } It 'should return installationBehavior property when present' -Skip:(!$IsWindows) { - $out = '{"updates":[{}]}' | dsc resource export -r $resourceType -o json 2>&1 + $out = '{"updates":[{}]}' | dsc resource export -r $resourceType -f - -o json 2>&1 $LASTEXITCODE | Should -Be 0 $config = $out | ConvertFrom-Json @@ -326,7 +326,7 @@ Describe 'Windows Update Export operation tests' { } It 'should return valid installationBehavior enum values for all updates' -Skip:(!$IsWindows) { - $out = '{"updates":[{}]}' | dsc resource export -r $resourceType -o json 2>&1 + $out = '{"updates":[{}]}' | dsc resource export -r $resourceType -f - -o json 2>&1 $LASTEXITCODE | Should -Be 0 $config = $out | ConvertFrom-Json diff --git a/resources/WindowsUpdate/tests/windowsupdate_get.tests.ps1 b/resources/WindowsUpdate/tests/windowsupdate_get.tests.ps1 index ffba6b2c2..cb9f8b41c 100644 --- a/resources/WindowsUpdate/tests/windowsupdate_get.tests.ps1 +++ b/resources/WindowsUpdate/tests/windowsupdate_get.tests.ps1 @@ -20,7 +20,7 @@ Describe 'Windows Update Get operation tests' { } ) } | ConvertTo-Json -Depth 10 -Compress - $out = $json | dsc resource get -r $resourceType 2>&1 + $out = $json | dsc resource get -r $resourceType -f - 2>&1 $LASTEXITCODE | Should -Be 0 $getResult = $out | ConvertFrom-Json @@ -45,7 +45,7 @@ Describe 'Windows Update Get operation tests' { } ) } | ConvertTo-Json -Depth 10 -Compress - $outLower = $jsonLower | dsc resource get -r $resourceType 2>&1 + $outLower = $jsonLower | dsc resource get -r $resourceType -f - 2>&1 # Test with uppercase version $jsonUpper = @{ @@ -55,7 +55,7 @@ Describe 'Windows Update Get operation tests' { } ) } | ConvertTo-Json -Depth 10 -Compress - $outUpper = $jsonUpper | dsc resource get -r $resourceType 2>&1 + $outUpper = $jsonUpper | dsc resource get -r $resourceType -f - 2>&1 # Both should succeed if ($outLower -and $outUpper) { @@ -74,7 +74,7 @@ Describe 'Windows Update Get operation tests' { } ) } | ConvertTo-Json -Depth 10 -Compress - $null = $json | dsc resource get -r $resourceType 2>&1 + $null = $json | dsc resource get -r $resourceType -f - 2>&1 # This will likely fail unless there's an update with exact title "Windows" # which is unlikely $LASTEXITCODE | Should -Not -Be 0 @@ -89,7 +89,7 @@ Describe 'Windows Update Get operation tests' { } ) } | ConvertTo-Json -Depth 10 -Compress - $null = $json | dsc resource get -r $resourceType 2>&1 + $null = $json | dsc resource get -r $resourceType -f - 2>&1 $LASTEXITCODE | Should -Not -Be 0 } @@ -103,7 +103,7 @@ Describe 'Windows Update Get operation tests' { } ) } | ConvertTo-Json -Depth 10 -Compress - $out = $json | dsc resource get -r $resourceType 2>&1 + $out = $json | dsc resource get -r $resourceType -f - 2>&1 $LASTEXITCODE | Should -Be 0 $result = $out | ConvertFrom-Json @@ -121,7 +121,7 @@ Describe 'Windows Update Get operation tests' { } ) } | ConvertTo-Json -Depth 10 -Compress - $null = $json | dsc resource get -r $resourceType 2>&1 + $null = $json | dsc resource get -r $resourceType -f - 2>&1 # Should fail because id doesn't match $LASTEXITCODE | Should -Not -Be 0 @@ -137,7 +137,7 @@ Describe 'Windows Update Get operation tests' { } ) } | ConvertTo-Json -Depth 10 -Compress - $null = $json | dsc resource get -r $resourceType 2>&1 + $null = $json | dsc resource get -r $resourceType -f - 2>&1 # Should fail because title doesn't match $LASTEXITCODE | Should -Not -Be 0 @@ -151,7 +151,7 @@ Describe 'Windows Update Get operation tests' { } ) } | ConvertTo-Json -Depth 10 -Compress - $out = $json | dsc resource get -r $resourceType 2>&1 + $out = $json | dsc resource get -r $resourceType -f - 2>&1 $LASTEXITCODE | Should -Be 0 $result = $out | ConvertFrom-Json $result.actualState.updates[0].isInstalled | Should -BeOfType [bool] @@ -165,7 +165,7 @@ Describe 'Windows Update Get operation tests' { } ) } | ConvertTo-Json -Depth 10 -Compress - $out = $json | dsc resource get -r $resourceType 2>&1 + $out = $json | dsc resource get -r $resourceType -f - 2>&1 $LASTEXITCODE | Should -Be 0 $result = $out | ConvertFrom-Json $result.actualState.updates[0].recommendedHardDiskSpace | Should -BeGreaterOrEqual 0 @@ -179,7 +179,7 @@ Describe 'Windows Update Get operation tests' { } ) } | ConvertTo-Json -Depth 10 -Compress - $out = $json | dsc resource get -r $resourceType 2>&1 + $out = $json | dsc resource get -r $resourceType -f - 2>&1 $LASTEXITCODE | Should -Be 0 $result = $out | ConvertFrom-Json $result.actualState.updates[0].kbArticleIds.GetType().BaseType.Name | Should -Be 'Array' @@ -193,7 +193,7 @@ Describe 'Windows Update Get operation tests' { } ) } | ConvertTo-Json -Depth 10 -Compress - $out = $json | dsc resource get -r $resourceType 2>&1 + $out = $json | dsc resource get -r $resourceType -f - 2>&1 $LASTEXITCODE | Should -Be 0 $result = $out | ConvertFrom-Json $result.actualState.updates[0].updateType | Should -BeIn @('Software', 'Driver') @@ -210,7 +210,7 @@ Describe 'Windows Update Get operation tests' { } ) } | ConvertTo-Json -Depth 10 -Compress - $out = $json | dsc resource get -r $resourceType 2>&1 + $out = $json | dsc resource get -r $resourceType -f - 2>&1 $LASTEXITCODE | Should -Be 0 $result = $out | ConvertFrom-Json $result.actualState.updates[0].msrcSeverity | Should -BeExactly $updateWithSeverity.msrcSeverity @@ -225,7 +225,7 @@ Describe 'Windows Update Get operation tests' { } ) } | ConvertTo-Json -Depth 10 -Compress - $out = $json | dsc resource get -r $resourceType 2>&1 + $out = $json | dsc resource get -r $resourceType -f - 2>&1 $LASTEXITCODE | Should -Be 0 $result = $out | ConvertFrom-Json @@ -242,7 +242,7 @@ Describe 'Windows Update Get operation tests' { } ) } | ConvertTo-Json -Depth 10 -Compress - $out = $json | dsc resource get -r $resourceType 2>&1 + $out = $json | dsc resource get -r $resourceType -f - 2>&1 $LASTEXITCODE | Should -Be 0 $result = $out | ConvertFrom-Json @@ -265,7 +265,7 @@ Describe 'Windows Update Get operation tests' { } ) } | ConvertTo-Json -Depth 10 -Compress - $out = $json | dsc resource get -r $resourceType 2>&1 + $out = $json | dsc resource get -r $resourceType -f - 2>&1 $LASTEXITCODE | Should -Be 0 $getResult = $out | ConvertFrom-Json @@ -290,7 +290,7 @@ Describe 'Windows Update Get operation tests' { } ) } | ConvertTo-Json -Depth 10 -Compress - $stderr = $json | dsc resource get -r $resourceType 2>&1 + $stderr = $json | dsc resource get -r $resourceType -f - 2>&1 # Should fail because second input has no match $LASTEXITCODE | Should -Not -Be 0 @@ -312,7 +312,7 @@ Describe 'Windows Update Get operation tests' { } ) } | ConvertTo-Json -Depth 10 -Compress - $out = $json | dsc resource get -r $resourceType 2>&1 + $out = $json | dsc resource get -r $resourceType -f - 2>&1 $LASTEXITCODE | Should -Be 0 $getResult = $out | ConvertFrom-Json @@ -334,7 +334,7 @@ Describe 'Windows Update Get operation tests' { } ) } | ConvertTo-Json -Depth 10 -Compress - $out = $json | dsc resource get -r $resourceType 2>&1 + $out = $json | dsc resource get -r $resourceType -f - 2>&1 $LASTEXITCODE | Should -Be 0 $getResult = $out | ConvertFrom-Json @@ -356,7 +356,7 @@ Describe 'Windows Update Get operation tests' { } ) } | ConvertTo-Json -Depth 10 -Compress - $out = $json | dsc resource get -r $resourceType 2>&1 + $out = $json | dsc resource get -r $resourceType -f - 2>&1 $LASTEXITCODE | Should -Be 0 $getResult = $out | ConvertFrom-Json @@ -374,7 +374,7 @@ Describe 'Windows Update Get operation tests' { } ) } | ConvertTo-Json -Depth 10 -Compress - $out = $json | dsc resource get -r $resourceType 2>&1 + $out = $json | dsc resource get -r $resourceType -f - 2>&1 $LASTEXITCODE | Should -Be 0 $result = $out | ConvertFrom-Json @@ -396,7 +396,7 @@ Describe 'Windows Update Get operation tests' { } ) } | ConvertTo-Json -Depth 10 -Compress - $out = $json | dsc resource get -r $resourceType 2>&1 + $out = $json | dsc resource get -r $resourceType -f - 2>&1 $LASTEXITCODE | Should -Be 0 $getResult = $out | ConvertFrom-Json @@ -424,7 +424,7 @@ Describe 'Windows Update Get operation tests' { } ) } | ConvertTo-Json -Depth 10 -Compress - $stderr = $json | dsc resource get -r $resourceType 2>&1 + $stderr = $json | dsc resource get -r $resourceType -f - 2>&1 # If multiple updates match isInstalled=true, it should error $installedCount = ($exportOut.updates | Where-Object { $_.isInstalled -eq $true }).Count @@ -460,7 +460,7 @@ Describe 'Windows Update Get operation tests' { } ) } | ConvertTo-Json -Depth 10 -Compress - $stderr = $json | dsc resource get -r $resourceType 2>&1 + $stderr = $json | dsc resource get -r $resourceType -f - 2>&1 # This may or may not fail depending on uniqueness if ($LASTEXITCODE -ne 0) { diff --git a/resources/WindowsUpdate/tests/windowsupdate_set.tests.ps1 b/resources/WindowsUpdate/tests/windowsupdate_set.tests.ps1 index 64266de58..a452d0210 100644 --- a/resources/WindowsUpdate/tests/windowsupdate_set.tests.ps1 +++ b/resources/WindowsUpdate/tests/windowsupdate_set.tests.ps1 @@ -17,7 +17,7 @@ Describe 'Windows Update Set operation tests' { Context 'Set operation' -Skip:(!$isAdmin -or !$IsWindows) { It 'should match when both title and id are correct' { # Get an actual installed update with both title and id - $exportOut = '{"updates": [{"isInstalled": true}]}' | dsc resource export -r $resourceType 2>&1 + $exportOut = '{"updates": [{"isInstalled": true}]}' | dsc resource export -r $resourceType -f - 2>&1 if ($LASTEXITCODE -eq 0) { $result = $exportOut | ConvertFrom-Json @@ -32,7 +32,7 @@ Describe 'Windows Update Set operation tests' { ) } | ConvertTo-Json -Depth 10 -Compress # Try to set (should detect already installed) - $out = $json | dsc resource set -r $resourceType 2>&1 + $out = $json | dsc resource set -r $resourceType -f - 2>&1 if ($LASTEXITCODE -eq 0) { $result = $out | ConvertFrom-Json @@ -50,7 +50,7 @@ Describe 'Windows Update Set operation tests' { It 'should fail when title matches but id does not' { # Get an actual update - $exportOut = '{"updates": []}' | dsc resource export -r $resourceType 2>&1 + $exportOut = '{"updates": []}' | dsc resource export -r $resourceType -f - 2>&1 if ($LASTEXITCODE -eq 0) { $result = $exportOut | ConvertFrom-Json @@ -64,7 +64,7 @@ Describe 'Windows Update Set operation tests' { } ) } | ConvertTo-Json -Depth 10 -Compress - $out = $json | dsc resource set -r $resourceType 2>&1 + $out = $json | dsc resource set -r $resourceType -f - 2>&1 # Should fail because id doesn't match $LASTEXITCODE | Should -Not -Be 0 @@ -78,7 +78,7 @@ Describe 'Windows Update Set operation tests' { It 'should fail when id matches but title does not' { # Get an actual update - $exportOut = '{"updates": []}' | dsc resource export -r $resourceType 2>&1 + $exportOut = '{"updates": []}' | dsc resource export -r $resourceType -f - 2>&1 if ($LASTEXITCODE -eq 0) { $result = $exportOut | ConvertFrom-Json @@ -92,7 +92,7 @@ Describe 'Windows Update Set operation tests' { } ) } | ConvertTo-Json -Depth 10 -Compress - $out = $json | dsc resource set -r $resourceType 2>&1 + $out = $json | dsc resource set -r $resourceType -f - 2>&1 # Should fail because title doesn't match $LASTEXITCODE | Should -Not -Be 0 @@ -106,7 +106,7 @@ Describe 'Windows Update Set operation tests' { It 'should verify all inputs have matches before installing' { # Get an actual update - $exportOut = '{"updates": []}' | dsc resource export -r $resourceType 2>&1 + $exportOut = '{"updates": []}' | dsc resource export -r $resourceType -f - 2>&1 if ($LASTEXITCODE -eq 0) { $result = $exportOut | ConvertFrom-Json @@ -124,7 +124,7 @@ Describe 'Windows Update Set operation tests' { } ) } | ConvertTo-Json -Depth 10 -Compress - $stderr = $json | dsc resource set -r $resourceType 2>&1 + $stderr = $json | dsc resource set -r $resourceType -f - 2>&1 # Should fail before attempting any installation $LASTEXITCODE | Should -Not -Be 0 @@ -142,7 +142,7 @@ Describe 'Windows Update Set operation tests' { It 'should process multiple valid input objects' { # Get an actual update - $exportOut = '{"updates": [{"isInstalled": true}]}' | dsc resource export -r $resourceType 2>&1 + $exportOut = '{"updates": [{"isInstalled": true}]}' | dsc resource export -r $resourceType -f - 2>&1 if ($LASTEXITCODE -eq 0) { $result = $exportOut | ConvertFrom-Json @@ -160,7 +160,7 @@ Describe 'Windows Update Set operation tests' { } ) } | ConvertTo-Json -Depth 10 -Compress - $out = $json | dsc resource set -r $resourceType 2>&1 + $out = $json | dsc resource set -r $resourceType -f - 2>&1 if ($LASTEXITCODE -eq 0) { $setResult = $out | ConvertFrom-Json @@ -175,7 +175,7 @@ Describe 'Windows Update Set operation tests' { It 'should apply logical AND for all criteria in each input' { # Get an actual update - $exportOut = '{"updates": [{"isInstalled": true}]}' | dsc resource export -r $resourceType 2>&1 + $exportOut = '{"updates": [{"isInstalled": true}]}' | dsc resource export -r $resourceType -f - 2>&1 if ($LASTEXITCODE -eq 0) { $result = $exportOut | ConvertFrom-Json @@ -192,7 +192,7 @@ Describe 'Windows Update Set operation tests' { } ) } | ConvertTo-Json -Depth 10 -Compress - $out = $json | dsc resource set -r $resourceType 2>&1 + $out = $json | dsc resource set -r $resourceType -f - 2>&1 if ($LASTEXITCODE -eq 0) { $setResult = $out | ConvertFrom-Json From e39983d547235a8fedc7970af997b7c2af4d01ee Mon Sep 17 00:00:00 2001 From: Steve Lee Date: Wed, 6 May 2026 10:07:17 -0700 Subject: [PATCH 36/37] Apply suggestions from code review Co-authored-by: Tess Gauthier --- lib/dsc-lib-registry/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/dsc-lib-registry/src/lib.rs b/lib/dsc-lib-registry/src/lib.rs index 902abda9f..fb12b6839 100644 --- a/lib/dsc-lib-registry/src/lib.rs +++ b/lib/dsc-lib-registry/src/lib.rs @@ -24,7 +24,7 @@ impl RegistryHelper { /// /// # Arguments /// - /// * `config` - The string with registry configuration information. + /// * `registry_entry` - The string with registry configuration information. /// /// # Errors /// @@ -51,7 +51,7 @@ impl RegistryHelper { /// /// # Arguments /// - /// * `config` - The registry configuration struct. + /// * `registry_entry` - The registry configuration struct. /// /// # Errors /// From 11e37a0ce4701579553d33add5c62f3217596564 Mon Sep 17 00:00:00 2001 From: "G.Reijn" <26114636+Gijsreyn@users.noreply.github.com> Date: Tue, 21 Apr 2026 07:05:58 +0200 Subject: [PATCH 37/37] Add `dism_dsc` reference documentation --- .../examples/export-features-on-demand.md | 151 +++++++ .../examples/get-feature-on-demand.md | 139 +++++++ .../install-remove-feature-on-demand.md | 167 ++++++++ .../Windows/FeatureOnDemandList/index.md | 380 ++++++++++++++++++ .../enable-disable-optional-features.md | 198 +++++++++ .../examples/export-optional-features.md | 144 +++++++ .../examples/get-optional-feature.md | 117 ++++++ .../Windows/OptionalFeatureList/index.md | 367 +++++++++++++++++ docs/reference/resources/overview.md | 4 + 9 files changed, 1667 insertions(+) create mode 100644 docs/reference/resources/Microsoft/Windows/FeatureOnDemandList/examples/export-features-on-demand.md create mode 100644 docs/reference/resources/Microsoft/Windows/FeatureOnDemandList/examples/get-feature-on-demand.md create mode 100644 docs/reference/resources/Microsoft/Windows/FeatureOnDemandList/examples/install-remove-feature-on-demand.md create mode 100644 docs/reference/resources/Microsoft/Windows/FeatureOnDemandList/index.md create mode 100644 docs/reference/resources/Microsoft/Windows/OptionalFeatureList/examples/enable-disable-optional-features.md create mode 100644 docs/reference/resources/Microsoft/Windows/OptionalFeatureList/examples/export-optional-features.md create mode 100644 docs/reference/resources/Microsoft/Windows/OptionalFeatureList/examples/get-optional-feature.md create mode 100644 docs/reference/resources/Microsoft/Windows/OptionalFeatureList/index.md diff --git a/docs/reference/resources/Microsoft/Windows/FeatureOnDemandList/examples/export-features-on-demand.md b/docs/reference/resources/Microsoft/Windows/FeatureOnDemandList/examples/export-features-on-demand.md new file mode 100644 index 000000000..7bffc721a --- /dev/null +++ b/docs/reference/resources/Microsoft/Windows/FeatureOnDemandList/examples/export-features-on-demand.md @@ -0,0 +1,151 @@ +--- +description: > + Examples showing how to export and filter Windows Features on Demand (capabilities) using the + Microsoft.Windows/FeatureOnDemandList resource. +ms.date: 04/21/2026 +ms.topic: reference +title: Export Features on Demand +--- + +# Export Features on Demand + +This example shows how you can use the `Microsoft.Windows/FeatureOnDemandList` resource to +enumerate Windows Features on Demand (capabilities) on a system, optionally filtering the results +by identity, state, display name, or description. + +> [!IMPORTANT] +> All operations with `Microsoft.Windows/FeatureOnDemandList` require an elevated (administrator) +> session. Run your terminal as administrator before executing these commands. + +## Export all capabilities + +To retrieve a complete list of all capabilities on the system, use the [dsc resource export][01] +command without any input. + +```powershell +dsc resource export --resource Microsoft.Windows/FeatureOnDemandList +``` + +DSC returns a configuration document that includes all capabilities and their current states: + +```yaml +$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json +resources: +- name: Microsoft.Windows/FeatureOnDemandList + type: Microsoft.Windows/FeatureOnDemandList + properties: + capabilities: + - identity: OpenSSH.Client~~~~0.0.1.0 + state: Installed + - identity: OpenSSH.Server~~~~0.0.1.0 + state: NotPresent + - identity: Language.Basic~~~en-US~0.0.1.0 + state: Installed + # ... additional capabilities +``` + +> [!NOTE] +> When exporting without filters, the resource uses a fast enumeration path that returns only +> `identity` and `state` for each capability. To retrieve additional properties such as +> `displayName`, `description`, `downloadSize`, and `installSize`, use an export filter as shown +> in the examples below. + +## Export only installed capabilities + +To list only the capabilities currently installed on the system, provide a filter with +`state: Installed`. + +```powershell +$filter = @{ + capabilities = @( + @{ state = 'Installed' } + ) +} | ConvertTo-Json -Depth 3 + +dsc resource export --resource Microsoft.Windows/FeatureOnDemandList --input $filter +``` + +```yaml +$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json +resources: +- name: Microsoft.Windows/FeatureOnDemandList + type: Microsoft.Windows/FeatureOnDemandList + properties: + capabilities: + - identity: OpenSSH.Client~~~~0.0.1.0 + state: Installed + - identity: Language.Basic~~~en-US~0.0.1.0 + state: Installed + # ... additional installed capabilities +``` + +## Export capabilities by identity pattern + +You can filter capabilities by identity using wildcard (`*`) patterns. The match is +case-insensitive. + +```powershell +$filter = @{ + capabilities = @( + @{ identity = 'OpenSSH*' } + ) +} | ConvertTo-Json -Depth 3 + +dsc resource export --resource Microsoft.Windows/FeatureOnDemandList --input $filter +``` + +```yaml +$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json +resources: +- name: Microsoft.Windows/FeatureOnDemandList + type: Microsoft.Windows/FeatureOnDemandList + properties: + capabilities: + - identity: OpenSSH.Client~~~~0.0.1.0 + state: Installed + - identity: OpenSSH.Server~~~~0.0.1.0 + state: NotPresent +``` + +## Export capabilities with full details + +To retrieve full details including `displayName`, `description`, `downloadSize`, and +`installSize`, include those properties as filters. A wildcard (`*`) in a filter property matches +all values for that field and triggers the full-info lookup. + +```powershell +$filter = @{ + capabilities = @( + @{ + identity = 'OpenSSH*' + displayName = '*' + } + ) +} | ConvertTo-Json -Depth 3 + +dsc resource export --resource Microsoft.Windows/FeatureOnDemandList --input $filter +``` + +```yaml +$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json +resources: +- name: Microsoft.Windows/FeatureOnDemandList + type: Microsoft.Windows/FeatureOnDemandList + properties: + capabilities: + - identity: OpenSSH.Client~~~~0.0.1.0 + state: Installed + displayName: OpenSSH Client + description: Open SSH-based secure shell (SSH) client... + downloadSize: 0 + installSize: 4894720 + - identity: OpenSSH.Server~~~~0.0.1.0 + state: NotPresent + displayName: OpenSSH Server + description: Open SSH-based secure shell (SSH) server... + downloadSize: 1468500 + installSize: 1839104 +``` + + +[01]: ../../../../../../cli/resource/export.md diff --git a/docs/reference/resources/Microsoft/Windows/FeatureOnDemandList/examples/get-feature-on-demand.md b/docs/reference/resources/Microsoft/Windows/FeatureOnDemandList/examples/get-feature-on-demand.md new file mode 100644 index 000000000..22726039f --- /dev/null +++ b/docs/reference/resources/Microsoft/Windows/FeatureOnDemandList/examples/get-feature-on-demand.md @@ -0,0 +1,139 @@ +--- +description: > + Examples showing how to retrieve the current state of Windows features on demand (capabilities) + using the Microsoft.Windows/FeatureOnDemandList resource. +ms.date: 04/21/2026 +ms.topic: reference +title: Get feature on demand state +--- + +# Get feature on demand state + +This example shows how you can use the `Microsoft.Windows/FeatureOnDemandList` resource to +retrieve the current state of Windows features on demand (capabilities). The examples use +`OpenSSH.Client~~~~0.0.1.0` as a representative capability identity. + +> [!IMPORTANT] +> All operations with `Microsoft.Windows/FeatureOnDemandList` require an elevated (administrator) +> session. Run your terminal as administrator before executing these commands. + +## Find capability identity strings + +Before you can get the state of a capability, you need its identity string. Use the following +command to list all capabilities and their identities: + +```powershell +dism /Online /Get-Capabilities /Format:Table +``` + +Capability identities follow the format `CapabilityName~~~~LanguageTag~Version`, for example: + +- `OpenSSH.Client~~~~0.0.1.0` +- `OpenSSH.Server~~~~0.0.1.0` +- `Language.Basic~~~en-US~0.0.1.0` + +## Get a single capability + +The following snippet shows how to retrieve the state of the OpenSSH client capability using the +[dsc resource get][01] command. + +```powershell +$instance = @{ + capabilities = @( + @{ identity = 'OpenSSH.Client~~~~0.0.1.0' } + ) +} | ConvertTo-Json -Depth 3 + +dsc resource get --resource Microsoft.Windows/FeatureOnDemandList --input $instance +``` + +When the capability is installed, DSC returns output similar to the following: + +```yaml +actualState: + capabilities: + - identity: OpenSSH.Client~~~~0.0.1.0 + state: Installed + displayName: OpenSSH Client + description: >- + Open SSH-based secure shell (SSH) client, required for secure key management and access + to remote machines. + downloadSize: 0 + installSize: 4894720 +``` + +When the capability is not installed, the `state` field reads `NotPresent`: + +```yaml +actualState: + capabilities: + - identity: OpenSSH.Client~~~~0.0.1.0 + state: NotPresent + displayName: OpenSSH Client + description: >- + Open SSH-based secure shell (SSH) client, required for secure key management and access + to remote machines. + downloadSize: 4026000 + installSize: 4894720 +``` + +## Get multiple capabilities in a single request + +You can retrieve the state of multiple capabilities in a single call by including multiple entries +in the `capabilities` array. + +```powershell +$instance = @{ + capabilities = @( + @{ identity = 'OpenSSH.Client~~~~0.0.1.0' } + @{ identity = 'OpenSSH.Server~~~~0.0.1.0' } + ) +} | ConvertTo-Json -Depth 3 + +dsc resource get --resource Microsoft.Windows/FeatureOnDemandList --input $instance +``` + +```yaml +actualState: + capabilities: + - identity: OpenSSH.Client~~~~0.0.1.0 + state: Installed + displayName: OpenSSH Client + description: Open SSH-based secure shell (SSH) client... + downloadSize: 0 + installSize: 4894720 + - identity: OpenSSH.Server~~~~0.0.1.0 + state: NotPresent + displayName: OpenSSH Server + description: Open SSH-based secure shell (SSH) server... + downloadSize: 1468500 + installSize: 1839104 +``` + +## Get a non-existent capability + +When you request a capability identity that is not recognized by DISM, the resource returns +`_exist: false` instead of raising an error. + +```powershell +$instance = @{ + capabilities = @( + @{ identity = 'NonExistent.Capability~~~~0.0.1.0' } + ) +} | ConvertTo-Json -Depth 3 + +dsc resource get --resource Microsoft.Windows/FeatureOnDemandList --input $instance +``` + +```yaml +actualState: + capabilities: + - identity: NonExistent.Capability~~~~0.0.1.0 + _exist: false +``` + +The `_exist: false` response indicates the capability identity is not recognized by DISM on this +system. + + +[01]: ../../../../../../cli/resource/get.md diff --git a/docs/reference/resources/Microsoft/Windows/FeatureOnDemandList/examples/install-remove-feature-on-demand.md b/docs/reference/resources/Microsoft/Windows/FeatureOnDemandList/examples/install-remove-feature-on-demand.md new file mode 100644 index 000000000..07ca6ca1b --- /dev/null +++ b/docs/reference/resources/Microsoft/Windows/FeatureOnDemandList/examples/install-remove-feature-on-demand.md @@ -0,0 +1,167 @@ +--- +description: > + Examples showing how to install and remove Windows features on demand (capabilities) using the + Microsoft.Windows/FeatureOnDemandList resource. +ms.date: 04/21/2026 +ms.topic: reference +title: Install and remove features on demand +--- + +# Install and remove features on demand + +This example shows how you can use the `Microsoft.Windows/FeatureOnDemandList` resource to install +and remove Windows features on demand (capabilities). The examples use +`OpenSSH.Client~~~~0.0.1.0` as a representative capability identity. + +> [!IMPORTANT] +> All operations with `Microsoft.Windows/FeatureOnDemandList` require an elevated (administrator) +> session. Run your terminal as administrator before executing these commands. + +> [!NOTE] +> Installing a capability may require internet access or an appropriately configured Windows Update +> or WSUS source. Installing large capabilities may take several minutes to complete. + +## Install a capability + +To install a capability, set its `state` to `Installed` and use the [dsc resource set][01] +command. + +```powershell +$instance = @{ + capabilities = @( + @{ + identity = 'OpenSSH.Client~~~~0.0.1.0' + state = 'Installed' + } + ) +} | ConvertTo-Json -Depth 3 + +dsc resource set --resource Microsoft.Windows/FeatureOnDemandList --input $instance +``` + +When the resource installs the capability, DSC returns the updated state: + +```yaml +beforeState: + capabilities: + - identity: OpenSSH.Client~~~~0.0.1.0 + state: NotPresent + displayName: OpenSSH Client + description: Open SSH-based secure shell (SSH) client... + downloadSize: 4026000 + installSize: 4894720 +afterState: + capabilities: + - identity: OpenSSH.Client~~~~0.0.1.0 + state: Installed + displayName: OpenSSH Client + description: Open SSH-based secure shell (SSH) client... + downloadSize: 0 + installSize: 4894720 +changedProperties: +- capabilities +``` + +If a system restart is required to complete the installation, the response includes a +`_restartRequired` property at the top level: + +```yaml +afterState: + _restartRequired: + - system: MYCOMPUTER + capabilities: + - identity: SomeCapability~~~~0.0.1.0 + state: InstallPending + ... +changedProperties: +- capabilities +``` + +## Remove a capability + +To remove a capability, set its `state` to `NotPresent` and use the [dsc resource set][01] command. + +```powershell +$instance = @{ + capabilities = @( + @{ + identity = 'OpenSSH.Client~~~~0.0.1.0' + state = 'NotPresent' + } + ) +} | ConvertTo-Json -Depth 3 + +dsc resource set --resource Microsoft.Windows/FeatureOnDemandList --input $instance +``` + +```yaml +beforeState: + capabilities: + - identity: OpenSSH.Client~~~~0.0.1.0 + state: Installed + displayName: OpenSSH Client + description: Open SSH-based secure shell (SSH) client... + downloadSize: 0 + installSize: 4894720 +afterState: + capabilities: + - identity: OpenSSH.Client~~~~0.0.1.0 + state: NotPresent + displayName: OpenSSH Client + description: Open SSH-based secure shell (SSH) client... + downloadSize: 4026000 + installSize: 4894720 +changedProperties: +- capabilities +``` + +## Manage multiple capabilities in a single operation + +You can install or remove multiple capabilities in a single **Set** call by specifying multiple +entries in the `capabilities` array. The resource processes each entry independently. + +```powershell +$instance = @{ + capabilities = @( + @{ + identity = 'OpenSSH.Client~~~~0.0.1.0' + state = 'Installed' + } + @{ + identity = 'OpenSSH.Server~~~~0.0.1.0' + state = 'NotPresent' + } + ) +} | ConvertTo-Json -Depth 3 + +dsc resource set --resource Microsoft.Windows/FeatureOnDemandList --input $instance +``` + +## Use in a configuration document + +You can also use the resource in a DSC configuration document to declaratively manage capabilities +across a system. + +```yaml +# features-on-demand.config.dsc.yaml +$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json +resources: + - name: Manage OpenSSH capabilities + type: Microsoft.Windows/FeatureOnDemandList + properties: + capabilities: + - identity: OpenSSH.Client~~~~0.0.1.0 + state: Installed + - identity: OpenSSH.Server~~~~0.0.1.0 + state: NotPresent +``` + +Apply the configuration with the [dsc config set][02] command: + +```powershell +dsc config set --file ./features-on-demand.config.dsc.yaml +``` + + +[01]: ../../../../../../cli/resource/set.md +[02]: ../../../../../../cli/config/set.md diff --git a/docs/reference/resources/Microsoft/Windows/FeatureOnDemandList/index.md b/docs/reference/resources/Microsoft/Windows/FeatureOnDemandList/index.md new file mode 100644 index 000000000..1e5e0bbde --- /dev/null +++ b/docs/reference/resources/Microsoft/Windows/FeatureOnDemandList/index.md @@ -0,0 +1,380 @@ +--- +description: Microsoft.Windows/FeatureOnDemandList resource reference documentation +ms.date: 04/21/2026 +ms.topic: reference +title: Microsoft.Windows/FeatureOnDemandList +--- + +# Microsoft.Windows/FeatureOnDemandList + +## Synopsis + +Manage Windows features on demand (capabilities) using the DISM API. + +## Metadata + +```yaml +Version : 0.1.0 +Kind : resource +Tags : [Windows, dism, capability, featureondemand, fod] +Author : Microsoft +``` + +## Instance definition syntax + +```yaml +resources: + - name: + type: Microsoft.Windows/FeatureOnDemandList + properties: + # Required properties + capabilities: + - identity: string + # Instance properties + state: Installed | NotPresent +``` + +## Description + +The `Microsoft.Windows/FeatureOnDemandList` resource enables you to idempotently manage Windows +features on demand (also known as capabilities) using the DISM API. Features on demand are optional +Windows components that are not part of the base OS image and may need to be downloaded from +Windows Update or a local source before use. Examples include language packs, accessibility tools, +the OpenSSH client and server, and developer tools like the RSAT (Remote Server Administration +Tools) suite. + +The resource can: + +- Retrieve the current state of one or more capabilities by identity. +- Install capabilities (`Installed`), downloading them from Windows Update if necessary. +- Remove capabilities from the system (`NotPresent`). +- Export a list of all capabilities on the system, optionally filtered by identity, state, display + name, or description. + +> [!NOTE] +> This resource is installed with DSC itself on Windows systems. +> +> You can update this resource by updating DSC. When you update DSC, the updated version of this +> resource is automatically available. + +## Requirements + +- The resource is only usable on a Windows system. +- All operations require an elevated (administrator) process context. +- Installing capabilities may require internet access or a configured Windows Update / WSUS source. + +## Capabilities + +The resource has the following capabilities: + +- `get` - You can use the resource to retrieve the actual state of one or more capability + instances. +- `set` - You can use the resource to enforce the desired state for one or more capability + instances. +- `export` - You can use the resource to enumerate all capabilities on the system, with optional + filtering. + +This resource uses the synthetic test functionality of DSC to determine whether an instance is in +the desired state. For more information about resource capabilities, see +[DSC resource capabilities][01]. + +## Examples + +1. [Get feature on demand state][02] - Shows how to retrieve the current state of a Windows + capability. +1. [Install and remove features on demand][03] - Shows how to install and remove Windows + capabilities using the `dsc resource set` command. +1. [Export features on demand][04] - Shows how to enumerate all capabilities on the system, with + and without filters. + +## Properties + +The following list describes the properties for the resource. + +- **Required properties:** The following properties are always + required when defining an instance of the resource. + + - [capabilities](#capabilities) - An array of capability entries. + +- **Read-only properties:** The resource returns the following + properties, but they aren't configurable. For more information about read-only properties, see + the "Read-only resource properties" section in [DSC resource properties][05]. + + - [_restartRequired](#_restartrequired) - Indicates that a system restart is required to complete + the state change. + +### capabilities + +
Expand for capabilities property metadata + +```yaml +Type : array +IsRequired : true +IsKey : false +IsReadOnly : false +``` + +
+ +An array of capability entries. Each entry is an object describing a Windows capability (Feature on +Demand). For the **Get** operation, each entry must specify [`identity`](#identity). For the **Set** +operation, each entry must specify both [`identity`](#identity) and [`state`](#state). For the +**Export** operation, the array is optional and each entry can filter results using +[`identity`](#identity), [`state`](#state), [`displayName`](#displayname), or +[`description`](#description) with wildcard support. + +Each entry in `capabilities` has the following properties: + +- [identity](#identity) - The identity string of the capability. +- [_exist](#_exist) - Indicates whether the capability is recognized by DISM. +- [state](#state) - The current or desired state of the capability. +- [displayName](#displayname) - The display name of the capability. +- [description](#description) - The description of the capability. +- [downloadSize](#downloadsize) - The download size of the capability in bytes. +- [installSize](#installsize) - The install size of the capability in bytes. + +#### identity + +
Expand for capabilities[*].identity property metadata + +```yaml +Type : string +IsRequired : true (get, set) / false (export) +IsKey : false +IsReadOnly : false +``` + +
+ +The identity string that uniquely identifies the Windows capability. For **Get** and **Set** +operations, this property is required for each entry. For **Export** operations, it's optional and +supports wildcard (`*`) patterns for case-insensitive filtering. + +Capability identities typically follow the format `CapabilityName~~~~LanguageTag~Version`, for +example `OpenSSH.Client~~~~0.0.1.0` or `Language.Basic~~~en-US~0.0.1.0`. + +Use the `dism /Online /Get-Capabilities` command to list available capability identities on your +system. + +#### _exist + +
Expand for capabilities[*]._exist property metadata + +```yaml +Type : boolean +IsRequired : false +IsKey : false +IsReadOnly : true +``` + +
+ +Indicates whether the capability exists on the system. The resource sets this property to `false` +in the **Get** response when the requested `identity` is not recognized by DISM. When `_exist` is +`false`, the `state`, `displayName`, `description`, `downloadSize`, and `installSize` properties +are not returned. + +#### state + +
Expand for capabilities[*].state property metadata + +```yaml +Type : string +IsRequired : true (set) / false (get, export) +IsKey : false +IsReadOnly : false (set input) / true (get/export output) +ValidValues : [NotPresent, UninstallPending, Staged, Removed, Installed, + InstallPending, Superseded, PartiallyInstalled] +SetValues : [Installed, NotPresent] +``` + +
+ +The state of the capability. **Get** and **Export** operations return one of the eight DISM +capability state values. **Set** operations accept only the following two values as desired state: + +| Value | Description | +|:-------------|:-------------------------------------------------------------------------------| +| `Installed` | The capability is installed. The resource installs it if not already present. | +| `NotPresent` | The capability is removed from the system. | + +The following table describes all possible state values returned by **Get** and **Export**: + +| Value | Description | +|:---------------------|:--------------------------------------------------------------------------| +| `NotPresent` | The capability is not installed and not staged. | +| `UninstallPending` | A removal operation is pending, requiring a restart to complete. | +| `Staged` | The capability payload is on disk but the capability is not installed. | +| `Removed` | The capability has been removed. | +| `Installed` | The capability is fully installed and operational. | +| `InstallPending` | An install operation is pending, requiring a restart to complete. | +| `Superseded` | The capability has been replaced by another component. | +| `PartiallyInstalled` | The capability is only partially installed. | + +#### displayName + +
Expand for capabilities[*].displayName property metadata + +```yaml +Type : string +IsRequired : false +IsKey : false +IsReadOnly : true +``` + +
+ +The human-readable display name of the capability. This property is returned by **Get** and +**Export** operations. For **Export** operations, you can specify this property as a filter value +with wildcard (`*`) support for case-insensitive matching. + +#### description + +
Expand for capabilities[*].description property metadata + +```yaml +Type : string +IsRequired : false +IsKey : false +IsReadOnly : true +``` + +
+ +A brief description of the capability. This property is returned by **Get** and **Export** +operations. For **Export** operations, you can specify this property as a filter value with +wildcard (`*`) support for case-insensitive matching. + +#### downloadSize + +
Expand for capabilities[*].downloadSize property metadata + +```yaml +Type : integer +IsRequired : false +IsKey : false +IsReadOnly : true +``` + +
+ +The size in bytes that must be downloaded to install the capability. This property is returned by +**Get** and **Export** operations. + +#### installSize + +
Expand for capabilities[*].installSize property metadata + +```yaml +Type : integer +IsRequired : false +IsKey : false +IsReadOnly : true +``` + +
+ +The size in bytes that the capability occupies on disk after installation. This property is returned +by **Get** and **Export** operations. + +### _restartRequired + +
Expand for _restartRequired property metadata + +```yaml +Type : array +IsRequired : false +IsKey : false +IsReadOnly : true +``` + +
+ +Returned at the top level of the **Set** operation response when DISM reports that a system restart +is required to complete the requested state changes. Each entry in the array is an object with a +`system` property containing the name of the computer. + +When no restart is required, this property is omitted from the response. + +## Instance validating schema + +The following snippet contains the JSON Schema that validates an instance of the resource. + +```json +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "required": ["capabilities"], + "additionalProperties": false, + "properties": { + "_restartRequired": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + }, + "capabilities": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "identity": { "type": "string" }, + "_exist": { "type": "boolean" }, + "state": { + "type": "string", + "enum": [ + "NotPresent", "UninstallPending", "Staged", "Removed", + "Installed", "InstallPending", "Superseded", "PartiallyInstalled" + ] + }, + "displayName": { "type": "string" }, + "description": { "type": "string" }, + "downloadSize": { "type": "integer" }, + "installSize": { "type": "integer" } + } + } + } + } +} +``` + +## Exit codes + +The resource returns the following exit codes from operations: + +- [0](#exit-code-0) - Success +- [1](#exit-code-1) - Error + +### Exit code 0 + +Indicates the resource operation completed without errors. The resource writes the result JSON to +stdout. + +### Exit code 1 + +Indicates the resource operation failed. The resource writes a descriptive error message to stderr. +Common causes include: + +- The `capabilities` array is empty. +- The `identity` property is missing from a capability entry in a **Get** or **Set** operation. +- The `state` property is missing from a capability entry in a **Set** operation. +- The desired `state` value is not one of the accepted **Set** values (`Installed`, `NotPresent`). +- The requested capability `identity` is not recognized by DISM. +- The DISM API returned an error while querying or modifying capability state. +- The process is not running with elevated privileges. + +## See also + +- [Microsoft.Windows/OptionalFeatureList resource][06] +- [Windows features on demand documentation][07] + + +[01]: ../../../../../concepts/resources/capabilities.md +[02]: ./examples/get-feature-on-demand.md +[03]: ./examples/install-remove-feature-on-demand.md +[04]: ./examples/export-features-on-demand.md +[05]: ../../../../../concepts/resources/properties.md#read-only-resource-properties +[06]: ../OptionalFeatureList/index.md +[07]: /windows-hardware/manufacture/desktop/features-on-demand-v2--capabilities diff --git a/docs/reference/resources/Microsoft/Windows/OptionalFeatureList/examples/enable-disable-optional-features.md b/docs/reference/resources/Microsoft/Windows/OptionalFeatureList/examples/enable-disable-optional-features.md new file mode 100644 index 000000000..14c654c66 --- /dev/null +++ b/docs/reference/resources/Microsoft/Windows/OptionalFeatureList/examples/enable-disable-optional-features.md @@ -0,0 +1,198 @@ +--- +description: > + Examples showing how to enable and disable Windows Optional features using the + Microsoft.Windows/OptionalFeatureList resource. +ms.date: 04/21/2026 +ms.topic: reference +title: Enable and disable optional features +--- + +# Enable and disable optional features + +This example shows how you can use the `Microsoft.Windows/OptionalFeatureList` resource to enable +and disable Windows Optional features on a system. The examples use `TelnetClient` as a +representative feature name. + +> [!IMPORTANT] +> All operations with `Microsoft.Windows/OptionalFeatureList` require an elevated (administrator) +> session. Run your terminal as administrator before executing these commands. + +## Enable an optional feature + +To enable an optional feature, set its `state` to `Installed` and use the [dsc resource set][01] +command. + +```powershell +$instance = @{ + features = @( + @{ + featureName = 'TelnetClient' + state = 'Installed' + } + ) +} | ConvertTo-Json -Depth 3 + +dsc resource set --resource Microsoft.Windows/OptionalFeatureList --input $instance +``` + +When the resource enables the feature, DSC returns the updated state: + +```yaml +beforeState: + features: + - featureName: TelnetClient + state: Disabled + displayName: Telnet Client + description: Includes Telnet Client + restartRequired: No +afterState: + features: + - featureName: TelnetClient + state: Installed + displayName: Telnet Client + description: Includes Telnet Client + restartRequired: No +changedProperties: +- features +``` + +If a system restart is required to complete the operation, the response includes a +`_restartRequired` property at the top level: + +```yaml +afterState: + _restartRequired: + - system: MYCOMPUTER + features: + - featureName: SomeFeature + state: InstallPending + ... +changedProperties: +- features +``` + +## Disable an optional feature (keep payload staged) + +To disable a feature while keeping the feature payload on disk (so it can be re-enabled quickly +without source media), set `state` to `NotPresent`. + +```powershell +$instance = @{ + features = @( + @{ + featureName = 'TelnetClient' + state = 'NotPresent' + } + ) +} | ConvertTo-Json -Depth 3 + +dsc resource set --resource Microsoft.Windows/OptionalFeatureList --input $instance +``` + +```yaml +beforeState: + features: + - featureName: TelnetClient + state: Installed + displayName: Telnet Client + description: Includes Telnet Client + restartRequired: No +afterState: + features: + - featureName: TelnetClient + state: Disabled + displayName: Telnet Client + description: Includes Telnet Client + restartRequired: No +changedProperties: +- features +``` + +## Disable an optional feature and remove its payload + +To disable a feature and completely remove its payload from disk, set `state` to `Removed`. This +frees disk space but requires source media (or Windows Update access) to re-enable the feature +later. + +```powershell +$instance = @{ + features = @( + @{ + featureName = 'TelnetClient' + state = 'Removed' + } + ) +} | ConvertTo-Json -Depth 3 + +dsc resource set --resource Microsoft.Windows/OptionalFeatureList --input $instance +``` + +```yaml +beforeState: + features: + - featureName: TelnetClient + state: Installed + displayName: Telnet Client + description: Includes Telnet Client + restartRequired: No +afterState: + features: + - featureName: TelnetClient + state: Removed + displayName: Telnet Client + description: Includes Telnet Client + restartRequired: No +changedProperties: +- features +``` + +## Manage multiple features in a single operation + +You can enable or disable multiple features in a single **Set** call by specifying multiple entries +in the `features` array. + +```powershell +$instance = @{ + features = @( + @{ + featureName = 'TelnetClient' + state = 'Installed' + } + @{ + featureName = 'TFTP' + state = 'NotPresent' + } + ) +} | ConvertTo-Json -Depth 3 + +dsc resource set --resource Microsoft.Windows/OptionalFeatureList --input $instance +``` + +## Use in a configuration document + +You can also use the resource in a DSC configuration document to declaratively manage optional +features across a system. + +```yaml +# optional-features.config.dsc.yaml +$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json +resources: + - name: Enable Telnet Client + type: Microsoft.Windows/OptionalFeatureList + properties: + features: + - featureName: TelnetClient + state: Installed + - featureName: TFTP + state: NotPresent +``` + +Apply the configuration with the [dsc config set][02] command: + +```powershell +dsc config set --file ./optional-features.config.dsc.yaml +``` + + +[01]: ../../../../../../cli/resource/set.md +[02]: ../../../../../../cli/config/set.md diff --git a/docs/reference/resources/Microsoft/Windows/OptionalFeatureList/examples/export-optional-features.md b/docs/reference/resources/Microsoft/Windows/OptionalFeatureList/examples/export-optional-features.md new file mode 100644 index 000000000..578feceb6 --- /dev/null +++ b/docs/reference/resources/Microsoft/Windows/OptionalFeatureList/examples/export-optional-features.md @@ -0,0 +1,144 @@ +--- +description: > + Examples showing how to export and filter Windows Optional features using the + Microsoft.Windows/OptionalFeatureList resource. +ms.date: 04/21/2026 +ms.topic: reference +title: Export optional features +--- + +# Export optional features + +This example shows how you can use the `Microsoft.Windows/OptionalFeatureList` resource to +enumerate Windows Optional features on a system, optionally filtering the results by name, state, +display name, or description. + +> [!IMPORTANT] +> All operations with `Microsoft.Windows/OptionalFeatureList` require an elevated (administrator) +> session. Run your terminal as administrator before executing these commands. + +## Export all optional features + +To retrieve a complete list of all optional features on the system, use the [dsc resource export][01] +command without any input. + +```powershell +dsc resource export --resource Microsoft.Windows/OptionalFeatureList +``` + +DSC returns a configuration document that includes all optional features and their current states: + +```yaml +$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json +resources: +- name: Microsoft.Windows/OptionalFeatureList + type: Microsoft.Windows/OptionalFeatureList + properties: + features: + - featureName: TFTP + state: Disabled + - featureName: TelnetClient + state: Disabled + - featureName: Containers-DisposableClientVM + state: Disabled + # ... additional features +``` + +> [!NOTE] +> When exporting without filters, the resource uses a fast enumeration path that returns only +> `featureName` and `state` for each feature. To retrieve additional properties such as +> `displayName` and `description`, use an export filter as shown in the examples below. + +## Export only installed features + +To list only the features that are currently enabled, provide a filter with `state: Installed`. + +```powershell +$filter = @{ + features = @( + @{ state = 'Installed' } + ) +} | ConvertTo-Json -Depth 3 + +dsc resource export --resource Microsoft.Windows/OptionalFeatureList --input $filter +``` + +```yaml +$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json +resources: +- name: Microsoft.Windows/OptionalFeatureList + type: Microsoft.Windows/OptionalFeatureList + properties: + features: + - featureName: NetFx4-AdvSrvs + state: Installed + - featureName: WCF-Services45 + state: Installed + # ... additional installed features +``` + +## Export features by name pattern + +You can filter features by name using wildcard (`*`) patterns. The match is case-insensitive. + +```powershell +$filter = @{ + features = @( + @{ featureName = 'Hyper-V*' } + ) +} | ConvertTo-Json -Depth 3 + +dsc resource export --resource Microsoft.Windows/OptionalFeatureList --input $filter +``` + +```yaml +$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json +resources: +- name: Microsoft.Windows/OptionalFeatureList + type: Microsoft.Windows/OptionalFeatureList + properties: + features: + - featureName: Microsoft-Hyper-V + state: Installed + - featureName: Microsoft-Hyper-V-Management-Clients + state: Installed + - featureName: Microsoft-Hyper-V-Management-PowerShell + state: Installed + - featureName: Microsoft-Hyper-V-Tools-All + state: Installed +``` + +## Export features with full details + +To retrieve full details including `displayName` and `description`, include those properties as +filters. An empty string (`""`) or a wildcard (`*`) matches all values for that field. + +```powershell +$filter = @{ + features = @( + @{ + featureName = 'TelnetClient' + displayName = '*' + } + ) +} | ConvertTo-Json -Depth 3 + +dsc resource export --resource Microsoft.Windows/OptionalFeatureList --input $filter +``` + +```yaml +$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json +resources: +- name: Microsoft.Windows/OptionalFeatureList + type: Microsoft.Windows/OptionalFeatureList + properties: + features: + - featureName: TelnetClient + state: Disabled + displayName: Telnet Client + description: Includes Telnet Client + restartRequired: No +``` + + +[01]: ../../../../../../cli/resource/export.md diff --git a/docs/reference/resources/Microsoft/Windows/OptionalFeatureList/examples/get-optional-feature.md b/docs/reference/resources/Microsoft/Windows/OptionalFeatureList/examples/get-optional-feature.md new file mode 100644 index 000000000..d69364f08 --- /dev/null +++ b/docs/reference/resources/Microsoft/Windows/OptionalFeatureList/examples/get-optional-feature.md @@ -0,0 +1,117 @@ +--- +description: > + Examples showing how to retrieve the current state of Windows Optional Features using the + Microsoft.Windows/OptionalFeatureList resource. +ms.date: 04/21/2026 +ms.topic: reference +title: Get optional feature state +--- + +# Get optional feature state + +This example shows how you can use the `Microsoft.Windows/OptionalFeatureList` resource to retrieve +the current state of Windows Optional Features. The examples use `TelnetClient` as a +representative feature name. + +> [!IMPORTANT] +> All operations with `Microsoft.Windows/OptionalFeatureList` require an elevated (administrator) +> session. Run your terminal as administrator before executing these commands. + +## Get a single feature + +The following snippet shows how to retrieve the state of the `TelnetClient` feature using the +[dsc resource get][01] command. + +```powershell +$instance = @{ + features = @( + @{ featureName = 'TelnetClient' } + ) +} | ConvertTo-Json -Depth 3 + +dsc resource get --resource Microsoft.Windows/OptionalFeatureList --input $instance +``` + +When the feature is disabled, DSC returns output similar to the following: + +```yaml +actualState: + features: + - featureName: TelnetClient + state: Disabled + displayName: Telnet Client + description: Includes Telnet Client + restartRequired: No +``` + +When the feature is enabled, the `state` field reads `Installed`: + +```yaml +actualState: + features: + - featureName: TelnetClient + state: Installed + displayName: Telnet Client + description: Includes Telnet Client + restartRequired: No +``` + +## Get multiple features in a single request + +You can retrieve the state of multiple features in a single call by including multiple entries in +the `features` array. + +```powershell +$instance = @{ + features = @( + @{ featureName = 'TelnetClient' } + @{ featureName = 'TFTP' } + ) +} | ConvertTo-Json -Depth 3 + +dsc resource get --resource Microsoft.Windows/OptionalFeatureList --input $instance +``` + +DSC returns the state of all requested features in a single response: + +```yaml +actualState: + features: + - featureName: TelnetClient + state: Disabled + displayName: Telnet Client + description: Includes Telnet Client + restartRequired: No + - featureName: TFTP + state: Disabled + displayName: TFTP Client + description: Includes TFTP Client + restartRequired: No +``` + +## Get a non-existent feature + +When you request a feature name that is not recognized by DISM, the resource returns `_exist: false` +instead of raising an error. + +```powershell +$instance = @{ + features = @( + @{ featureName = 'NonExistent-Feature-XYZ' } + ) +} | ConvertTo-Json -Depth 3 + +dsc resource get --resource Microsoft.Windows/OptionalFeatureList --input $instance +``` + +```yaml +actualState: + features: + - featureName: NonExistent-Feature-XYZ + _exist: false +``` + +The `_exist: false` response indicates the feature name is not recognized by DISM on this system. + + +[01]: ../../../../../../cli/resource/get.md diff --git a/docs/reference/resources/Microsoft/Windows/OptionalFeatureList/index.md b/docs/reference/resources/Microsoft/Windows/OptionalFeatureList/index.md new file mode 100644 index 000000000..3f769bc4c --- /dev/null +++ b/docs/reference/resources/Microsoft/Windows/OptionalFeatureList/index.md @@ -0,0 +1,367 @@ +--- +description: Microsoft.Windows/OptionalFeatureList resource reference documentation +ms.date: 04/21/2026 +ms.topic: reference +title: Microsoft.Windows/OptionalFeatureList +--- + +# Microsoft.Windows/OptionalFeatureList + +## Synopsis + +Manage Windows Optional features using the DISM API. + +## Metadata + +```yaml +Version : 0.1.0 +Kind : resource +Tags : [Windows, dism, optionalfeature, feature] +Author : Microsoft +``` + +## Instance definition syntax + +```yaml +resources: + - name: + type: Microsoft.Windows/OptionalFeatureList + properties: + # Required properties + features: + - featureName: string + # Instance properties + state: Installed | NotPresent | Removed +``` + +## Description + +The `Microsoft.Windows/OptionalFeatureList` resource enables you to idempotently manage Windows +Optional features using the DISM API. Optional features are components built into Windows that can +be enabled or disabled without downloading additional content. Examples include Hyper-V, +Windows Subsystem for Linux, and Internet Information Services (IIS). + +The resource can: + +- Retrieve the current state of one or more optional features by name. +- Enable optional features (`Installed`). +- Disable optional features while keeping the feature payload staged (`NotPresent`). +- Disable optional features and remove the associated payload from the system (`Removed`). +- Export a list of all optional features on the system, optionally filtered by name, state, display + name, or description. + +> [!NOTE] +> This resource is installed with DSC itself on Windows systems. +> +> You can update this resource by updating DSC. When you update DSC, the updated version of this +> resource is automatically available. + +## Requirements + +- The resource is only usable on a Windows system. +- All operations require an elevated (administrator) process context. + +## Capabilities + +The resource has the following capabilities: + +- `get` - You can use the resource to retrieve the actual state of one or more optional feature + instances. +- `set` - You can use the resource to enforce the desired state for one or more optional feature + instances. +- `export` - You can use the resource to enumerate all optional features on the system, with + optional filtering. + +This resource uses the synthetic test functionality of DSC to determine whether an instance is in +the desired state. For more information about resource capabilities, see +[DSC resource capabilities][01]. + +## Examples + +1. [Get optional feature state][02] - Shows how to retrieve the current state of a Windows + Optional Feature. +1. [Enable and disable optional features][03] - Shows how to enable and disable Windows Optional + Features using the `dsc resource set` command. +1. [Export optional features][04] - Shows how to enumerate all optional features on the system, + with and without filters. + +## Properties + +The following list describes the properties for the resource. + +- **Required properties:** The following properties are always + required when defining an instance of the resource. + + - [features](#features) - An array of optional feature entries. + +- **Read-only properties:** The resource returns the following + properties, but they aren't configurable. For more information about read-only properties, see + the "Read-only resource properties" section in [DSC resource properties][05]. + + - [_restartRequired](#_restartrequired) - Indicates that a system restart is required to complete + the state change. + +### features + +
Expand for features property metadata + +```yaml +Type : array +IsRequired : true +IsKey : false +IsReadOnly : false +``` + +
+ +An array of optional feature entries. Each entry is an object describing a Windows Optional Feature. +For the **Get** operation, each entry must specify [`featureName`](#featurename). For the **Set** +operation, each entry must specify both [`featureName`](#featurename) and [`state`](#state). For +the **Export** operation, the array is optional and each entry can filter results using +[`featureName`](#featurename), [`state`](#state), [`displayName`](#displayname), or +[`description`](#description) with wildcard support. + +Each entry in `features` has the following properties: + +- [featureName](#featurename) - The name of the optional feature. +- [_exist](#_exist) - Indicates whether the feature is recognized by DISM. +- [state](#state) - The current or desired state of the feature. +- [displayName](#displayname) - The display name of the feature. +- [description](#description) - The description of the feature. +- [restartRequired](#restartrequired) - Whether a restart is required after a state change. + +#### featureName + +
Expand for features[*].featureName property metadata + +```yaml +Type : string +IsRequired : true (get, set) / false (export) +IsKey : false +IsReadOnly : false +``` + +
+ +The name of the Windows Optional Feature. For **Get** and **Set** operations, this property is +required for each entry. For the **Export** operation, it's optional and supports wildcard (`*`) +patterns for case-insensitive filtering. + +Use the `dism /Online /Get-Features` command to list available feature names on your system. + +#### _exist + +
Expand for features[*]._exist property metadata + +```yaml +Type : boolean +IsRequired : false +IsKey : false +IsReadOnly : true +``` + +
+ +Indicates whether the feature exists on the system. The resource sets this property to `false` in +the **Get** response when the requested `featureName` is not recognized by DISM. When `_exist` is +`false`, the `state`, `displayName`, `description`, and `restartRequired` properties are not +returned. + +#### state + +
Expand for features[*].state property metadata + +```yaml +Type : string +IsRequired : true (set) / false (get, export) +IsKey : false +IsReadOnly : false (set input) / true (get/export output) +ValidValues : [NotPresent, UninstallPending, Staged, Removed, Installed, + InstallPending, Superseded, PartiallyInstalled] +SetValues : [Installed, NotPresent, Removed] +``` + +
+ +The state of the optional feature. **Get** and **Export** operations return one of the eight DISM +feature state values. **Set** operations accept only the following three values as desired state: + +| Value | Description | +|:-------------|:--------------------------------------------------------------------------| +| `Installed` | The feature is enabled. The resource enables the feature if not already. | +| `NotPresent` | The feature is disabled but the payload remains on disk (staged). | +| `Removed` | The feature is disabled and the payload is removed from the system. | + +The following table describes all possible state values returned by **Get** and **Export**: + +| Value | Description | +|:---------------------|:--------------------------------------------------------------------| +| `NotPresent` | The feature is disabled with its payload removed or never staged. | +| `UninstallPending` | A disable operation is pending, requiring a restart to complete. | +| `Staged` | The feature payload is on disk but the feature is not enabled. | +| `Removed` | The feature is disabled and its source payload has been removed. | +| `Installed` | The feature is enabled and fully operational. | +| `InstallPending` | An enable operation is pending, requiring a restart to complete. | +| `Superseded` | The feature has been replaced by another component. | +| `PartiallyInstalled` | The feature is only partially installed. | + +#### displayName + +
Expand for features[*].displayName property metadata + +```yaml +Type : string +IsRequired : false +IsKey : false +IsReadOnly : true +``` + +
+ +The human-readable display name of the optional feature. This property is returned by **Get** and +**Export** operations. For **Export** operations, you can specify this property as a filter value +with wildcard (`*`) support for case-insensitive matching. + +#### description + +
Expand for features[*].description property metadata + +```yaml +Type : string +IsRequired : false +IsKey : false +IsReadOnly : true +``` + +
+ +A brief description of the optional feature. This property is returned by **Get** and **Export** +operations. For **Export** operations, you can specify this property as a filter value with +wildcard (`*`) support for case-insensitive matching. + +#### restartRequired + +
Expand for features[*].restartRequired property metadata + +```yaml +Type : string +IsRequired : false +IsKey : false +IsReadOnly : true +ValidValues : [No, Possible, Required] +``` + +
+ +Indicates whether a system restart is required after enabling or disabling the feature. This +property is returned by **Get** and **Export** operations and cannot be set. + +| Value | Description | +|:-----------|:----------------------------------------------------------| +| `No` | No restart is required after the state change. | +| `Possible` | A restart may be required depending on system conditions. | +| `Required` | A restart is required to complete the state change. | + +### _restartRequired + +
Expand for _restartRequired property metadata + +```yaml +Type : array +IsRequired : false +IsKey : false +IsReadOnly : true +``` + +
+ +Returned at the top level of the **Set** operation response when DISM reports that a system restart +is required to complete the requested state changes. Each entry in the array is an object with a +`system` property containing the name of the computer. + +When no restart is required, this property is omitted from the response. + +## Instance validating schema + +The following snippet contains the JSON Schema that validates an instance of the resource. + +```json +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "required": ["features"], + "additionalProperties": false, + "properties": { + "_restartRequired": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + }, + "features": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "featureName": { "type": "string" }, + "_exist": { "type": "boolean" }, + "state": { + "type": "string", + "enum": [ + "NotPresent", "UninstallPending", "Staged", "Removed", + "Installed", "InstallPending", "Superseded", "PartiallyInstalled" + ] + }, + "displayName": { "type": "string" }, + "description": { "type": "string" }, + "restartRequired": { + "type": "string", + "enum": ["No", "Possible", "Required"] + } + } + } + } + } +} +``` + +## Exit codes + +The resource returns the following exit codes from operations: + +- [0](#exit-code-0) - Success +- [1](#exit-code-1) - Error + +### Exit code 0 + +Indicates the resource operation completed without errors. The resource writes the result JSON to +stdout. + +### Exit code 1 + +Indicates the resource operation failed. The resource writes a descriptive error message to stderr. +Common causes include: + +- The `features` array is empty. +- The `featureName` property is missing from a feature entry in a **Get** or **Set** operation. +- The `state` property is missing from a feature entry in a **Set** operation. +- The desired `state` value is not one of the accepted **Set** values (`Installed`, `NotPresent`, + `Removed`). +- The DISM API returned an error while querying or modifying feature state. +- The process is not running with elevated privileges. + +## See also + +- [Microsoft.Windows/FeatureOnDemandList resource][06] +- [Windows Optional Features documentation][07] + + +[01]: ../../../../../concepts/resources/capabilities.md +[02]: ./examples/get-optional-feature.md +[03]: ./examples/enable-disable-optional-features.md +[04]: ./examples/export-optional-features.md +[05]: ../../../../../concepts/resources/properties.md#read-only-resource-properties +[06]: ../FeatureOnDemandList/index.md +[07]: /windows-server/administration/windows-commands/dism/dism-operating-system-package-servicing-command-line-options diff --git a/docs/reference/resources/overview.md b/docs/reference/resources/overview.md index 050999f1b..00118ec15 100644 --- a/docs/reference/resources/overview.md +++ b/docs/reference/resources/overview.md @@ -12,6 +12,8 @@ This document lists the available resources and links to the reference documenta - [Microsoft.DSC/PowerShell](./microsoft/dsc/powershell/resource.md) - [Microsoft.DSC.Debug/Echo](./microsoft/dsc/debug/echo/resource.md) - [Microsoft.DSC.Transitional/RunCommandOnSet](./microsoft/dsc/transitional/runcomandonset/resource.md) +- [Microsoft.Windows/FeatureOnDemandList](./Microsoft/Windows/FeatureOnDemandList/index.md) +- [Microsoft.Windows/OptionalFeatureList](./Microsoft/Windows/OptionalFeatureList/index.md) - [Microsoft.Windows/RebootPending](./microsoft/windows/rebootpending/resource.md) - [Microsoft.Windows/Registry](./microsoft/windows/registry/resource.md) - [Microsoft.Windows/WindowsPowerShell](./microsoft/windows/windowspowershell/resource.md) @@ -40,6 +42,8 @@ Manifest: The following built-in resources to change the state of a machine directly: - [Microsoft.DSC.Transitional/RunCommandOnSet](./microsoft/dsc/transitional/runcomandonset/resource.md) +- [Microsoft.Windows/FeatureOnDemandList](./Microsoft/Windows/FeatureOnDemandList/index.md) +- [Microsoft.Windows/OptionalFeatureList](./Microsoft/Windows/OptionalFeatureList/index.md) - [Microsoft.Windows/Registry](./microsoft/windows/registry/resource.md) ## Built-in debugging resources