@flowscripter/dynamic-plugin-framework
    Preparing search index...

    Interface SpawnInterface

    Allows a host application to supply its own process-spawning implementation (e.g. one which integrates with a CLI framework's shutdown handling and output rendering) instead of a PluginManager shelling out directly.

    interface SpawnInterface {
        spawn(
            command: readonly string[],
            options: { cwd: string; timeoutMs?: number },
        ): Promise<SpawnResult>;
    }
    Index
    • Spawn a process and wait for it to exit.

      Parameters

      • command: readonly string[]

        the command and its arguments, e.g. ["bun", "add", "some-package"].

      • options: { cwd: string; timeoutMs?: number }
        • cwd: string

          the working directory for the spawned process.

        • OptionaltimeoutMs?: number

          if specified, the process is killed and SpawnResult.timedOut is set if it has not exited within this many milliseconds. Defaults to unbounded.

      Returns Promise<SpawnResult>

      the SpawnResult. Never rejects.