Skip to content

Structure

JSScriptRunner

Runs a named script from package.json using the detected package manager.

struct JSScriptRunner

Overview

Validates that the script exists before invoking the package manager. Automatically installs dependencies when node_modules is absent.

Usage

let runner = JSScriptRunner(context: context.shell, projectRoot: ".")
let output = try await runner.run(script: "test")

Topics

Initializers

Instance Properties

Instance Methods

Relationships

Conforms To

  • Swift.Sendable
  • Swift.SendableMetatype