github.com/hashicorp/hcl/v2@v2.20.0/cmd/hcldec/examples/npm-package/spec.hcldec (about)

     1  object {
     2    attr "name" {
     3      type     = string
     4      required = true
     5    }
     6    attr "version" {
     7      type     = string
     8      required = true
     9    }
    10    attr "description" {
    11      type = string
    12    }
    13    attr "keywords" {
    14      type = list(string)
    15    }
    16    attr "homepage" {
    17      # "homepage_url" in input file is translated to "homepage" in output
    18      name = "homepage_url"
    19    }
    20    block "bugs" {
    21      object {
    22        attr "url" {
    23          type = string
    24        }
    25        attr "email" {
    26          type = string
    27        }
    28      }
    29    }
    30    attr "license" {
    31      type = string
    32    }
    33    block "author" {
    34      object {
    35        attr "name" {
    36          type = string
    37        }
    38        attr "email" {
    39          type = string
    40        }
    41        attr "url" {
    42          type = string
    43        }
    44      }
    45    }
    46    block_list "contributors" {
    47      block_type = "contributor"
    48      object {
    49        attr "name" {
    50          type = string
    51        }
    52        attr "email" {
    53          type = string
    54        }
    55        attr "url" {
    56          type = string
    57        }
    58      }
    59    }
    60    attr "files" {
    61      type = list(string)
    62    }
    63    attr "main" {
    64      type = string
    65    }
    66    attr "bin" {
    67      type = map(string)
    68    }
    69    attr "man" {
    70      type = list(string)
    71    }
    72    attr "directories" {
    73      type = map(string)
    74    }
    75    block "repository" {
    76      object {
    77        attr "type" {
    78          type     = string
    79          required = true
    80        }
    81        attr "url" {
    82          type     = string
    83          required = true
    84        }
    85      }
    86    }
    87    attr "scripts" {
    88      type = map(string)
    89    }
    90    attr "config" {
    91      type = map(string)
    92    }
    93    attr "dependencies" {
    94      type = map(string)
    95    }
    96    attr "devDependencies" {
    97      name = "dev_dependencies"
    98      type = map(string)
    99    }
   100    attr "peerDependencies" {
   101      name = "peer_dependencies"
   102      type = map(string)
   103    }
   104    attr "bundledDependencies" {
   105      name = "bundled_dependencies"
   106      type = map(string)
   107    }
   108    attr "optionalDependencies" {
   109      name = "optional_dependencies"
   110      type = map(string)
   111    }
   112    attr "engines" {
   113      type = map(string)
   114    }
   115    attr "os" {
   116      type = list(string)
   117    }
   118    attr "cpu" {
   119      type = list(string)
   120    }
   121    attr "prefer_global" {
   122      type = bool
   123    }
   124    default "private" {
   125      attr {
   126        name = "private"
   127        type = bool
   128      }
   129      literal {
   130        value = false
   131      }
   132    }
   133    attr "publishConfig" {
   134      type = map(any)
   135    }
   136  }