@adrifer/winix 0.2.0-preview.4 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -68,7 +68,7 @@ export interface WinRawCommand {
68
68
  *
69
69
  * Typed helpers (env/path) construct native DSC resources internally:
70
70
  * `Microsoft.Windows/Registry` for env and
71
- * `Microsoft.DSC.Transitional/WindowsPowerShellScript` for PATH.
71
+ * `Microsoft.DSC.Transitional/WindowsPowerShellScript` for PATH/files.
72
72
  */
73
73
  export interface WinDscResource {
74
74
  /**
@@ -87,18 +87,78 @@ export interface WinDscResource {
87
87
  * JSON-like values (string/number/boolean/null/array/object).
88
88
  */
89
89
  properties?: WinDscProperties;
90
+ /**
91
+ * When true, the resource is applied in an elevated security context via
92
+ * `metadata.winget.securityContext: elevated`.
93
+ */
94
+ elevated?: boolean;
90
95
  /**
91
96
  * Unique identity token so a handle returned by `windows.dsc(...)`,
92
97
  * `windows.env.*(...)`, or `windows.path.*(...)` can be referenced in another
93
98
  * resource's `dependsOn`. Non-enumerable in spirit; carried internally only.
94
99
  */
95
100
  token?: symbol;
101
+ /**
102
+ * Internal metadata for typed helpers. The emitter uses this to perform
103
+ * host-level rewrites that require seeing multiple resources together (for
104
+ * example resolving Winix-managed env var references in PATH entries). This
105
+ * must never be serialized to the generated DSC YAML.
106
+ */
107
+ winix?: WinDscMetadata;
96
108
  /**
97
109
  * Resources this resource must be applied after, as resolved references.
98
110
  * Emitted as DSC v3 `dependsOn`. References must belong to the same host.
99
111
  */
100
112
  dependsOn?: ResourceRef[];
101
113
  }
114
+ export type WinDscMetadata = {
115
+ kind: "env";
116
+ action: "set" | "remove";
117
+ name: string;
118
+ value?: string;
119
+ scope: "user" | "machine";
120
+ } | {
121
+ kind: "path";
122
+ action: "add" | "remove";
123
+ value: string;
124
+ scope: "user" | "machine";
125
+ } | {
126
+ kind: "setting";
127
+ };
128
+ export type WinColorMode = "Light" | "Dark";
129
+ export type WinTaskbarAlignment = "Left" | "Center";
130
+ export type WinTaskbarGroupingMode = "Always" | "WhenFull" | "Never";
131
+ export type WinTaskbarMultiMonMode = "Duplicate" | "PrimaryAndWindow" | "WindowOnly";
132
+ export type WinStartFolder = "Documents" | "Downloads" | "Music" | "Pictures" | "Videos" | "Network" | "UserProfile" | "Explorer" | "Settings";
133
+ /**
134
+ * Typed Windows OS settings exposed by
135
+ * `Microsoft.Windows.Settings/WindowsSettings`.
136
+ */
137
+ export interface WinSettings {
138
+ TaskbarAlignment?: WinTaskbarAlignment;
139
+ AppColorMode?: WinColorMode;
140
+ SystemColorMode?: WinColorMode;
141
+ DeveloperMode?: boolean;
142
+ SetTimeZoneAutomatically?: boolean;
143
+ /** Windows time zone ID. Winix validates only that this is non-empty; the target validates the ID. */
144
+ TimeZone?: string;
145
+ EnableTransparency?: boolean;
146
+ ShowAccentColorOnStartAndTaskbar?: boolean;
147
+ ShowAccentColorOnTitleBarsAndWindowBorders?: boolean;
148
+ AutoColorization?: boolean;
149
+ StartFolders?: WinStartFolder[];
150
+ ShowRecentList?: boolean;
151
+ ShowRecommendedList?: boolean;
152
+ TaskbarBadges?: boolean;
153
+ DesktopTaskbarBadges?: boolean;
154
+ TaskbarGroupingMode?: WinTaskbarGroupingMode;
155
+ TaskbarMultiMon?: boolean;
156
+ DesktopTaskbarMultiMon?: boolean;
157
+ TaskbarMultiMonMode?: WinTaskbarMultiMonMode;
158
+ DesktopTaskbarMultiMonMode?: WinTaskbarMultiMonMode;
159
+ NotifyOnUsbErrors?: boolean;
160
+ NotifyOnWeakCharger?: boolean;
161
+ }
102
162
  /** JSON-like value accepted in generic DSC `properties`. */
103
163
  export type WinDscPropertyValue = string | number | boolean | null | WinDscPropertyValue[] | {
104
164
  [key: string]: WinDscPropertyValue;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adrifer/winix",
3
- "version": "0.2.0-preview.4",
3
+ "version": "0.2.0",
4
4
  "description": "TypeScript-first system configuration for NixOS, nix-darwin, and Home Manager",
5
5
  "license": "MIT",
6
6
  "author": "Adrian Fernandez",