Skip to main content

scriptUtils

Index

Functions

executePackageAccessibleBinary

  • executePackageAccessibleBinary(locator: Locator, binaryName: string, args: string[], __namedParameters: ExecutePackageAccessibleBinaryOptions): Promise<number>
  • Execute a binary from the specified package.

    Note that "binary" in this sense means "a Javascript file". Actual native binaries cannot be executed this way, because we use Node in order to transparently read from the archives.


    Parameters

    • locator: Locator

      The queried package

    • binaryName: string

      The name of the binary file to execute

    • args: string[]

      The arguments to pass to the file

    • __namedParameters: ExecutePackageAccessibleBinaryOptions

    Returns Promise<number>

executePackageScript

  • executePackageScript(locator: Locator, scriptName: string, args: string[], __namedParameters: ExecutePackageScriptOptions): Promise<number>
  • Parameters

    • locator: Locator
    • scriptName: string
    • args: string[]
    • __namedParameters: ExecutePackageScriptOptions

    Returns Promise<number>

executePackageShellcode

  • executePackageShellcode(locator: Locator, command: string, args: string[], __namedParameters: ExecutePackageScriptOptions): Promise<number>
  • Parameters

    • locator: Locator
    • command: string
    • args: string[]
    • __namedParameters: ExecutePackageScriptOptions

    Returns Promise<number>

executeWorkspaceAccessibleBinary

  • executeWorkspaceAccessibleBinary(workspace: Workspace, binaryName: string, args: string[], __namedParameters: ExecuteWorkspaceAccessibleBinaryOptions): Promise<number>
  • Execute a binary from the specified workspace


    Parameters

    • workspace: Workspace

      The queried package

    • binaryName: string

      The name of the binary file to execute

    • args: string[]

      The arguments to pass to the file

    • __namedParameters: ExecuteWorkspaceAccessibleBinaryOptions

    Returns Promise<number>

executeWorkspaceLifecycleScript

  • executeWorkspaceLifecycleScript(workspace: Workspace, lifecycleScriptName: string, __namedParameters: ExecuteWorkspaceLifecycleScriptOptions): Promise<void>
  • Parameters

    • workspace: Workspace
    • lifecycleScriptName: string
    • __namedParameters: ExecuteWorkspaceLifecycleScriptOptions

    Returns Promise<void>

executeWorkspaceScript

  • executeWorkspaceScript(workspace: Workspace, scriptName: string, args: string[], __namedParameters: ExecuteWorkspaceScriptOptions): Promise<number>
  • Parameters

    • workspace: Workspace
    • scriptName: string
    • args: string[]
    • __namedParameters: ExecuteWorkspaceScriptOptions

    Returns Promise<number>

getPackageAccessibleBinaries

  • getPackageAccessibleBinaries(locator: Locator, project: GetPackageAccessibleBinariesOptions): Promise<PackageAccessibleBinaries>
  • Return the binaries that can be accessed by the specified package


    Parameters

    • locator: Locator

      The queried package

    • project: GetPackageAccessibleBinariesOptions

      The project owning the package

    Returns Promise<PackageAccessibleBinaries>

getWorkspaceAccessibleBinaries

  • getWorkspaceAccessibleBinaries(workspace: Workspace): Promise<PackageAccessibleBinaries>
  • Return the binaries that can be accessed by the specified workspace


    Parameters

    Returns Promise<PackageAccessibleBinaries>

hasPackageScript

  • hasPackageScript(locator: Locator, scriptName: string, __namedParameters: HasPackageScriptOption): Promise<boolean>
  • Parameters

    • locator: Locator
    • scriptName: string
    • __namedParameters: HasPackageScriptOption

    Returns Promise<boolean>

hasWorkspaceScript

  • hasWorkspaceScript(workspace: Workspace, scriptName: string): boolean
  • Parameters

    Returns boolean

isNodeScript

makeScriptEnv

  • makeScriptEnv(__namedParameters: { baseEnv?: Record<string, undefined | string>; binFolder: PortablePath; ignoreCorepack?: boolean; lifecycleScript?: string; locator?: Locator; project?: Project }): Promise<ProcessEnv & { BERRY_BIN_FOLDER: string }>
  • Parameters

    • __namedParameters: { baseEnv?: Record<string, undefined | string>; binFolder: PortablePath; ignoreCorepack?: boolean; lifecycleScript?: string; locator?: Locator; project?: Project }

    Returns Promise<ProcessEnv & { BERRY_BIN_FOLDER: string }>

maybeExecuteWorkspaceLifecycleScript

  • maybeExecuteWorkspaceLifecycleScript(workspace: Workspace, lifecycleScriptName: string, opts: ExecuteWorkspaceLifecycleScriptOptions): Promise<void>
  • Parameters

    • workspace: Workspace
    • lifecycleScriptName: string
    • opts: ExecuteWorkspaceLifecycleScriptOptions

    Returns Promise<void>

prepareExternalProject