All Projects → mob-sakai → unity.package-manager.metadata

mob-sakai / unity.package-manager.metadata

Licence: MIT license
Contains metadata used by the com.unity.package-manager package to fulfill client requests

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to unity.package-manager.metadata

unity
Unity SDK UPM package
Stars: ✭ 25 (+4.17%)
Mutual labels:  upm
android-things-samples
Samples and projects for platforms running Android Things
Stars: ✭ 23 (-4.17%)
Mutual labels:  upm
unity-rich-text
🌈 Forget about rich text tags pain
Stars: ✭ 14 (-41.67%)
Mutual labels:  upm
Hairibar.Ragdoll
A package for animating ragdolls through keyframed animations.
Stars: ✭ 66 (+175%)
Mutual labels:  upm
betca-spring
BETCA (Spring). Back-end con Tecnologías de Código Abierto, versión Java-Spring
Stars: ✭ 27 (+12.5%)
Mutual labels:  upm
bgTools-playerPrefsEditor
Tool extension for the Unity Editor that enables easy access to the player preferences over a simple UI.
Stars: ✭ 70 (+191.67%)
Mutual labels:  upm
Portada-UPM-ETSIINF
Portada para Trabajo de Fin de Grado para la UPM ETSIINF
Stars: ✭ 23 (-4.17%)
Mutual labels:  upm
Newtonsoft.Json-for-Unity.Converters
Converters of common Unity types for Newtonsoft.Json. Goes hand in hand with jilleJr/Newtonsoft.Json-for-Unity
Stars: ✭ 147 (+512.5%)
Mutual labels:  upm
com.xrtk.oculus
The Oculus platform components for the XRTK
Stars: ✭ 11 (-54.17%)
Mutual labels:  upm
oyster-package-generator
Oyster is a package generator for Unity Package Manager (UPM). It generates a best standards Unity package with automated deployments via CLI. Focus on coding your package instead of deployments, changelogs, ect.
Stars: ✭ 18 (-25%)
Mutual labels:  upm
BakingSheet
Easy datasheet management for C# and Unity. Supports Excel, Google Sheet, JSON and CSV format.
Stars: ✭ 144 (+500%)
Mutual labels:  upm
apaw
APAW. Arquitectura y Patrones Web. Máster en Ingeniería Web
Stars: ✭ 46 (+91.67%)
Mutual labels:  upm
unity-now
▲ Vercel Now plugin for Unity. Deploy WebGL builds with ease
Stars: ✭ 21 (-12.5%)
Mutual labels:  upm
CSharpCompilerSettingsForUnity
Change the C# compiler (csc) used on your Unity project, as you like!
Stars: ✭ 208 (+766.67%)
Mutual labels:  upm
UnitySceneSwitcher
Editor extension for quick scene switching.
Stars: ✭ 38 (+58.33%)
Mutual labels:  upm

Unity Package Manager (UPM) Metadata

This package is used to store metadata about other Unity packages.
It is used by the Package Manager server to fulfill client requests.




Description

Scoped package registry

In Unity 2018.3, UPM supported scoped package registry.
A scoped registry allows you to use a registry in addition to the Unity default registry where you can host your own packages.

In addition, you can use 3rd-party registries such as openupm, xcrew.dev and upm-packages.dev.

However, to use a scoped registry, you must add a scopedRegistries field in Packages/manifest.json.
You also need to add a scopes field depending on the package domains.
This feels a little annoying.

{
  "scopedRegistries": [
    {
      "name": "YourPackageRegistry",
      "url": "https://your.package.registry.com",
      "scopes": [
        "com.your.package-one",
        "com.another.package-two",
        ...
      ]
    }
  ],
  "dependencies": {
    "com.your.package-one": "1.0.0",
    "com.another.package-two": "2.0.0",
    ...
  }
}

A Metadata Package for UPM

The UPM system searches the packages based on a metadata package com.unity.package-manager.metadata.
The package contains a list of all packages searchable in the UI.
See searchablePackages field.

What are the benefits?

