-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathproject-json-reference.html
More file actions
712 lines (697 loc) · 36.2 KB
/
Copy pathproject-json-reference.html
File metadata and controls
712 lines (697 loc) · 36.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta content="width=device-width, initial-scale=1" name="viewport">
<title>NovaModuleTools — project.json reference and configuration guide</title>
<meta content="Complete reference for NovaModuleTools project.json settings, including top-level build settings, manifest metadata, package settings, raw upload configuration, and Pester options."
name="description">
<meta content="index,follow,max-image-preview:large" name="robots">
<meta content="#0b1020" name="theme-color">
<link href="https://www.novamoduletools.com/project-json-reference.html" rel="canonical">
<link href="./assets/icon.png" rel="icon" type="image/png">
<link href="./assets/icon.png" rel="apple-touch-icon">
<meta content="article" property="og:type">
<meta content="NovaModuleTools — project.json reference and configuration guide" property="og:title">
<meta content="Use this page as the source of truth for NovaModuleTools project.json settings, defaults, examples, and workflow effects."
property="og:description">
<meta content="https://www.novamoduletools.com/project-json-reference.html" property="og:url">
<meta content="https://www.novamoduletools.com/assets/icon.png" property="og:image">
<meta content="summary" name="twitter:card">
<meta content="NovaModuleTools — project.json reference and configuration guide" name="twitter:title">
<meta content="Use this page as the source of truth for NovaModuleTools project.json settings, defaults, examples, and workflow effects."
name="twitter:description">
<link href="./assets/site.css" rel="stylesheet">
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "TechArticle",
"headline": "NovaModuleTools project.json reference",
"description": "Reference for NovaModuleTools project.json configuration.",
"url": "https://www.novamoduletools.com/project-json-reference.html"
}
</script>
</head>
<body>
<header class="site-header">
<div class="site-header__inner">
<a class="site-brand" href="./index.html">
<img alt="" class="site-brand__icon" src="./assets/icon.png">
<span class="site-brand__text">NovaModuleTools</span>
</a>
<details class="site-menu">
<summary class="site-menu__button">
<span class="site-menu__button-label">Menu</span>
<span class="site-menu__current">project.json Reference</span>
</summary>
<nav aria-label="Primary" class="site-menu__panel">
<a class="site-nav__link" href="./index.html">Home</a>
<a class="site-nav__link" href="./getting-started.html">Getting Started</a>
<a class="site-nav__link" href="./core-workflows.html">Core Workflows</a>
<a class="site-nav__link" href="./working-with-modules.html">Working with Modules</a>
<a aria-current="page" class="site-nav__link site-nav__link--active"
href="./project-json-reference.html">project.json Reference</a>
<a class="site-nav__link" href="./commands.html">Command Reference</a>
<a class="site-nav__link" href="./packaging-and-delivery.html">Packaging & Delivery</a>
<a class="site-nav__link" href="./versioning-and-updates.html">Versioning & Updates</a>
<a class="site-nav__link" href="./troubleshooting.html">Troubleshooting</a>
<a class="site-nav__link" href="./advanced.html">Concepts</a>
<a class="site-nav__link" href="./release-notes.html">Release Notes</a>
</nav>
</details>
</div>
</header>
<main class="page-shell">
<section class="guide-hero">
<p class="eyebrow">Reference</p>
<h1>Understand every setting in <code>project.json</code></h1>
<p class="lead">NovaModuleTools reads <code>project.json</code> to decide how your project is scaffolded, built,
tested, packaged, uploaded, published, and released. Use this page to understand what each setting does,
what the defaults are, and when you should override them.</p>
</section>
<section class="content-grid">
<aside class="toc-card">
<h2>On this page</h2>
<ul class="toc-list">
<li><a href="#reading-order">How to read this file</a></li>
<li><a href="#example">Complete example</a></li>
<li><a href="#top-level">Top-level project settings</a></li>
<li><a href="#manifest">Manifest settings</a></li>
<li><a href="#package">Package settings</a></li>
<li><a href="#pester">Pester settings</a></li>
<li><a href="#recipes">Common recipes</a></li>
</ul>
</aside>
<div class="guide-content">
<section class="content-section" id="reading-order">
<h2>How to read this file</h2>
<p>Think of <code>project.json</code> in layers:</p>
<ol class="plain-list plain-list--ordered">
<li><strong>Top-level project settings</strong> control the build shape, source markers, resource
copying, and duplicate-function validation.
</li>
<li><strong><code>Manifest</code></strong> controls metadata for the generated PowerShell module
manifest and package metadata reuse.
</li>
<li><strong><code>Package</code></strong> controls package creation and optional raw HTTP upload
defaults.
</li>
<li><strong><code>Pester</code></strong> controls the test run configuration used by <code>Test-NovaBuild</code>.
</li>
</ol>
<div class="notice">
<strong>Default behavior matters.</strong>
<p>You only need to add settings when you want to override the default workflow. For example, if you
never add a <code>Package</code> section, <code>New-NovaModulePackage</code> still works and
defaults
to a single <code>.nupkg</code> written to <code>artifacts/packages/</code>.</p>
</div>
<div class="notice notice--warning">
<strong>Important compatibility note.</strong>
<p>The runtime and shipped examples currently use some manifest and Pester fields more broadly than
the JSON schema files explicitly enumerate. In practice, the current product and examples use
<code>Manifest.ReleaseNotes</code>, <code>Manifest.LicenseUri</code>,
<code>Manifest.IconUri</code>, and <code>Pester.TestResult.OutputFormat</code>. The reference
below documents the live behavior that the product uses today and calls out those schema gaps
where they matter.</p>
</div>
</section>
<section class="content-section" id="example">
<h2>Complete example</h2>
<p>The packaged example project is the best real-world reference because it shows the current full
configuration surface in one place.</p>
<pre><code>{
"ProjectName": "NovaExampleModule",
"Description": "A working example project that demonstrates NovaModuleTools.",
"Version": "0.1.0",
"CopyResourcesToModuleRoot": false,
"BuildRecursiveFolders": true,
"SetSourcePath": true,
"FailOnDuplicateFunctionNames": true,
"Preamble": [
"Set-StrictMode -Version Latest",
"$ErrorActionPreference = 'Stop'"
],
"Manifest": {
"Author": "NovaModuleTools",
"PowerShellHostVersion": "7.4",
"GUID": "b3b4ca64-a274-4768-872d-2b3c8bc12a39",
"Tags": ["Example", "NovaModuleTools", "PowerShell"],
"ProjectUri": "https://www.novamoduletools.com/",
"ReleaseNotes": "https://www.novamoduletools.com/release-notes.html",
"LicenseUri": "https://www.novamoduletools.com/license.html"
},
"Package": {
"Id": "NovaExampleModule",
"Types": ["NuGet", "Zip"],
"Latest": "stable",
"OutputDirectory": {
"Path": "artifacts/packages",
"Clean": true
},
"PackageFileName": "NovaExampleModule",
"AddVersionToFileName": true,
"FileNamePattern": "NovaExampleModule*",
"Authors": ["NovaModuleTools", "Example Maintainer"],
"Description": "Example package metadata and raw upload configuration for NovaExampleModule.",
"RepositoryUrl": "https://packages.example.test/raw/novamodule/",
"UploadPath": "stable/latest",
"Headers": {
"X-Client-Id": "nova-example"
},
"Auth": {
"HeaderName": "Authorization",
"Scheme": "Bearer",
"TokenEnvironmentVariable": "NOVA_EXAMPLE_PACKAGE_TOKEN"
},
"Repositories": [
{
"Name": "ExampleRaw",
"Url": "https://packages.example.test/raw/novamodule/"
}
]
},
"Pester": {
"TestResult": {
"Enabled": true,
"OutputFormat": "NUnitXml"
},
"Output": {
"Verbosity": "Detailed"
}
}
}</code></pre>
<p><a class="text-link" href="./working-with-modules.html#example-project">See how to use the packaged
example as a learning project</a></p>
</section>
<section class="content-section" id="top-level">
<h2>Top-level project settings</h2>
<div class="table-scroll">
<table>
<thead>
<tr>
<th>Setting</th>
<th>Purpose</th>
<th>Default</th>
<th>Workflow effect</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>ProjectName</code></td>
<td>Name of the module and the output folder under <code>dist/</code>.</td>
<td>Required</td>
<td>Determines manifest name, module name, and many generated paths.</td>
</tr>
<tr>
<td><code>Description</code></td>
<td>Human-readable project description.</td>
<td>Required</td>
<td>Feeds manifest and package metadata when you do not override them later.</td>
</tr>
<tr>
<td><code>Version</code></td>
<td>Current semantic version stored for the project.</td>
<td>Required</td>
<td>Used in package names, manifest metadata, <code>% nova version</code>, and release
flows.
</td>
</tr>
<tr>
<td><code>CopyResourcesToModuleRoot</code></td>
<td>Controls where resources are copied in the built module.</td>
<td><code>false</code></td>
<td>When <code>false</code>, resources stay in a <code>resources/</code> folder. When <code>true</code>,
they are copied into the module root.
</td>
</tr>
<tr>
<td><code>BuildRecursiveFolders</code></td>
<td>Controls recursive discovery for classes, private helpers, and tests.</td>
<td><code>true</code></td>
<td>Affects how nested source files and nested tests are discovered.</td>
</tr>
<tr>
<td><code>SetSourcePath</code></td>
<td>Controls <code># Source:</code> markers in the generated <code>.psm1</code>.</td>
<td><code>true</code></td>
<td>Makes parser and runtime errors easier to map back to source files.</td>
</tr>
<tr>
<td><code>FailOnDuplicateFunctionNames</code></td>
<td>Fails the build when duplicate top-level function names are emitted.</td>
<td><code>true</code></td>
<td>Protects the generated module from ambiguous exports and hidden overwrites.</td>
</tr>
<tr>
<td><code>Preamble</code></td>
<td>Optional lines written at the top of the generated <code>.psm1</code>.</td>
<td>Empty array</td>
<td>Useful for <code>Set-StrictMode</code>, <code>$ErrorActionPreference</code>, or other
module-wide setup lines.
</td>
</tr>
</tbody>
</table>
</div>
<h3>Examples</h3>
<pre><code>{
"CopyResourcesToModuleRoot": true,
"BuildRecursiveFolders": false,
"SetSourcePath": true,
"FailOnDuplicateFunctionNames": true,
"Preamble": [
"Set-StrictMode -Version Latest",
"$ErrorActionPreference = 'Stop'"
]
}</code></pre>
<p>Use this pattern when you want strict runtime defaults, top-level-only test discovery, and resources
copied directly to the module root.</p>
</section>
<section class="content-section" id="manifest">
<h2><code>Manifest</code> settings</h2>
<p>These settings feed the generated PowerShell module manifest and, in several cases, package
metadata.</p>
<div class="table-scroll">
<table>
<thead>
<tr>
<th>Setting</th>
<th>Required</th>
<th>What it does</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>Author</code></td>
<td>Yes</td>
<td>Sets the manifest author and the default package author when
<code>Package.Authors</code> is omitted.
</td>
<td>Use a single author string; package logic can later expand into arrays.</td>
</tr>
<tr>
<td><code>PowerShellHostVersion</code></td>
<td>Yes</td>
<td>Defines the minimum PowerShell version expected by the generated module.</td>
<td>Users see this in the manifest and module compatibility expectations.</td>
</tr>
<tr>
<td><code>GUID</code></td>
<td>Yes</td>
<td>Sets the manifest GUID.</td>
<td>Generate a new GUID for each distinct module.</td>
</tr>
<tr>
<td><code>Tags</code></td>
<td>No</td>
<td>Adds manifest tags and is reused by package metadata when present.</td>
<td>Optional in practice and safe to omit.</td>
</tr>
<tr>
<td><code>ProjectUri</code></td>
<td>No</td>
<td>Publishes a project URL in the manifest and package metadata.</td>
<td>Explicitly described in the current build schema.</td>
</tr>
<tr>
<td><code>ReleaseNotes</code></td>
<td>No</td>
<td>Publishes a release notes link for packaging and user-facing metadata.</td>
<td>Used by the current product and examples even though the build schema does not enumerate
it separately yet.
</td>
</tr>
<tr>
<td><code>LicenseUri</code></td>
<td>No</td>
<td>Publishes a license URL for packaging and manifest metadata.</td>
<td>Used in practice and shown in the packaged example.</td>
</tr>
<tr>
<td><code>IconUri</code></td>
<td>No</td>
<td>Publishes an icon URL in the manifest.</td>
<td>Used by the repository project itself and worth keeping stable when you publish
publicly.
</td>
</tr>
</tbody>
</table>
</div>
<p class="tiny-note">If <code>Tags</code>, <code>ProjectUri</code>, <code>ReleaseNotes</code>, or <code>LicenseUri</code>
are omitted, packaging still succeeds. The corresponding package metadata fields are simply left
out.</p>
</section>
<section class="content-section" id="package">
<h2><code>Package</code> settings</h2>
<p>The <code>Package</code> section controls two related but different concerns:</p>
<ul class="plain-list">
<li><strong>package creation</strong> via <code>New-NovaModulePackage</code> / <code>% nova
package</code>
</li>
<li><strong>raw HTTP artifact upload</strong> via <code>Deploy-NovaPackage</code> / <code>% nova
deploy</code></li>
</ul>
<div class="notice">
<strong>Keep these concepts separate.</strong>
<p><code>Package.Types</code>, <code>Package.Latest</code>, and <code>OutputDirectory</code> decide
what gets created. <code>RepositoryUrl</code>, <code>Headers</code>, <code>Auth</code>, and
<code>Repositories</code> decide how existing artifacts are uploaded later.</p>
</div>
<h3>Package creation settings</h3>
<div class="table-scroll">
<table>
<thead>
<tr>
<th>Setting</th>
<th>Default</th>
<th>What it controls</th>
<th>Gotchas</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>Id</code></td>
<td><code>ProjectName</code></td>
<td>The package identifier and default naming base.</td>
<td>Override this only when the package identity should differ from the module name.</td>
</tr>
<tr>
<td><code>Types</code></td>
<td><code>["NuGet"]</code></td>
<td>Which package formats to create.</td>
<td>Supported values are <code>NuGet</code>, <code>Zip</code>, <code>.nupkg</code>, and
<code>.zip</code>, and matching is case-insensitive.
</td>
</tr>
<tr>
<td><code>Latest</code></td>
<td><code>"never"</code></td>
<td>Controls whether Nova creates companion <code>latest</code> artifacts for each selected type.</td>
<td>Use <code>"stable"</code> to update <code>latest</code> only for stable versions, <code>"always"</code> for both stable and preview versions, or <code>"never"</code> to disable the floating alias.
</td>
</tr>
<tr>
<td><code>OutputDirectory.Path</code></td>
<td><code>artifacts/packages</code></td>
<td>Where packages are written.</td>
<td>This is also the default discovery location for <code>Deploy-NovaPackage</code>.</td>
</tr>
<tr>
<td><code>OutputDirectory.Clean</code></td>
<td><code>true</code></td>
<td>Whether to clear the output directory before packaging.</td>
<td>Set it to <code>false</code> only when you intentionally want to retain older files.
</td>
</tr>
<tr>
<td><code>PackageFileName</code></td>
<td><code><Id>.<Version>.nupkg</code></td>
<td>Base file name used for package generation.</td>
<td>Nova normalizes the extension per package type. When you combine a custom base name with
<code>AddVersionToFileName</code>, Nova appends the project version before the extension
and can still swap that suffix for <code>latest</code> when needed.
</td>
</tr>
<tr>
<td><code>AddVersionToFileName</code></td>
<td><code>false</code></td>
<td>Appends <code>.<Version></code> from the top-level project version to the
configured
<code>PackageFileName</code>.
</td>
<td>Useful when <code>PackageFileName</code> is a stable base name such as
<code>AgentInstaller</code>. With <code>Latest</code> enabled, Nova substitutes the
appended version suffix with <code>.latest</code> for the companion artifact.
</td>
</tr>
<tr>
<td><code>FileNamePattern</code></td>
<td><code><Id>*</code> in practice</td>
<td>Pattern used to discover matching package files for upload.</td>
<td>When you omit it, Nova falls back to <code><Id>*</code> and adds the active
package
type extension during discovery. When you set it, your pattern overrides that default.
If <code>PackageFileName</code> uses a different base name than <code>Id</code>, update
<code>FileNamePattern</code> too so deploy discovery still matches the generated files.
A pattern that already ends with <code>.zip</code> or <code>.nupkg</code> is treated as
authoritative, so <code>MyModule.*.zip</code> matches <code>MyModule.1.2.3.zip</code>
and <code>MyModule.latest.zip</code> without discovering <code>.nupkg</code> files.
</td>
</tr>
<tr>
<td><code>Authors</code></td>
<td>Derived from <code>Manifest.Author</code></td>
<td>Package author metadata.</td>
<td>Can be a single string or an array of strings.</td>
</tr>
<tr>
<td><code>Description</code></td>
<td>Derived from top-level <code>Description</code></td>
<td>Package description metadata.</td>
<td>Use this when the package description should differ from the module description.</td>
</tr>
</tbody>
</table>
</div>
<h3>Raw upload settings</h3>
<div class="table-scroll">
<table>
<thead>
<tr>
<th>Setting</th>
<th>What it does</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>RepositoryUrl</code></td>
<td>Canonical package-level raw upload base URL.</td>
<td>Use this when you only need one default upload target.</td>
</tr>
<tr>
<td><code>RawRepositoryUrl</code></td>
<td>Legacy compatibility alias.</td>
<td>If present, it still maps into <code>RepositoryUrl</code> when the canonical setting is
missing.
</td>
</tr>
<tr>
<td><code>UploadPath</code></td>
<td>Optional extra path segment appended before the file name during upload.</td>
<td>Useful for folder-style raw repositories such as <code>stable/latest</code> or <code>preview</code>.
</td>
</tr>
<tr>
<td><code>Headers</code></td>
<td>Generic additional HTTP headers.</td>
<td>Merged with repository-specific headers and dynamic parameter headers when you invoke
upload.
</td>
</tr>
<tr>
<td><code>Auth.HeaderName</code></td>
<td>Name of the authentication header to emit.</td>
<td>Examples: <code>Authorization</code>, <code>X-Api-Key</code>.</td>
</tr>
<tr>
<td><code>Auth.Scheme</code></td>
<td>Optional scheme prefix for the auth header value.</td>
<td>Examples: <code>Bearer</code>, <code>Basic</code>.</td>
</tr>
<tr>
<td><code>Auth.Token</code></td>
<td>Literal token value.</td>
<td>Good for local testing only. Prefer environment variables for real secrets.</td>
</tr>
<tr>
<td><code>Auth.TokenEnvironmentVariable</code></td>
<td>Name of the environment variable that stores the token value.</td>
<td>This should be the variable name, not the secret itself.</td>
</tr>
<tr>
<td><code>Repositories</code></td>
<td>Named upload targets with optional overrides.</td>
<td>Each repository needs <code>Name</code> and <code>Url</code>, then can add <code>UploadPath</code>,
<code>Headers</code>, and <code>Auth</code>.
</td>
</tr>
</tbody>
</table>
</div>
<p>Nova resolves raw-upload settings in a fixed order so CI/CD overrides stay predictable. Command
arguments such as <code>-Url</code> / <code>--url</code> and <code>-UploadPath</code> /
<code>--upload-path</code> win first, then the selected <code>Package.Repositories[]</code> entry,
then package-level defaults such as <code>Package.RepositoryUrl</code>,
<code>Package.RawRepositoryUrl</code>, and <code>Package.UploadPath</code>.</p>
<p>Secrets follow a matching precedence model. An explicit token value wins first, then an explicit
token-environment-variable name, then the merged repository/package
<code>Auth.TokenEnvironmentVariable</code>, and finally the merged literal
<code>Auth.Token</code>. Prefer environment-variable indirection for real credentials.</p>
<h3>Authentication examples</h3>
<pre><code>{
"Package": {
"RepositoryUrl": "https://packages.example/raw/",
"Auth": {
"HeaderName": "Authorization",
"Scheme": "Bearer",
"TokenEnvironmentVariable": "NOVA_PACKAGE_TOKEN"
}
}
}</code></pre>
<p>Use this for bearer-token-style endpoints.</p>
<pre><code>{
"Package": {
"Repositories": [
{
"Name": "RawRepo",
"Url": "https://packages.example/raw/",
"Auth": {
"HeaderName": "X-Api-Key",
"TokenEnvironmentVariable": "NOVA_PACKAGE_API_KEY"
}
}
]
}
}</code></pre>
<p>Use this for custom API-key headers.</p>
<pre><code>{
"Package": {
"Repositories": [
{
"Name": "LocalNexus",
"Url": "http://localhost:8081/repository/raw/modules/",
"Auth": {
"HeaderName": "Authorization",
"Scheme": "Basic",
"TokenEnvironmentVariable": "NOVA_NEXUS_BASIC_AUTH"
}
}
]
}
}</code></pre>
<p>Use this generic model for Basic auth when the endpoint expects a pre-encoded token value. In that
case, the environment variable should hold the Base64 value for <code>username:password</code>, not
the raw username or password.</p>
</section>
<section class="content-section" id="pester">
<h2><code>Pester</code> settings</h2>
<p>NovaModuleTools passes your <code>Pester</code> settings into the test run configuration used by
<code>Test-NovaBuild</code>.</p>
<div class="table-scroll">
<table>
<thead>
<tr>
<th>Setting</th>
<th>Current usage</th>
<th>Default/Example</th>
<th>Where you see it</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>Pester.TestResult.Enabled</code></td>
<td>Controls whether test results are configured for output.</td>
<td><code>true</code> in the project template and packaged example</td>
<td>Influences the generated test result artifact behavior.</td>
</tr>
<tr>
<td><code>Pester.TestResult.OutputFormat</code></td>
<td>Passed through by the current project template and examples.</td>
<td><code>NUnitXml</code></td>
<td>Determines the result format written to <code>artifacts/TestResults.xml</code>.</td>
</tr>
<tr>
<td><code>Pester.Output.Verbosity</code></td>
<td>Controls Pester console verbosity.</td>
<td><code>Detailed</code> in the current project template</td>
<td>Affects what you see during <code>Test-NovaBuild</code> and <code>% nova test</code>.
</td>
</tr>
</tbody>
</table>
</div>
<p class="tiny-note">At runtime, <code>Test-NovaBuild</code> also lets you override verbosity and render
mode temporarily with <code>-OutputVerbosity</code> and <code>-OutputRenderMode</code>.</p>
</section>
<section class="content-section" id="recipes">
<h2>Common recipes</h2>
<h3>Minimal module project</h3>
<pre><code>{
"ProjectName": "MyModule",
"Description": "My module",
"Version": "0.1.0",
"Manifest": {
"Author": "You",
"PowerShellHostVersion": "7.4",
"GUID": "00000000-0000-0000-0000-000000000000"
}
}</code></pre>
<p>Use this when you want the smallest workable Nova project with default build, test, and packaging
behavior.</p>
<h3>Create both NuGet and Zip artifacts, plus latest aliases</h3>
<pre><code>{
"Package": {
"Types": ["NuGet", "Zip"],
"Latest": "stable",
"OutputDirectory": {
"Path": "artifacts/packages",
"Clean": true
}
}
}</code></pre>
<p>This creates four files for stable versions when both package types are selected: versioned and
<code>latest</code> variants for each format.</p>
<h3>Use named raw repositories with shared defaults</h3>
<pre><code>{
"Package": {
"RepositoryUrl": "https://packages.example/raw/default/",
"Headers": {
"X-Client": "my-module"
},
"Auth": {
"HeaderName": "Authorization",
"Scheme": "Bearer",
"TokenEnvironmentVariable": "NOVA_PACKAGE_TOKEN"
},
"Repositories": [
{
"Name": "Stable",
"Url": "https://packages.example/raw/stable/"
},
{
"Name": "Preview",
"Url": "https://packages.example/raw/preview/",
"UploadPath": "nightly"
}
]
}
}</code></pre>
<p>Use package-level values for the shared default behavior, then override only the repository-specific
parts that need to change. Repository-specific <code>Headers</code>, <code>Auth</code>, and
<code>UploadPath</code> override package defaults only for the selected named target.</p>
</section>
</div>
</section>
</main>
<footer class="footer">
<div class="footer__inner">
<h2>Ready to apply these settings?</h2>
<p>Use the packaged example when you want a live project that demonstrates the current configuration surface, or
move to the delivery guides when you are ready to package and publish.</p>
<div class="hero__actions">
<a class="button button--primary" href="./working-with-modules.html">Open the example project guide</a>
<a class="button button--secondary" href="./packaging-and-delivery.html">Open packaging and delivery
workflows</a>
</div>
<p class="footer__legal">Also available: <a class="legal-link" href="./commands.html">Command Reference</a>, <a
class="legal-link" href="./release-notes.html">Release Notes</a>, and the <a class="legal-link"
href="./license.html">MIT
License</a>.</p>
</div>
</footer>
</body>
</html>