# Taken from https://github.com/babel/babel/blob/624c78d99e8f42b2543b8943ab1b62bd71cf12d8/scripts/integration-tests/verdaccio-config.yml

#
# This is the default config file. It allows all users to do anything,
# so don't use it on production systems.
#
# Look here for more config file examples:
# https://github.com/verdaccio/verdaccio/tree/master/conf
#

# path to a directory with all packages
storage: /verdaccio/storage/data

# https://verdaccio.org/docs/configuration#authentication
auth:
  htpasswd:
    file: /verdaccio/storage/htpasswd

# https://verdaccio.org/docs/configuration#uplinks
# a list of other known repositories we can talk to
uplinks:
  npmjs:
    url: https://registry.npmjs.org/

# Learn how to protect your packages
# https://verdaccio.org/docs/protect-your-dependencies/
# https://verdaccio.org/docs/configuration#packages
packages:
  # To not use a proxy (e.g. npm) but instead use verdaccio for package hosting we need to define rules here without the
  # `proxy` field. Sadly we can't use a wildcard like "@sentry/*" because we have some dependencies (@sentry/cli,
  # @sentry/webpack-plugin) that fall under that wildcard but don't live in this repository. If we were to use that
  # wildcard, we would get a 404 when attempting to install them, since they weren't uploaded to verdaccio, and also
  # don't have a proxy configuration.

  '@sentry/angular':
    access: $all
    publish: $all
    unpublish: $all
    # proxy: npmjs # Don't proxy for E2E tests!

  '@sentry/angular-ivy':
    access: $all
    publish: $all
    unpublish: $all
    # proxy: npmjs # Don't proxy for E2E tests!

  '@sentry/astro':
    access: $all
    publish: $all
    unpublish: $all
    # proxy: npmjs # Don't proxy for E2E tests!

  '@sentry/browser':
    access: $all
    publish: $all
    unpublish: $all
    # proxy: npmjs # Don't proxy for E2E tests!

  '@sentry/bun':
    access: $all
    publish: $all
    unpublish: $all
    # proxy: npmjs # Don't proxy for E2E tests!

  '@sentry/core':
    access: $all
    publish: $all
    unpublish: $all
    # proxy: npmjs # Don't proxy for E2E tests!

  '@sentry/deno':
    access: $all
    publish: $all
    unpublish: $all
    # proxy: npmjs # Don't proxy for E2E tests!

  '@sentry/ember':
    access: $all
    publish: $all
    unpublish: $all
    # proxy: npmjs # Don't proxy for E2E tests!

  '@sentry/gatsby':
    access: $all
    publish: $all
    unpublish: $all
    # proxy: npmjs # Don't proxy for E2E tests!

  '@sentry/hub':
    access: $all
    publish: $all
    unpublish: $all
    # proxy: npmjs # Don't proxy for E2E tests!

  '@sentry/integrations':
    access: $all
    publish: $all
    unpublish: $all
    # proxy: npmjs # Don't proxy for E2E tests!

  '@sentry/nextjs':
    access: $all
    publish: $all
    unpublish: $all
    # proxy: npmjs # Don't proxy for E2E tests!

  '@sentry/node':
    access: $all
    publish: $all
    unpublish: $all
    # proxy: npmjs # Don't proxy for E2E tests!

  '@sentry/node-experimental':
    access: $all
    publish: $all
    unpublish: $all
    # proxy: npmjs # Don't proxy for E2E tests!

  '@sentry/opentelemetry-node':
    access: $all
    publish: $all
    unpublish: $all
    # proxy: npmjs # Don't proxy for E2E tests!

  '@sentry/opentelemetry':
    access: $all
    publish: $all
    unpublish: $all
    # proxy: npmjs # Don't proxy for E2E tests!

  '@sentry/react':
    access: $all
    publish: $all
    unpublish: $all
    # proxy: npmjs # Don't proxy for E2E tests!

  '@sentry/remix':
    access: $all
    publish: $all
    unpublish: $all
    # proxy: npmjs # Don't proxy for E2E tests!

  '@sentry/replay':
    access: $all
    publish: $all
    unpublish: $all
    # proxy: npmjs # Don't proxy for E2E tests!

  '@sentry/serverless':
    access: $all
    publish: $all
    unpublish: $all
    # proxy: npmjs # Don't proxy for E2E tests!

  '@sentry/svelte':
    access: $all
    publish: $all
    unpublish: $all
    # proxy: npmjs # Don't proxy for E2E tests!

  '@sentry/sveltekit':
    access: $all
    publish: $all
    unpublish: $all
    # proxy: npmjs # Don't proxy for E2E tests!

  '@sentry/tracing':
    access: $all
    publish: $all
    unpublish: $all
    # proxy: npmjs # Don't proxy for E2E tests!

  '@sentry/types':
    access: $all
    publish: $all
    unpublish: $all
    # proxy: npmjs # Don't proxy for E2E tests!

  '@sentry/utils':
    access: $all
    publish: $all
    unpublish: $all
    # proxy: npmjs # Don't proxy for E2E tests!

  '@sentry/vercel-edge':
    access: $all
    publish: $all
    unpublish: $all
    # proxy: npmjs # Don't proxy for E2E tests!

  '@sentry/vue':
    access: $all
    publish: $all
    unpublish: $all
    # proxy: npmjs # Don't proxy for E2E tests!

  '@sentry/wasm':
    access: $all
    publish: $all
    unpublish: $all
    # proxy: npmjs # Don't proxy for E2E tests!

  '@sentry-internal/*':
    access: $all
    publish: $all
    unpublish: $all
    # proxy: npmjs # Don't proxy for E2E tests!

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

  '**':
    # allow all users (including non-authenticated users) to read and
    # publish all packages
    #
    # you can specify usernames/groupnames (depending on your auth plugin)
    # and three keywords: "$all", "$anonymous", "$authenticated"
    access: $all

    # allow all known users to publish/publish packages
    # (anyone can register by default, remember?)
    publish: $all
    unpublish: $all
    proxy: npmjs

# https://verdaccio.org/docs/configuration#server
# You can specify HTTP/1.1 server keep alive timeout in seconds for incoming connections.
# A value of 0 makes the http server behave similarly to Node.js versions prior to 8.0.0, which did not have a keep-alive timeout.
# WORKAROUND: Through given configuration you can workaround following issue https://github.com/verdaccio/verdaccio/issues/301. Set to 0 in case 60 is not enough.
server:
  keepAliveTimeout: 60

middlewares:
  audit:
    enabled: false

# https://verdaccio.org/docs/logger
# log settings
log: { type: stdout, format: pretty, level: http }
#experiments:
#  # support for npm token command
#  token: false
