Datalayer VS Code Extension - v0.0.4
    Preparing search index...

    Manages document lifecycle between Datalayer platform and local filesystem. Singleton service that handles document caching and runtime association.

    const bridge = DocumentBridge.getInstance(context);
    const uri = await bridge.openDocument(document, spaceId, spaceName);
    Index

    Constructors

    Properties

    activeRuntimes: Set<string> = ...
    documentMetadata: Map<string, DocumentMetadata> = ...
    tempDir: string
    instance: DocumentBridge
    sdk: DatalayerClient

    Methods

    • Ensures a runtime exists for the document. Verifies cached runtime status or creates a new one if needed.

      Parameters

      • documentId: string

        Document UID needing runtime

      Returns Promise<Runtime>

      Runtime instance or undefined if creation fails

    • Opens a document from Datalayer platform. Downloads content, caches locally, and creates virtual URI for VS Code.

      Parameters

      • document: Document

        The document to open

      • OptionalspaceId: string

        ID of the containing space

      • OptionalspaceName: string

        Name of the containing space

      Returns Promise<Uri>

      Virtual URI for the opened document

    • Gets the singleton instance of DocumentBridge.

      Parameters

      • Optionalcontext: ExtensionContext

        Extension context (required on first call)

      • Optionalsdk: DatalayerClient

        SDK instance (required on first call)

      Returns DocumentBridge

      The singleton instance