mirror of
https://github.com/pnpm/action-setup.git
synced 2025-04-25 02:52:28 +08:00
* feat: add an option to install the self-contained binary version of pnpm * test: add a test about nodejs_bundled * style: remove an empty line * chore: use newer pnpm * chore: update dependencies * feat: rename `nodejs_bundled` to `standalone` as @zkochan suggested * docs: add --------- Co-authored-by: Takashi Sato <takashi@tks.st>
28 lines
769 B
TypeScript
28 lines
769 B
TypeScript
import { getBooleanInput, getInput, InputOptions } from '@actions/core'
|
|
import expandTilde from 'expand-tilde'
|
|
import { RunInstall, parseRunInstall } from './run-install'
|
|
|
|
export interface Inputs {
|
|
readonly version?: string
|
|
readonly dest: string
|
|
readonly runInstall: RunInstall[]
|
|
readonly packageJsonFile: string
|
|
readonly standalone: boolean
|
|
}
|
|
|
|
const options: InputOptions = {
|
|
required: true,
|
|
}
|
|
|
|
const parseInputPath = (name: string) => expandTilde(getInput(name, options))
|
|
|
|
export const getInputs = (): Inputs => ({
|
|
version: getInput('version'),
|
|
dest: parseInputPath('dest'),
|
|
runInstall: parseRunInstall('run_install'),
|
|
packageJsonFile: parseInputPath('package_json_file'),
|
|
standalone: getBooleanInput('standalone'),
|
|
})
|
|
|
|
export default getInputs
|