search hotlink icon profile hotlink icon
Package avatar Public | 1.1.x - 1.x.x

On This Page

Hub is the logic object Fusion uses to download packages from different locations, each represented by an API abstraction in the apis wrapper:

{
    "hub": {
        "apis": {
            "<api-id>": "<api-abstraction>"
        }
    }
}
                    [
    "hub" => [
        "apis" => [
            "<api-id>" => "<api-abstraction>"
        ] 
    ]
]
                

The identifiers (<api-id>) are selectors used as the leading segment of a dependency source and map to APIs described in the following sections.

Note

If you include the following APIs in your configuration without any custom settings, you can use shorthand to map API identifiers (<api-id>) directly to their classes, instead of specifying each API with a full api entry.

Configurable Valvoid API

The Valvoid api is an abstraction for downloading packages from the default package registry.

{
    "api": "Valvoid\\Fusion\\Hub\\APIs\\Remote\\Valvoid\\Valvoid",
    "protocol": "<type>",
    "domain": "<name>",
    "tokens": "<authentication>"
}
                [
    "api" => \Valvoid\Fusion\Hub\APIs\Remote\Valvoid\Valvoid::class,
    "protocol" => "<type>",
    "domain" => "<name>",
    "tokens" => "<authentication>"
]
            

Protocol Type

By default, the protocol type is secure network communication. If the optional protocol entry is set to one of the following, the API will use that value instead:

  • https: default
  • http

Domain Name

By default, the domain name is the identifier assigned to this API in the apis configuration wrapper. If the optional domain entry is set to one of the following, the API will use it instead:

  • valvoid.com: official cloud

Note

Setting a custom instance domain is a feature for testing alternative versions of a platform. Dependency sources still select the API by its identifier in the apis wrapper. The domain only affects the network endpoint. For individual API configuration, see examples.

Tokens Authentication

By default, the API only supports unauthenticated requests. If the optional tokens entry is set with one of the following authentication values, the API will also be able to execute authenticated requests.

A common root token (AAT-ZjAxOTE0Y2...) can be used for all requests. Tokens can also be assigned to path segments for namespaced requests. For example, to authenticate requests for packages under the group valvoid:

{
    "valvoid": "AAT-N2ZhZD..."
}
                [
    "valvoid" => "AAT-N2ZhZD..."
]
            

Tokens can also be set as a combination of a common root token and path-segment tokens. For example:

[
    "AAT-ZjAxOTE0Y2...", {
        "valvoid": "AAT-N2ZhZD..."
    }
]
                [
    "AAT-ZjAxOTE0Y2...",
    "valvoid" => "AAT-N2ZhZD..."
]
            

Token usage order:

  • AAT-N2ZhZD...: path-specific token (first)
  • AAT-ZjAxOTE0Y2...: root token (fallback or other packages)

Configurable GitLab API

The GitLab api is an abstraction for downloading packages from the GitLab platform.

{
    "api": "Valvoid\\Fusion\\Hub\\APIs\\Remote\\GitLab\\GitLab",
    "protocol": "<type>",
    "domain": "<name>",
    "tokens": "<authentication>"
}
                [
    "api" => \Valvoid\Fusion\Hub\APIs\Remote\GitLab\GitLab::class,
    "protocol" => "<type>",
    "domain" => "<name>",
    "tokens" => "<authentication>"
]
            

Protocol Type

By default, the protocol type is secure network communication. If the optional protocol entry is set to one of the following, the API will use that value instead:

  • https: default
  • http

Domain Name

By default, the domain name is the identifier assigned to this API in the apis configuration wrapper. If the optional domain entry is set to one of the following, the API will use it instead:

  • gitlab.com: official cloud
  • <custom-gitlab.com>: custom instance

Note

Setting a custom instance domain is a feature for testing alternative versions of a platform. Dependency sources still select the API by its identifier in the apis wrapper. The domain only affects the network endpoint. For individual API configuration, see examples.

Tokens Authentication

By default, the API only supports unauthenticated requests. If the optional tokens entry is set with one of the following authentication values, the API will also be able to execute authenticated requests.

A common root token (glpat-cR8Q-g...) can be used for all requests. Tokens can also be assigned to path segments for namespaced requests. For example, to authenticate requests for packages under the group valvoid:

{
    "valvoid": "glpat-oRaiG..."
}
                [
    "valvoid" => "glpat-oRaiG..."
]
            

Tokens can also be set as a combination of a common root token and path-segment tokens. For example:

[
    "glpat-cR8Q-g...", {
        "valvoid": "glpat-oRaiG..."
    }
]
                [
    "glpat-cR8Q-g...",
    "valvoid" => "glpat-oRaiG..."
]
            

Token usage order:

  • glpat-oRaiG...: path-specific token (first)
  • glpat-cR8Q-g...: root token (fallback or other packages)

