# path to a directory with all packages
storage: ../tmp/local-registry/storage
auth:
  htpasswd:
    file: ./htpasswd

# a list of other known repositories we can talk to
uplinks:
  npmjs:
    url: https://registry.npmjs.org/
    max_fails: 30
    fail_timeout: 10m
    timeout: 60s
    cache: false
    maxage: 30m
    agent_options:
      keepAlive: true
      maxSockets: 40
      maxFreeSockets: 10
  yarn:
    url: https://registry.yarnpkg.com
    max_fails: 30
    fail_timeout: 10m
    timeout: 60s
    cache: false
    maxage: 30m
    agent_options:
      keepAlive: true
      maxSockets: 40
      maxFreeSockets: 10

packages:
  '@*/*':
    # scoped packages
    access: $all
    publish: $all
    unpublish: $all
    proxy: yarn

  '**':
    # allow all users (including non-authenticated users) to read and
    # publish all packages
    access: $all

    # allow all users (including non-authenticated users) to publish/publish packages
    publish: $all
    unpublish: $all

    # if package is not available locally, proxy requests to 'npmjs' registry
    proxy: yarn

# log settings
logs:
  # Change level to http to get more verbose output when working locally if needed
  - { type: stdout, format: pretty, level: warn }
