LogoLogo
  • OnePub
  • Guides
    • Installing
      • Install CLI tools
      • Register
      • Invite a member
      • Accept an Invite
      • CLI integration
        • Manually add publish_to
        • Implicit Integration
      • IDE integration
        • Android Studio
        • Visual Studio Code
      • Pre Dart 2.15
      • Pre Dart 2.12
    • Searching
    • Watching packages
    • Publishing Packages
      • The hard way
    • Private dependencies
      • The hard way
    • CLI Tools
      • login
      • logout
      • doctor
      • export
      • import
      • pub add
      • pub private
      • pub global activate
      • pub global deactivate
    • CI/CD
    • SSH
    • Docker
    • Community Choice Awards
  • Fundamentals
    • Members
    • Teams
    • Roles
    • Naming Packages
  • Workflows
    • Distributing to Customers
      • Purchase a Customer Distribution License
      • Security considerations
      • Publish a package
      • Invite a customer
      • Customer installation instructions
      • Conditions Apply
    • For Support
    • Setting up CI/CD
    • Vendoring Dependencies
    • Switching Organisations
    • Creating a Team Leader
  • FAQ
    • Is GST/VAT/Sales Tax applicable?
    • Does OnePub.dev have access to my personal information?
    • What is your SLA?
    • How do I get support?
    • How do I use OnePub from my CI/CD environment?
    • How to invite team members to join OnePub
    • How to publish a private package
    • 401: Unauthorized
  • Solved by OnePub
  • Data Retention Policy
  • Payments
Powered by GitBook
On this page

Was this helpful?

  1. Fundamentals

Naming Packages

OnePub allows you to name your private package using a name that is already taken by a public package on pub.dev.

We however generally don't recommend this as it may cause confusion at a later stage if you need to use the same named package from pub.dev.

If you are using the OnePub tools (onepub pub private onepub pub add <dep>) then there is no issue using existing public names as every package is explicitly referenced with the OnePub URL.

PUB_HOST_URL

not recommended!

Dart supports configuring your private Package repository by setting an environment variable PUB_HOST_URL.

When you set the PUB_HOST_URL environment variable then every dart pub command will be sent via the OnePub repository.

This has a couple of consequences.

1) OnePub will see every package you depend on. Probably not a big deal, but if you are particularly sensitive about this information then it's not desirable

2) If you use any package name that is already used by a package on pub.dev then you will no longer be able to access the public package of that name. Remember that whilst your package name isn't used today someone may publish a package to pub.dev at a later date.

To avoid these types of name conflicts, we recommend that you prefix your package names with your reverse domain name.

e.g. dev.onepub.test

PreviousRolesNextDistributing to Customers

Last updated 2 years ago

Was this helpful?