Configurable GitHub API

The GitHub api is an abstraction for downloading packages from the GitHub platform.

{
    "api": "Valvoid\\Fusion\\Hub\\APIs\\Remote\\GitHub\\GitHub",
    "protocol": "<type>",
    "domain": "<name>",
    "tokens": "<authentication>"
}
                [
    "api" => \Valvoid\Fusion\Hub\APIs\Remote\GitHub\GitHub::class,
    "protocol" => "<type>",
    "domain" => "<name>",
    "tokens" => "<authentication>"
]
            

Protocol Type

By default, the protocol type is secure network communication. If the optional protocol entry is set to one of the following, the API will use that value instead:

  • https: default
  • http

Domain Name

By default, the domain name is the identifier assigned to this API in the apis configuration wrapper. If the optional domain entry is set to one of the following, the API will use it instead:

  • github.com: official cloud
  • <custom-github.com>: custom instance

Note

Setting a custom instance domain is a feature for testing alternative versions of a platform. Dependency sources still select the API by its identifier in the apis wrapper. The domain only affects the network endpoint. For individual API configuration, see examples.

Tokens Authentication

By default, the API only supports unauthenticated requests. If the optional tokens entry is set with one of the following authentication values, the API will also be able to execute authenticated requests.

A common root token (github_pat_11AJC...) can be used for all requests. Tokens can also be assigned to path segments for namespaced requests. For example, to authenticate requests for packages under the group valvoid:

{
    "valvoid": "ghp_DyJKWazfOX..."
}
                [
    "valvoid" => "ghp_DyJKWazfOX..."
]
            

Tokens can also be set as a combination of a common root token and path-segment tokens. For example:

[
    "github_pat_11AJC...", {
        "valvoid": "ghp_DyJKWazfOX..."
    }
]
                [
    "github_pat_11AJC...",
    "valvoid" => "ghp_DyJKWazfOX..."
]
            

Token usage order:

  • ghp_DyJKWazfOX...: path-specific token (first)
  • github_pat_11AJC...: root token (fallback or other packages)

Configurable Bitbucket API

The Bitbucket api is an abstraction for downloading packages from the Bitbucket platform.

{
    "api": "Valvoid\\Fusion\\Hub\\APIs\\Remote\\Bitbucket\\Bitbucket",
    "protocol": "<type>",
    "domain": "<name>",
    "tokens": "<authentication>"
}
                [
    "api" => \Valvoid\Fusion\Hub\APIs\Remote\Bitbucket\Bitbucket::class,
    "protocol" => "<type>",
    "domain" => "<name>",
    "tokens" => "<authentication>"
]
            

Protocol Type

By default, the protocol type is secure network communication. If the optional protocol entry is set to one of the following, the API will use that value instead:

  • https: default
  • http

Domain Name

By default, the domain name is the identifier assigned to this API in the apis configuration wrapper. If the optional domain entry is set to one of the following, the API will use it instead:

  • bitbucket.org: official cloud
  • <custom-bitbucket.org>: custom instance

Note

Setting a custom instance domain is a feature for testing alternative versions of a platform. Dependency sources still select the API by its identifier in the apis wrapper. The domain only affects the network endpoint. For individual API configuration, see examples.

Tokens Authentication

By default, the API only supports unauthenticated requests. If the optional tokens entry is set with one of the following authentication values, the API will also be able to execute authenticated requests.

A common root token (ATCTT3xFfGN0B-vVx...) can be used for all requests. Tokens can also be assigned to path segments for namespaced requests. For example, to authenticate requests for packages under the group valvoid:

{
    "valvoid": "ATCTT3xFfGN0Opn..."
}
                [
    "valvoid" => "ATCTT3xFfGN0Opn..."
]
            

Tokens can also be set as a combination of a common root token and path-segment tokens. For example:

[
    "ATCTT3xFfGN0B-vVx...", {
        "valvoid": "ATCTT3xFfGN0Opn..."
    }
]
                [
    "ATCTT3xFfGN0B-vVx...",
    "valvoid" => "ATCTT3xFfGN0Opn..."
]
            

Token usage order:

  • ATCTT3xFfGN0Opn...: path-specific token (first)
  • ATCTT3xFfGN0B-vVx...: root token (fallback or other packages)

Default Git API

The Git api is an abstraction for downloading packages from a local Git repository.

{
    "api": "Valvoid\\Fusion\\Hub\\APIs\\Local\\Git\\Git"
}
                [
    "api" => \Valvoid\Fusion\Hub\APIs\Local\Git\Git::class
]
            

Default Directory API

The directory api is an abstraction for downloading packages from a local directory.

{
    "api": "Valvoid\\Fusion\\Hub\\APIs\\Local\\Dir\\Dir"
}
                [
    "api" => \Valvoid\Fusion\Hub\APIs\Local\Dir\Dir::class
]