Types/OpenPackage/get_Creator.ps1

<#
.SYNOPSIS
    Gets OpenPackage `Creator`
.DESCRIPTION
    Gets the OpenPackage `Creator` property.
.LINK
    https://learn.microsoft.com/en-us/dotnet/api/system.io.packaging.packageproperties.creator?wt.mc_id=MVP_321542
#>

param()

if ($this.PackageProperties.Creator) {
    return $this.PackageProperties.Creator
}

$moduleManifest = @($this.PowerShellManifest)[0]
if ($moduleManifest) {
    $this.PackageProperties.Creator = $moduleManifest.Author
    return $this.PackageProperties.Creator
}

$packageJson = @($this.'Package.json')[0]
if ($packageJson -and $packageJson.author) {
    $this.PackageProperties.Creator = 
        if ($packageJson.author -is [string]) {
            $packageJson.author
        } else {
            $packageJson.author | ConvertTo-Json -Depth 3
        }
    return $this.PackageProperties.Creator
}

$nuSpec = @($this.nuSpec)[0]
if ($nuSpec -and $nuSpec.package.metadata.authors) {
    $this.PackageProperties.Creator =
        $nuSpec.package.metadata.authors

    return $this.PackageProperties.Creator
}