@karmaniverous/jeeves-scripts-core
    Preparing search index...

    Function resolvePublicUrl

    • The public insider URL jeeves-server gives for a path.

      Parameters

      • fetchFn: Fetch

        fetch.

      • access: ServerAccess

        API base URL and insider key.

      • fsPath: string

        Absolute filesystem path under one of the server's roots.

      • timeoutMs: number = SERVER_LINK_TIMEOUT_MS

        How long to wait for the answer (default SERVER_LINK_TIMEOUT_MS, 10 s).

      Returns Promise<string>

      The publicUrl from the server's answer.

      Error on a non-OK answer (e.g. 404: not under any root), when the server has no publicUrl configured, or when it doesn't answer in time (the message names the path, never the URL or key).