If you use verdaccio for package registry, this repository will benefit you.

  • You can access all packages in your package registry.
    • Of course, the official package is also included.
  • Search, install, update, and remove packages in your package registry from the Package Manager UI without any editor extensions.
  • The scopedRegistories field in manifest.json is no longer needed.
    • Instead, use the registry field (supported in Unity 2017.x or later.)
    • Just edit as below:
{
  "registry": "https://your.package.registry.com",
  "dependencies": {
    "com.your.package-one": "1.0.0",
    "com.another.package-two": "2.0.0",
    ...
  }
}




System Requirement

This repository works on GitHub Actions.

If you update locally, request the following:

  • bash
  • node 10.18 or later
  • jq




Usage

  1. Configure your verdaccio according to Verdaccio Configuration.
  2. Fork this repository and clone it.
  3. Change publishConfig.registry field in package.json to the URL of your package registry.
"publishConfig": {
  "registry": "https://your.package.registry.com"
},
  1. You can schedule the workflow to check the official package registry to run at specific UTC times using POSIX cron syntax.
    Edit .github/workflows/update.yml as following to change the schedule:
on:
  schedule:
    # check the official package registry daily.
    - cron: "* 0 * * *"
  1. The workflow will push updates to the repository.
    See Creating secrets in GitHub and add GH_TOKEN secret on GitHub.

  2. (Optional) To publish this package to your package registry, follow these steps:

    1. add NPM_TOKEN secret on GitHub. For details, see Creating secrets in GitHub.
    2. Edit .releaserc as follows:
{
  "plugins": [
    [
      "@semantic-release/npm",
      {
        "npmPublish": true
      }
    ],
    ...
  ]
}
  1. (Optional) Update searchable packages manually




Verdaccio Configuration

Verdaccio has a feature called uplinks.
Packages that do not exist in your package registry can be found from an proxy registry.
For example, the com.unity.* packages will be found from Unity official package registry.

In addition, multiple proxies can be configured using uplinks.

Edit the verdaccio configuration file config.yml as follows:

uplinks:
  # the official package registry
  unity:
    url: https://packages.unity.com

  # the third party package registry (e.g. openupm)
  third_party:
    url: https://packages.third.party.com

packages:
  # the metadata package should be found in your package registry
  "com.unity.package-manager.metadata":
    access: $all
    publish: $authenticated

  # unity official packages should be found in official package registry
  "com.unity.*":
    access: $all
    proxy: unity

  # other packages
  "**":
    access: $all
    publish: $authenticated
    unpublish: $authenticated

    # if package is not available locally, proxy requests to other registries
    proxy:
      - third_party
      - unity

# notify to GitHub Actions on published a new package
notify:
  method: POST
  headers:
    [
      { "Content-Type": "application/json" },
      { "Accept": "application/vnd.github.v3+json" },
      { "User-Agent": "verdaccio" },
      { "Authorization": "token {GITHUB_TOKEN}" },
    ]
  endpoint: "https://api.github.com/repos/{OWNER}/unity.package-manager.metadata/dispatches"
  content: '{ "event_type":"package_published", "client_payload": {"name": "{{ name }}" } }'
  • NOTE: (2020/02/21) Verdaccio v4.4.2 does not support environment variables in config.yml.
    Please correct {OWNER} and {GITHUB_TOKEN} to the correct values.

  • NOTE: (2020/02/21) DO NOT use OpenUPM as a uplink registry.
    For details, see openupm/openupm#68.




Creating secrets in GitHub

  • On GitHub, navigate to the main page of the repository.
  • Under your repository name, click Settings.
  • In the left sidebar, click Secrets.
  • Type a name for your secret in the Name input box.
  • Type the value for your secret.
  • Click Add secret.
Variable Description
GH_TOKEN Required. The token created via GitHub personal access token.
NPM_TOKEN Npm token created via npm token create




Update Searchable Packages Manually

If you do not need GitHub Actions, you can remove .github/workflows/update.yml.
To update searchable packages manually, execute the following commands:

export GH_TOKEM=*********
export NPM_TOKEM=********* # optional
npm ci
npm run update -- --no-ci

NOTE: Execute these commands each time a new package is added to your package registry.




Development Notes




Support

This is an open-source project that I am developing in my free time.
If you like it, you can support me.
By supporting, you let me spend more time working on better tools that you can use for free. :)

become_a_patron_on_patreon
become_a_sponsor_on_github




License

  • MIT

Author

mob-sakai

See Also

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].