Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ default-members = [
"lib/dsc-lib-registry",
"resources/runcommandonset",
"lib/dsc-lib-security_context",
"resources/dism_dsc",
"resources/sshdconfig",
"resources/WindowsUpdate",
"resources/windows_service",
Expand All @@ -58,7 +57,8 @@ default-members = [
"grammars/tree-sitter-dscexpression",
"grammars/tree-sitter-ssh-server-config",
"y2j",
"xtask"
"xtask",
"resources/dism_dsc"
]

[workspace.metadata.groups]
Expand Down
3 changes: 2 additions & 1 deletion data.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@
"windows_firewall.exe",
"windows_service.exe",
"windows_service.dsc.resource.json",
"windows_feature.dsc.resource.json",
"wmi.dsc.resource.json",
"wmi.resource.ps1",
"wmiAdapter.psd1",
Expand Down Expand Up @@ -180,7 +181,7 @@
"SupportedPlatformOS": "Windows",
"Binaries": ["dism_dsc"],
"CopyFiles": {
"Windows": ["optionalfeature.dsc.resource.json", "featureondemand.dsc.resource.json"]
"Windows": ["optionalfeature.dsc.resource.json", "featureondemand.dsc.resource.json", "windows_feature.dsc.resource.json"]
}
},
{
Expand Down
4 changes: 2 additions & 2 deletions lib/dsc-lib-registry/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ pub struct Registry {
}

#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize, JsonSchema)]
#[serde(deny_unknown_fields)]
#[serde(deny_unknown_fields, rename_all = "camelCase")]
pub struct Metadata {
#[serde(rename = "whatIf", skip_serializing_if = "Option::is_none")]
#[serde(skip_serializing_if = "Option::is_none")]
pub what_if: Option<Vec<String>>
}
2 changes: 1 addition & 1 deletion resources/dism_dsc/.project.data.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"SupportedPlatformOS": "Windows",
"Binaries": ["dism_dsc"],
"CopyFiles": {
"Windows": ["optionalfeature.dsc.resource.json", "featureondemand.dsc.resource.json"]
"Windows": ["optionalfeature.dsc.resource.json", "featureondemand.dsc.resource.json", "windows_feature.dsc.resource.json"]
}
}
9 changes: 7 additions & 2 deletions resources/dism_dsc/locales/en-us.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ _version = 1

[main]
missingArguments = "Missing operation and resource type arguments"
usage = "Usage: dism_dsc <get|set|export> <optional-feature|feature-on-demand>"
usage = "Usage: dism_dsc <get|set|export> <optional-feature|feature-on-demand|windows-feature>"
windowsOnly = "This resource is only supported on Windows"
unknownOperation = "Unknown operation '%{operation}'"
unknownResourceType = "Unknown resource type '%{resource_type}'. Expected 'optional-feature' or 'feature-on-demand'"
unknownResourceType = "Unknown resource type '%{resource_type}'. Expected 'optional-feature', 'feature-on-demand', or 'windows-feature'"
errorReadingInput = "Error reading input: %{err}"

[get]
Expand Down Expand Up @@ -60,3 +60,8 @@ getCapabilitiesFailed = "DismGetCapabilities failed: HRESULT %{hr}"
getCapabilityInfoFailed = "DismGetCapabilityInfo failed for '%{name}': HRESULT %{hr}"
addCapabilityFailed = "DismAddCapability failed for '%{name}': HRESULT %{hr}"
removeCapabilityFailed = "DismRemoveCapability failed for '%{name}': HRESULT %{hr}"

[windows_feature_helper]
whatIfEnable = "Would enable feature '%{name}'"
whatIfDisable = "Would disable feature '%{name}' (remove payload: false)"
whatIfRemove = "Would remove feature '%{name}' (remove payload: true)"
Loading
Loading