scriptUtils
Index
Functions
- executePackageAccessibleBinary
- executePackageScript
- executePackageShellcode
- executeWorkspaceAccessibleBinary
- executeWorkspaceLifecycleScript
- executeWorkspaceScript
- getPackageAccessibleBinaries
- getWorkspaceAccessibleBinaries
- hasPackageScript
- hasWorkspaceScript
- isNodeScript
- makeScriptEnv
- maybeExecuteWorkspaceLifecycleScript
- prepareExternalProject
Functions
executePackageAccessibleBinary
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
Parameters
locator: Locator
scriptName: string
args: string[]
__namedParameters: ExecutePackageScriptOptions
Returns Promise<number>
executePackageShellcode
Parameters
locator: Locator
command: string
args: string[]
__namedParameters: ExecutePackageScriptOptions
Returns Promise<number>
executeWorkspaceAccessibleBinary
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
Parameters
workspace: Workspace
lifecycleScriptName: string
__namedParameters: ExecuteWorkspaceLifecycleScriptOptions
Returns Promise<void>
executeWorkspaceScript
Parameters
workspace: Workspace
scriptName: string
args: string[]
__namedParameters: ExecuteWorkspaceScriptOptions
Returns Promise<number>
getPackageAccessibleBinaries
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
Return the binaries that can be accessed by the specified workspace
Parameters
workspace: Workspace
The queried workspace
Returns Promise<PackageAccessibleBinaries>
hasPackageScript
Parameters
locator: Locator
scriptName: string
__namedParameters: HasPackageScriptOption
Returns Promise<boolean>
hasWorkspaceScript
Parameters
workspace: Workspace
scriptName: string
Returns boolean
isNodeScript
Parameters
p: PortablePath
Returns boolean
makeScriptEnv
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
Parameters
workspace: Workspace
lifecycleScriptName: string
opts: ExecuteWorkspaceLifecycleScriptOptions
Returns Promise<void>
prepareExternalProject
Parameters
cwd: PortablePath
outputPath: PortablePath
__namedParameters: { configuration: Configuration; locator?: null | Locator; report: Report; workspace?: null | string }
Returns Promise<void>
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.