ISPO SDK
    Preparing search index...

    Variable chromeAuthorConst

    Markdown
    chromeAuthor: {
        activateTheme(themeId: string): Promise<void>;
        commit(
            paths: string[],
            message?: string,
        ): Promise<{ committed: string[]; sha: string }>;
        list(): Promise<ChromeAuthorViewFile[]>;
        read(path: string): Promise<string>;
        status(): Promise<string[]>;
        typecheck(): Promise<{ ok: boolean; output: string }>;
        write(path: string, content: string, build?: boolean): Promise<void>;
    } = ...

    Type Declaration

    • activateTheme: function
      • Activate a saved theme (or the builtin ispo) as the HOST appearance โ€” the same setThemeId path Settings โ†’ Appearance uses, broadcast to chrome and every project iframe. The host validates the id against the saved-theme list. The active id arrives back via the ispo:theme event (detail.themeId).

        Parameters

        • themeId: string

        Returns Promise<void>

    • commit: function
      • Typecheck (hard gate), then commit ONLY the given allowlisted view paths (scoped --only, so unrelated working-tree changes are never swept in). Returns the short sha + the committed pathspecs.

        Parameters

        • paths: string[]
        • Optionalmessage: string

        Returns Promise<{ committed: string[]; sha: string }>

    • list: function
    • read: function
      • Read a view's current source.

        Parameters

        • path: string

        Returns Promise<string>

    • status: function
      • Changed (working-tree) view paths, repo-root-relative.

        Returns Promise<string[]>

    • typecheck: function
      • Typecheck the @ispo/chrome package. ok:false carries the tsc output.

        Returns Promise<{ ok: boolean; output: string }>

    • write: function
      • Write the edited source to the working tree and fan a demand-build of the themes iframe (so the sandbox can render the REAL rebuilt view). Does NOT commit โ€” call commit for that. The change reaches real host chrome on the next host restart.

        Parameters

        • path: string
        • content: string
        • build: boolean = false

        Returns Promise<void>