Avm.Authoring.psd1

@{
    RootModule           = 'Avm.Authoring.psm1'
    ModuleVersion        = '0.1.8'
    GUID                 = '356c238f-88dd-48bf-ad0a-b7de6a5bb877'
    Author               = 'Azure Verified Modules'
    CompanyName          = 'Microsoft'
    Copyright            = '(c) Microsoft Corporation. All rights reserved.'
    Description          = 'Cross-platform PowerShell 7 CLI that consolidates the authoring and CI tooling for Azure Verified Modules (https://aka.ms/avm). A single avm command (alias: avm) works across both ecosystems and ships: environment diagnostics (avm version, avm doctor); a checksum-pinned managed-tool resolver (avm tool list/which/install) that downloads and verifies the exact terraform, terraform-docs, tflint, conftest and mapotf binaries a module needs; and a fully wired Terraform authoring chain - avm pre-commit fixes and checks a module locally (convention checks, HCL transforms via mapotf, terraform fmt and terraform-docs) while avm pr-check adds tflint, APRL/AVMSEC policy checks and terraform validate. No Docker, make or porch required. The Bicep facade is in active development. Requires PowerShell 7.4+ (Core). See https://github.com/Azure/azure-verified-modules-tools for status and docs.'
    PowerShellVersion    = '7.4'
    CompatiblePSEditions = @('Core')
    FunctionsToExport    = @(
        'Get-AvmAuthoringPlaceholder',
        'Get-AvmModuleContext',
        'Get-AvmTool',
        'Get-AvmVersion',
        'Install-AvmTool',
        'Invoke-Avm',
        'Invoke-AvmCheckConvention',
        'Invoke-AvmCheckPolicy',
        'Invoke-AvmDoctor',
        'Invoke-AvmDocs',
        'Invoke-AvmFormat',
        'Invoke-AvmLint',
        'Invoke-AvmPrCheck',
        'Invoke-AvmPreCommit',
        'Invoke-AvmSync',
        'Invoke-AvmTest',
        'Invoke-AvmTestE2e',
        'Invoke-AvmTestIntegration',
        'Invoke-AvmTestUnit',
        'Invoke-AvmTransform'
    )
    CmdletsToExport      = @()
    VariablesToExport    = @()
    AliasesToExport      = @('avm')
    PrivateData          = @{
        PSData = @{
            Tags         = @('Azure', 'AVM', 'AzureVerifiedModules', 'Bicep', 'Terraform', 'Authoring', 'CLI', 'PSEdition_Core')
            LicenseUri   = 'https://github.com/Azure/azure-verified-modules-tools/blob/main/LICENSE'
            ProjectUri   = 'https://github.com/Azure/azure-verified-modules-tools'
            ReleaseNotes = @'
Log-fidelity round from post-release failure-path testing of `0.1.7` against the
canary repo `Azure/terraform-azurerm-avm-ptn-example-repo` (F57, F58). Both
defects were found by deliberately injecting ordinary mistakes — a typo in a
`.tf` file, and format drift alongside a broken test — and reading what the
tooling actually reported.

### Fixed

- **Tool failures now report what the tool said.** `Invoke-AvmProcess` built its
  exception message from the exit code and the command line alone, so a
  malformed `.tf` file produced `Process exited with code 2: terraform.exe fmt
  ...` and nothing else. The stderr was captured and attached to the exception
  the whole time, but the only code that rendered it was gated on narration, and
  `terraform fmt` does not narrate. The message now carries the tool's own
  diagnostic — file, line and reason — bounded to 20 lines / 2000 characters.
  This affects every managed tool: terraform, tflint, terraform-docs, conftest
  and mapotf. (F57)
- **The single GitHub Actions annotation now names the most severe failure, not
  the first one.** `pr-check` emits one annotation per run (deliberately, so the
  Files-changed view is not buried). It was selected by step order, so a run with
  both `terraform_variable_separate` lint nits and four broken unit tests
  annotated the nit and left twelve `error` diagnostics unannotated. Selection is
  now severity-ranked. Within a step, position still wins so the F24b headline
  behaviour is unchanged; across steps, severity wins so a real error outranks a
  positioned style nit. (F58)

  A second defect surfaced in the same measurement: within the lint step the
  first positioned issue was chosen, which is an `info` finding — but lint gates
  on `warning`, so the annotation named a cause that could not have failed the
  step. Equal-precision issues are now tie-broken on severity.
'@

        }
    }
}