Theia API Documentation v1.75.0
    Preparing search index...

    A repository tarball is a single request that also carries the commit it was taken from, unlike the Contents API walk the skill installer uses, which needs one request per directory and per file.

    Implements

    Index

    Constructors

    Properties

    logger: ILogger
    preferenceService: PreferenceService
    requestService: RequestService

    The raw RequestService, like the skill installer: this talks to GitHub rather than to the registry host, so the backend request allowlist (which covers the registry only) does not apply.

    Methods

    • One request; the GitHub API redirects to codeload, which the request service follows.

      Parameters

      • owner: string
      • repo: string

      Returns Promise<Uint8Array<ArrayBufferLike>>

    • tar-fs reports a refusal to write through a symlinked parent as <absolute path> is not a valid path, a raw message naming an internal staging directory. It is a containment refusal like any other, so it is reported like one.

      Parameters

      Returns Error

    • A symlink target is relative to the link's own directory; a hard-link target is an archive path, so it gets the same strip and subtree mapping as the entry itself and is rewritten in place.

      Parameters

      • header: TarEntryHeader
      • mappedName: string
      • prefix: string
      • destination: string
      • state: TarExtractionState

      Returns boolean

    • An entry whose own path escapes the root is unsafe and fails the extraction. A link whose target merely points out of the plugin is dropped instead: it would have been written inside the root, so refusing to create it loses that one link and nothing else.

      Parameters

      • header: TarEntryHeader
      • prefix: string
      • destination: string
      • state: TarExtractionState

      Returns TarEntryHeader

    • No regular file was written, which has two causes worth telling apart: the requested subtree is not in the archive at all, or it is there and holds only directories and links whose targets were dropped. Reporting the second as a wrong path would send the user hunting for a typo that is not there.

      Parameters

      Returns string

    • The shape a lexical check cannot see: sub/up -> .. then s -> sub/up/.. are both lexically contained, while the second really resolves to the parent of the extraction root.

      Parameters

      • mappedName: string
      • linkname: string
      • state: TarExtractionState

      Returns boolean