Repository managers, such as Nexus or JFrog Artifactory, provide a central location for all software artifacts required for development. A repository manager allows an IT organization to completely access control to, and deployment of, every artifact in your organization from a single location.
It's possible to use a repository manager to cache Ionic Enterprise packages.
Does this violate the terms of my license?
No, there are no license issues or violations in caching Ionic Enterprise packages.
Proxy Repository URL
When creating a Proxy Repository for Ionic Enterprise packages, you'll need to construct the URL using the following pieces of information available from the Ionic Dashboard:
The Organization Slug refers to Ionic's internal name of an organization. This information is available within the URL of the dashboard. To obtain the Organization Slug:
- Navigate to the landing page of the organization.
- Extract the portion of the URL in between
For instance, the Organization Slug of https://dashboard.ionicframework.com/org/ionic/hub is
ionic. For the purpose of this guide, we will use the sample Organization Slug
ionic in examples going forward.
Native Plugins Key
The Native Plugin Key can be found in the Native Plugin Keys page of the Ionic Dashboard, located in the side menu.
For the purpose of this guide, we will use the sample key
key_xxx in examples going forward.
Constructing the URL
Once both are obtained, the URL can be constructed using basic authentication:
- Username: The organization slug
- Password: The native plugin key
- URL: https://registry.ionicframework.com
Using the sample values above, our constructed Proxy Repository URL will be
Example Project .npmrc Entry
You may have an
.npmrc file in the root of your project's folder. This file contains information on the private
@ionic-enterprise scope along with any additional project-specific NPM configuration required.
The portion of the
.npmrc file containing information for the
@ionic-enterprise scope should look like so:
Example Scoped Registry in Modern Yarn
If you are using Yarn (v2 or v3) instead of npm you may have a
.yarnrc.yml file in the root of your project's folder. This file contains information on the private
ionic-enterprise scope along with any additional project-specific NPM configuration required.
The portion of the
.yarnrc.yml file containing information for the
ionic-enterprise scope should look like so:
Using a Repository Manager with Yarn 1.x
Yarn 1.x when used in combination with a repository manager like Artifactory requires some specific settings in .npmrc:
- We use _auth rather than _authToken. This is because our token we supply is a base64 encoded version of the username and api key in the form username:apikey
- We use the setting always-auth=true . This prevents 401 unauthorized errors which are caused by yarn 1.x. Note: npm does not have this problem.