DscResource.DocGenerator.psd1

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
@{
    # Script module or binary module file associated with this manifest.
    RootModule        = 'DscResource.DocGenerator.psm1'

    # Version number of this module.
    ModuleVersion     = '0.9.0'

    GUID              = 'fa8b017d-8e6e-414d-9ab7-c8ab9cb9e9a4'

    # Author of this module
    Author            = 'DSC Community'

    # Company or vendor of this module
    CompanyName       = 'DSC Community'

    # Copyright statement for this module
    Copyright         = '(c) DSC Community contributors.'

    # Description of the functionality provided by this module
    Description       = 'Functionality to help generate documentation for modules.'

    # Minimum version of the Windows PowerShell engine required by this module
    PowerShellVersion = '5.0'

    # RequiredModules = @('Sampler') # The Sampler Pack task does not support recursive pack yet.

    <#
        Functions to export from this module, for best performance, do not use
        wildcards and do not delete the entry, use an empty array if there are
        no functions to export.
 
        This will be automatically update by the build pipeline.
    #>

    FunctionsToExport = @('Invoke-Git','New-DscResourcePowerShellHelp','New-DscResourceWikiPage','Publish-WikiContent','Set-WikiModuleVersion','Split-ModuleVersion')

    <#
        Cmdlets to export from this module, for best performance, do not use
        wildcards and do not delete the entry, use an empty array if there are
        no cmdlets to export.
    #>

    CmdletsToExport   = @()

    # Variables to export from this module
    VariablesToExport = @()

    <#
        Aliases to export from this module, for best performance, do not use
        wildcards and do not delete the entry, use an empty array if there are
        no aliases to export.
 
        This must be set to the aliases to export since there is no way to tell
        the module builder (build pipeline) which aliases to add.
    #>

    AliasesToExport   = @(
        'Task.Generate_Conceptual_Help',
        'Task.Generate_Wiki_Content',
        'Task.Publish_GitHub_Wiki_Content'
    )

    # DSC resources to export from this module
    DscResourcesToExport = @()

    <#
        Private data to pass to the module specified in RootModule/ModuleToProcess.
        This may also contain a PSData hashtable with additional module metadata
        used by PowerShell.
    #>

    PrivateData       = @{
        PSData = @{
            # Tags applied to this module. These help with module discovery in online galleries.
            Tags         = @('DSC', 'Modules', 'documentation')

            # A URL to the license for this module.
            LicenseUri   = 'https://github.com/dsccommunity/DscResource.DocGenerator/blob/main/LICENSE'

            # A URL to the main website for this project.
            ProjectUri   = 'https://github.com/dsccommunity/DscResource.DocGenerator'

            # ReleaseNotes of this module
            ReleaseNotes = '## [0.9.0-preview0011] - 2021-07-08
 
### Added
 
- Added private functions:
  - `Get-ClassAst` - Returns the AST for a single or all classes.
  - `Get-ClassResourceAst` - Returns the AST for a single or all DSC class
    resources.
  - `Get-ClassResourceProperty` - Returns DSC class resource properties
    from the provided class or classes.
  - `Format-Text` - Format a string according to predefined options.
  - `Get-TemporaryPath` - returns the appropriate temp path for the OS.
  - `Get-ConfigurationAst` - Returns the AST for a single or all configurations.
  - `Get-CompositeSchemaObject` - Returns an object containing the parameters
    and other properties related to a composite resource. The object that is
    returned is different format to a MOF or class-based object and the property
    names are aligned to a configuration parameter block rather than MOF.
  - `Get-CompositeResourceParameterState` - Determines the parameter state of a
    composite resource parameter. This is a meta attribute that will either be
    `Required` or `Write`.
  - `Get-CompositeResourceParameterValidateSet` - Returns the array of values
    contained in the ValidateSet parameter attributes if it exists.
- Added QA test to do some quality checks on the module code and change log.
 
### Changed
 
- `New-DscResourceWikiPage`
  - If a class-based resource has a parent class that contains DSC resource
    properties they will now also be returned as part of the DSC resource
    parameters ([issue #62](https://github.com/dsccommunity/DscResource.DocGenerator/issues/62)).
  - Refactored to split into two private functions `New-DscMofResourceWikiPage` and
    `New-DscClassResourceWikiPage`.
- `Get-MofSchemaObject`
  - Refactored to reduce code duplication when adding functions for supporting
    composite resources.
- `Get-ClassResourceCommentBasedHelp`
  - Renamed this function to `Get-CommentBasedHelp` so that it made sense to
    use with composite DSC resources.
  - Enabled the function to extract the comment block if it is not at the top
    of the script file to support composite resources.
- Updated code to pass newly added quality checks.
- `Invoke-Git`
  - Converted to public function.
  - Updated to use `System.Diagnostics.Process` for improved error handling.
  - Returns object, allowing caller to process result.
  - `git` commands no longer use `--quiet` to populate returned object.
 
### Fixed
 
- `Publish_GitHub_Wiki_Content`
  - Output message if `$GitHubToken` not specified which skips this task.
    Fixes [Issue 75](https://github.com/dsccommunity/DscResource.DocGenerator/issues/75)
  - Change working folder for the call to `git` with the argument `remote`.
  - Added optional debug configuration option in `build.yml`.
- `Invoke-Git`
  - Set `$TimeOut` to Milliseconds
    Fixes [Issue 84](https://github.com/dsccommunity/DscResource.DocGenerator/issues/84)
  - Calls `git` so it works on both Windows and Linux.
  - Output properties in return value if called with the `Debug` optional
    common parameter.
- `Publish-WikiContent`
  - Remove a unnecessary `Set-Location` so it is possible to remove the
    temporary folder.
  - Fix code style in tests.
  - Moved verbose statement so it is only outputted in the right context.
 
'


            # Prerelease string of this module
            Prerelease = 'preview0011'
        } # End of PSData hashtable
    } # End of PrivateData hashtable
}