mirror of https://github.com/aminya/setup-cpp
feat: add setup-apt package for all the apt utils
This commit is contained in:
parent
1704d8457d
commit
dc74686724
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,7 +1,7 @@
|
||||||
pre-commit:
|
pre-commit:
|
||||||
parallel: false
|
parallel: false
|
||||||
commands:
|
commands:
|
||||||
lint:
|
test.lint:
|
||||||
run: pnpm run lint
|
run: pnpm run test.lint
|
||||||
build:
|
build:
|
||||||
run: pnpm run clean && pnpm i && pnpm run build -- --no-color && git add ./dist
|
run: pnpm run clean && pnpm i && pnpm run build -- --no-color && git add ./dist
|
||||||
|
|
12
package.json
12
package.json
|
@ -32,7 +32,7 @@
|
||||||
"build.babel": "babel ./dist --out-dir dist --plugins @upleveled/babel-plugin-remove-node-prefix --plugins @babel/plugin-transform-private-methods --compact --no-babelrc --source-maps true",
|
"build.babel": "babel ./dist --out-dir dist --plugins @upleveled/babel-plugin-remove-node-prefix --plugins @babel/plugin-transform-private-methods --compact --no-babelrc --source-maps true",
|
||||||
"build.modern": "shx cp -r ./dist/actions/* ./dist/modern",
|
"build.modern": "shx cp -r ./dist/actions/* ./dist/modern",
|
||||||
"bump": "ncu -u -x numerous,execa,prettier,@types/node,eslint,@types/eslint && pnpm update && pnpx typesync && pnpm run clean",
|
"bump": "ncu -u -x numerous,execa,prettier,@types/node,eslint,@types/eslint && pnpm update && pnpx typesync && pnpm run clean",
|
||||||
"clean": "shx rm -rf ./dist ./exe ./packages/*/dist/ ./.parcel-cache && shx mkdir -p ./dist/legacy ./dist/actions ./dist/modern ",
|
"clean": "shx rm -rf ./dist ./exe ./.parcel-cache && shx mkdir -p ./dist/legacy ./dist/actions ./dist/modern ",
|
||||||
"copy.matchers": "run-p copy.matchers.legacy copy.matchers.actions",
|
"copy.matchers": "run-p copy.matchers.legacy copy.matchers.actions",
|
||||||
"copy.matchers.legacy": "shx cp ./src/gcc/gcc_matcher.json ./dist/legacy/ && shx cp ./src/msvc/msvc_matcher.json ./dist/legacy/ && shx cp ./src/python/python_matcher.json ./dist/legacy/ && shx cp ./src/llvm/llvm_matcher.json ./dist/legacy/",
|
"copy.matchers.legacy": "shx cp ./src/gcc/gcc_matcher.json ./dist/legacy/ && shx cp ./src/msvc/msvc_matcher.json ./dist/legacy/ && shx cp ./src/python/python_matcher.json ./dist/legacy/ && shx cp ./src/llvm/llvm_matcher.json ./dist/legacy/",
|
||||||
"copy.matchers.actions": "shx cp ./src/gcc/gcc_matcher.json ./dist/actions/ && shx cp ./src/msvc/msvc_matcher.json ./dist/actions/ && shx cp ./src/python/python_matcher.json ./dist/actions/ && shx cp ./src/llvm/llvm_matcher.json ./dist/actions/",
|
"copy.matchers.actions": "shx cp ./src/gcc/gcc_matcher.json ./dist/actions/ && shx cp ./src/msvc/msvc_matcher.json ./dist/actions/ && shx cp ./src/python/python_matcher.json ./dist/actions/ && shx cp ./src/llvm/llvm_matcher.json ./dist/actions/",
|
||||||
|
@ -86,6 +86,7 @@
|
||||||
"escape-path-with-spaces": "^1.0.2",
|
"escape-path-with-spaces": "^1.0.2",
|
||||||
"escape-quotes": "^1.0.2",
|
"escape-quotes": "^1.0.2",
|
||||||
"escape-string-regexp": "^5.0.0",
|
"escape-string-regexp": "^5.0.0",
|
||||||
|
"setup-apt": "workspace:*",
|
||||||
"eslint": "^8.57.0",
|
"eslint": "^8.57.0",
|
||||||
"eslint-config-atomic": "^1.22.1",
|
"eslint-config-atomic": "^1.22.1",
|
||||||
"exec-powershell": "workspace:*",
|
"exec-powershell": "workspace:*",
|
||||||
|
@ -129,12 +130,14 @@
|
||||||
"productionDependencies": [
|
"productionDependencies": [
|
||||||
"@actions/core",
|
"@actions/core",
|
||||||
"@actions/exec",
|
"@actions/exec",
|
||||||
|
"@actions/http-client",
|
||||||
"@actions/io",
|
"@actions/io",
|
||||||
"@actions/tool-cache",
|
"@actions/tool-cache",
|
||||||
|
"@iarna/toml",
|
||||||
"admina",
|
"admina",
|
||||||
"ci-info",
|
"ci-info",
|
||||||
"ci-log",
|
"ci-log",
|
||||||
"os-env",
|
"diagnostics_channel",
|
||||||
"escape-path-with-spaces",
|
"escape-path-with-spaces",
|
||||||
"escape-quotes",
|
"escape-quotes",
|
||||||
"escape-string-regexp",
|
"escape-string-regexp",
|
||||||
|
@ -145,18 +148,19 @@
|
||||||
"mri",
|
"mri",
|
||||||
"msvc-dev-cmd",
|
"msvc-dev-cmd",
|
||||||
"numerous",
|
"numerous",
|
||||||
|
"os-env",
|
||||||
"path-exists",
|
"path-exists",
|
||||||
"patha",
|
"patha",
|
||||||
"retry-as-promised",
|
"retry-as-promised",
|
||||||
"semver",
|
"semver",
|
||||||
|
"setup-apt",
|
||||||
"setup-python",
|
"setup-python",
|
||||||
"simple-update-notifier",
|
"simple-update-notifier",
|
||||||
"time-delta",
|
"time-delta",
|
||||||
"ubuntu-version",
|
"ubuntu-version",
|
||||||
"untildify-user",
|
"untildify-user",
|
||||||
"web-streams-polyfill",
|
|
||||||
"util.types",
|
"util.types",
|
||||||
"diagnostics_channel"
|
"web-streams-polyfill"
|
||||||
],
|
],
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=12.x",
|
"node": ">=12.x",
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"extends": "../../.eslintrc.json"
|
||||||
|
}
|
|
@ -0,0 +1,47 @@
|
||||||
|
{
|
||||||
|
"name": "setup-apt",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "Setup apt packages and repositories in Debian/Ubuntu-based distributions",
|
||||||
|
"homepage": "https://github.com/aminya/setup-cpp",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"author": "Amin Yahyaabadi",
|
||||||
|
"main": "./dist/index.js",
|
||||||
|
"source": "./src/index.ts",
|
||||||
|
"scripts": {
|
||||||
|
"build": "tsc --pretty",
|
||||||
|
"lint.tsc": "tsc --noEmit --pretty",
|
||||||
|
"lint.eslint": "eslint **/*.{ts,tsx,js,jsx,cjs,mjs,json,yaml} --no-error-on-unmatched-pattern --cache --cache-location ./.cache/eslint/ --fix"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@types/node": "^12",
|
||||||
|
"admina": "^1.0.1",
|
||||||
|
"ci-info": "^4.0.0",
|
||||||
|
"path-exists": "^5.0.0",
|
||||||
|
"ci-log": "workspace:*",
|
||||||
|
"os-env": "workspace:*",
|
||||||
|
"which": "4.0.0",
|
||||||
|
"execa": "^7.2.0",
|
||||||
|
"escape-string-regexp": "^5.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12"
|
||||||
|
},
|
||||||
|
"keywords": [
|
||||||
|
"setup",
|
||||||
|
"apt",
|
||||||
|
"apt-get",
|
||||||
|
"repository",
|
||||||
|
"add-apt-repository",
|
||||||
|
"apt-cache",
|
||||||
|
"aptitude",
|
||||||
|
"install",
|
||||||
|
"setup-apt",
|
||||||
|
"repositories",
|
||||||
|
"linux",
|
||||||
|
"ubuntu",
|
||||||
|
"debian",
|
||||||
|
"package",
|
||||||
|
"apt-key"
|
||||||
|
],
|
||||||
|
"devDependencies": {}
|
||||||
|
}
|
|
@ -0,0 +1,354 @@
|
||||||
|
import { promises } from "fs"
|
||||||
|
import { defaultExecOptions, execRoot, execRootSync } from "admina"
|
||||||
|
import { GITHUB_ACTIONS } from "ci-info"
|
||||||
|
import { info, warning } from "ci-log"
|
||||||
|
import escapeRegex from "escape-string-regexp"
|
||||||
|
import { type ExecaError, execa } from "execa"
|
||||||
|
import { sourceRC } from "os-env"
|
||||||
|
import type { RcOptions } from "os-env/dist/rc-file.js"
|
||||||
|
import { pathExists } from "path-exists"
|
||||||
|
import which from "which"
|
||||||
|
const { appendFile } = promises
|
||||||
|
|
||||||
|
export type InstallationInfo = {
|
||||||
|
/** The install dir of the package (Defaults to `undefined`) */
|
||||||
|
installDir?: string
|
||||||
|
/** The bin dir of the package (Defaults to `/usr/bin`) */
|
||||||
|
binDir: string
|
||||||
|
/** The bin path of the package (Defaults to `undefined`) */
|
||||||
|
bin?: string
|
||||||
|
}
|
||||||
|
|
||||||
|
/* eslint-disable require-atomic-updates */
|
||||||
|
let didUpdate: boolean = false
|
||||||
|
let didInit: boolean = false
|
||||||
|
|
||||||
|
// wait up to 300 seconds if the apt-get lock is held
|
||||||
|
export const aptTimeout = "Dpkg::Lock::Timeout=300"
|
||||||
|
|
||||||
|
export type AptPackage = {
|
||||||
|
name: string
|
||||||
|
version?: string
|
||||||
|
repositories?: string[]
|
||||||
|
}
|
||||||
|
|
||||||
|
const retryErrors = [
|
||||||
|
"E: Could not get lock",
|
||||||
|
"dpkg: error processing archive",
|
||||||
|
"dpkg: error: dpkg status database is locked by another process",
|
||||||
|
]
|
||||||
|
|
||||||
|
/** A function that installs a package using apt */
|
||||||
|
export async function installAptPack(packages: AptPackage[], update = false): Promise<InstallationInfo> {
|
||||||
|
const apt: string = getApt()
|
||||||
|
|
||||||
|
for (const { name, version } of packages) {
|
||||||
|
info(`Installing ${name} ${version ?? ""} via ${apt}`)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update the repos if needed
|
||||||
|
if (update) {
|
||||||
|
updateRepos(apt)
|
||||||
|
didUpdate = true
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add the repos if needed
|
||||||
|
await addRepositories(apt, packages)
|
||||||
|
|
||||||
|
const needToInstall = await filterAndQualifyAptPackages(apt, packages)
|
||||||
|
|
||||||
|
if (needToInstall.length === 0) {
|
||||||
|
info("All packages are already installed")
|
||||||
|
return { binDir: "/usr/bin/" }
|
||||||
|
}
|
||||||
|
|
||||||
|
// Initialize apt if needed
|
||||||
|
if (!didInit) {
|
||||||
|
await initApt(apt)
|
||||||
|
didInit = true
|
||||||
|
}
|
||||||
|
|
||||||
|
// Install
|
||||||
|
try {
|
||||||
|
execRootSync(apt, ["install", "--fix-broken", "-y", ...needToInstall], { ...defaultExecOptions, env: getEnv(apt) })
|
||||||
|
} catch (err) {
|
||||||
|
if (isExecaError(err)) {
|
||||||
|
if (retryErrors.some((error) => err.stderr.includes(error))) {
|
||||||
|
warning(`Failed to install packages ${needToInstall}. Retrying...`)
|
||||||
|
execRootSync(
|
||||||
|
apt,
|
||||||
|
["install", "--fix-broken", "-y", "-o", aptTimeout, ...needToInstall],
|
||||||
|
{ ...defaultExecOptions, env: getEnv(apt) },
|
||||||
|
)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
throw err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return { binDir: "/usr/bin/" }
|
||||||
|
}
|
||||||
|
|
||||||
|
function isExecaError(err: unknown): err is ExecaError {
|
||||||
|
return typeof (err as ExecaError).stderr === "string"
|
||||||
|
}
|
||||||
|
|
||||||
|
export function hasNala() {
|
||||||
|
return which.sync("nala", { nothrow: true }) !== null
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getApt() {
|
||||||
|
let apt: string
|
||||||
|
if (hasNala()) {
|
||||||
|
apt = "nala"
|
||||||
|
} else {
|
||||||
|
apt = "apt-get"
|
||||||
|
}
|
||||||
|
return apt
|
||||||
|
}
|
||||||
|
|
||||||
|
function getEnv(apt: string) {
|
||||||
|
const env: NodeJS.ProcessEnv = { ...process.env, DEBIAN_FRONTEND: "noninteractive" }
|
||||||
|
|
||||||
|
if (apt === "nala") {
|
||||||
|
// if LANG/LC_ALL is not set, enable utf8 otherwise nala fails because of ASCII encoding
|
||||||
|
if (env.LANG === undefined) {
|
||||||
|
env.LANG = "C.UTF-8"
|
||||||
|
}
|
||||||
|
if (env.LC_ALL === undefined) {
|
||||||
|
env.LC_ALL = "C.UTF-8"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return env
|
||||||
|
}
|
||||||
|
|
||||||
|
export enum AptPackageType {
|
||||||
|
NameDashVersion = 0,
|
||||||
|
NameEqualsVersion = 1,
|
||||||
|
Name = 2,
|
||||||
|
None = 3,
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter out the packages that are already installed and qualify the packages into a full package name/version
|
||||||
|
*/
|
||||||
|
async function filterAndQualifyAptPackages(apt: string, packages: AptPackage[]) {
|
||||||
|
return (await Promise.all(packages.map((pack) => qualifiedNeededAptPackage(apt, pack))))
|
||||||
|
.filter((pack) => pack !== undefined)
|
||||||
|
}
|
||||||
|
|
||||||
|
async function qualifiedNeededAptPackage(apt: string, pack: AptPackage) {
|
||||||
|
// Qualify the packages into full package name/version
|
||||||
|
const qualified = await getAptArg(apt, pack.name, pack.version)
|
||||||
|
// filter out the packages that are already installed
|
||||||
|
return (await isAptPackInstalled(qualified)) ? undefined : qualified
|
||||||
|
}
|
||||||
|
|
||||||
|
async function addRepositories(apt: string, packages: AptPackage[]) {
|
||||||
|
const allRepositories = [...new Set(packages.flatMap((pack) => pack.repositories ?? []))]
|
||||||
|
if (allRepositories.length !== 0) {
|
||||||
|
if (!didInit) {
|
||||||
|
await initApt(apt)
|
||||||
|
didInit = true
|
||||||
|
}
|
||||||
|
await installAddAptRepo(apt)
|
||||||
|
for (const repo of allRepositories) {
|
||||||
|
// eslint-disable-next-line no-await-in-loop
|
||||||
|
execRootSync("add-apt-repository", ["-y", "--no-update", repo], { ...defaultExecOptions, env: getEnv(apt) })
|
||||||
|
}
|
||||||
|
updateRepos(apt)
|
||||||
|
didUpdate = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function aptPackageType(apt: string, name: string, version: string | undefined): Promise<AptPackageType> {
|
||||||
|
if (version !== undefined && version !== "") {
|
||||||
|
const { stdout } = await execa("apt-cache", [
|
||||||
|
"search",
|
||||||
|
"--names-only",
|
||||||
|
`^${escapeRegex(name)}-${escapeRegex(version)}$`,
|
||||||
|
], { env: getEnv(apt), stdio: "pipe" })
|
||||||
|
if (stdout.trim() !== "") {
|
||||||
|
return AptPackageType.NameDashVersion
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
// check if apt-get show can find the version
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-shadow
|
||||||
|
const { stdout } = await execa("apt-cache", ["show", `${name}=${version}`], { env: getEnv(apt) })
|
||||||
|
if (stdout.trim() === "") {
|
||||||
|
return AptPackageType.NameEqualsVersion
|
||||||
|
}
|
||||||
|
} catch {
|
||||||
|
// ignore
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
const { stdout: showStdout } = await execa("apt-cache", ["show", name], { env: getEnv(apt), stdio: "pipe" })
|
||||||
|
if (showStdout.trim() !== "") {
|
||||||
|
return AptPackageType.Name
|
||||||
|
}
|
||||||
|
} catch {
|
||||||
|
// ignore
|
||||||
|
}
|
||||||
|
|
||||||
|
// If apt-cache fails, update the repos and try again
|
||||||
|
if (!didUpdate) {
|
||||||
|
updateRepos(getApt())
|
||||||
|
didUpdate = true
|
||||||
|
return aptPackageType(apt, name, version)
|
||||||
|
}
|
||||||
|
|
||||||
|
return AptPackageType.None
|
||||||
|
}
|
||||||
|
|
||||||
|
async function getAptArg(apt: string, name: string, version: string | undefined) {
|
||||||
|
const package_type = await aptPackageType(apt, name, version)
|
||||||
|
switch (package_type) {
|
||||||
|
case AptPackageType.NameDashVersion:
|
||||||
|
return `${name}-${version}`
|
||||||
|
case AptPackageType.NameEqualsVersion:
|
||||||
|
return `${name}=${version}`
|
||||||
|
case AptPackageType.Name:
|
||||||
|
if (version !== undefined && version !== "") {
|
||||||
|
warning(`Could not find package ${name} with version ${version}. Installing the latest version.`)
|
||||||
|
}
|
||||||
|
return name
|
||||||
|
default:
|
||||||
|
throw new Error(`Could not find package ${name} ${version ?? ""}`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateRepos(apt: string) {
|
||||||
|
execRootSync(
|
||||||
|
apt,
|
||||||
|
apt !== "nala" ? ["update", "-y", "-o", aptTimeout] : ["update", "-o", aptTimeout],
|
||||||
|
{ ...defaultExecOptions, env: getEnv(apt) },
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
async function installAddAptRepo(apt: string) {
|
||||||
|
if (await isAptPackInstalled("software-properties-common")) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
execRootSync(
|
||||||
|
apt,
|
||||||
|
["install", "-y", "--fix-broken", "-o", aptTimeout, "software-properties-common"],
|
||||||
|
{ ...defaultExecOptions, env: getEnv(apt) },
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Install gnupg and certificates (usually missing from docker containers) */
|
||||||
|
async function initApt(apt: string) {
|
||||||
|
// Update the repos if needed
|
||||||
|
if (!didUpdate) {
|
||||||
|
updateRepos(apt)
|
||||||
|
didUpdate = true
|
||||||
|
}
|
||||||
|
|
||||||
|
const toInstall = await filterAndQualifyAptPackages(apt, [
|
||||||
|
{ name: "ca-certificates" },
|
||||||
|
{ name: "gnupg" },
|
||||||
|
{ name: "apt-utils" },
|
||||||
|
])
|
||||||
|
|
||||||
|
if (toInstall.length !== 0) {
|
||||||
|
execRootSync(apt, ["install", "-y", "--fix-broken", "-o", aptTimeout, ...toInstall], {
|
||||||
|
...defaultExecOptions,
|
||||||
|
env: getEnv(apt),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
await Promise.all([
|
||||||
|
addAptKeyViaServer(["3B4FE6ACC0B21F32", "40976EAF437D05B5"], "setup-cpp-ubuntu-archive.gpg"),
|
||||||
|
addAptKeyViaServer(["1E9377A2BA9EF27F"], "launchpad-toolchain.gpg"),
|
||||||
|
])
|
||||||
|
}
|
||||||
|
|
||||||
|
function initGpg() {
|
||||||
|
execRootSync("gpg", ["-k"])
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function addAptKeyViaServer(keys: string[], name: string, server = "keyserver.ubuntu.com") {
|
||||||
|
try {
|
||||||
|
const fileName = `/etc/apt/trusted.gpg.d/${name}`
|
||||||
|
if (!(await pathExists(fileName))) {
|
||||||
|
initGpg()
|
||||||
|
|
||||||
|
await Promise.all(
|
||||||
|
keys.map(async (key) => {
|
||||||
|
await execRoot("gpg", [
|
||||||
|
"--no-default-keyring",
|
||||||
|
"--keyring",
|
||||||
|
`gnupg-ring:${fileName}`,
|
||||||
|
"--keyserver",
|
||||||
|
server,
|
||||||
|
"--recv-keys",
|
||||||
|
key,
|
||||||
|
])
|
||||||
|
await execRoot("chmod", ["644", fileName])
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
return fileName
|
||||||
|
} catch (err) {
|
||||||
|
warning(`Failed to add apt key via server ${server}: ${err}`)
|
||||||
|
return undefined
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function addAptKeyViaDownload(name: string, url: string) {
|
||||||
|
const fileName = `/etc/apt/trusted.gpg.d/${name}`
|
||||||
|
if (!(await pathExists(fileName))) {
|
||||||
|
initGpg()
|
||||||
|
await installAptPack([{ name: "curl" }, { name: "ca-certificates" }], undefined)
|
||||||
|
await execa("curl", ["-s", url, "-o", `/tmp/${name}`])
|
||||||
|
execRootSync("gpg", ["--no-default-keyring", "--keyring", `gnupg-ring:${fileName}`, "--import", `/tmp/${name}`])
|
||||||
|
execRootSync("chmod", ["644", fileName])
|
||||||
|
}
|
||||||
|
return fileName
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function updateAptAlternatives(name: string, path: string, rcOptions: RcOptions, priority: number = 40) {
|
||||||
|
if (GITHUB_ACTIONS) {
|
||||||
|
await execRoot("update-alternatives", ["--install", `/usr/bin/${name}`, name, path, priority.toString()])
|
||||||
|
} else {
|
||||||
|
await sourceRC(rcOptions)
|
||||||
|
await appendFile(
|
||||||
|
rcOptions.rcPath,
|
||||||
|
`\nif [ $UID -eq 0 ]; then update-alternatives --install /usr/bin/${name} ${name} ${path} ${priority}; fi\n`,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function isAptPackInstalled(pack: string) {
|
||||||
|
try {
|
||||||
|
// check if a package is installed
|
||||||
|
const { stdout } = await execa("dpkg", ["-s", pack], { env: getEnv("apt-get"), stdio: "pipe" })
|
||||||
|
if (typeof stdout !== "string") {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
const lines = stdout.split("\n")
|
||||||
|
// check if the output contains a line that starts with "Status: install ok installed"
|
||||||
|
return lines.some((line) => line.startsWith("Status: install ok installed"))
|
||||||
|
} catch {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function isAptPackRegexInstalled(regexp: string) {
|
||||||
|
try {
|
||||||
|
// check if a package matching the regexp is installed
|
||||||
|
const { stdout } = await execa("dpkg", ["-l", regexp], { env: getEnv("apt-get"), stdio: "pipe" })
|
||||||
|
if (typeof stdout !== "string") {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
const lines = stdout.split("\n")
|
||||||
|
// check if the output contains any lines that start with "ii"
|
||||||
|
return lines.some((line) => line.startsWith("ii"))
|
||||||
|
} catch {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
"extends": "../../tsconfig.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"outDir": "./dist",
|
||||||
|
"noEmit": false,
|
||||||
|
"allowImportingTsExtensions": false
|
||||||
|
},
|
||||||
|
"include": ["./src"]
|
||||||
|
}
|
281
pnpm-lock.yaml
281
pnpm-lock.yaml
|
@ -176,6 +176,9 @@ importers:
|
||||||
semver:
|
semver:
|
||||||
specifier: 7.6.3
|
specifier: 7.6.3
|
||||||
version: 7.6.3
|
version: 7.6.3
|
||||||
|
setup-apt:
|
||||||
|
specifier: workspace:*
|
||||||
|
version: link:packages/setup-apt
|
||||||
setup-python:
|
setup-python:
|
||||||
specifier: github:aminya/setup-python#a783db655c6e40317e2c0c96f9d162d9c9f4a751
|
specifier: github:aminya/setup-python#a783db655c6e40317e2c0c96f9d162d9c9f4a751
|
||||||
version: https://codeload.github.com/aminya/setup-python/tar.gz/a783db655c6e40317e2c0c96f9d162d9c9f4a751(encoding@0.1.13)
|
version: https://codeload.github.com/aminya/setup-python/tar.gz/a783db655c6e40317e2c0c96f9d162d9c9f4a751(encoding@0.1.13)
|
||||||
|
@ -277,6 +280,36 @@ importers:
|
||||||
specifier: workspace:*
|
specifier: workspace:*
|
||||||
version: link:../untildify-user
|
version: link:../untildify-user
|
||||||
|
|
||||||
|
packages/setup-apt:
|
||||||
|
dependencies:
|
||||||
|
'@types/node':
|
||||||
|
specifier: ^12
|
||||||
|
version: 12.20.55
|
||||||
|
admina:
|
||||||
|
specifier: ^1.0.1
|
||||||
|
version: 1.0.1
|
||||||
|
ci-info:
|
||||||
|
specifier: ^4.0.0
|
||||||
|
version: 4.0.0
|
||||||
|
ci-log:
|
||||||
|
specifier: workspace:*
|
||||||
|
version: link:../ci-log
|
||||||
|
escape-string-regexp:
|
||||||
|
specifier: ^5.0.0
|
||||||
|
version: 5.0.0
|
||||||
|
execa:
|
||||||
|
specifier: ^7.2.0
|
||||||
|
version: 7.2.0
|
||||||
|
os-env:
|
||||||
|
specifier: workspace:*
|
||||||
|
version: link:../os-env
|
||||||
|
path-exists:
|
||||||
|
specifier: ^5.0.0
|
||||||
|
version: 5.0.0
|
||||||
|
which:
|
||||||
|
specifier: 4.0.0
|
||||||
|
version: 4.0.0
|
||||||
|
|
||||||
packages/untildify-user:
|
packages/untildify-user:
|
||||||
dependencies:
|
dependencies:
|
||||||
admina:
|
admina:
|
||||||
|
@ -6347,17 +6380,16 @@ snapshots:
|
||||||
'@nodelib/fs.scandir': 2.1.5
|
'@nodelib/fs.scandir': 2.1.5
|
||||||
fastq: 1.17.1
|
fastq: 1.17.1
|
||||||
|
|
||||||
'@parcel/bundler-default@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)':
|
'@parcel/bundler-default@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@parcel/diagnostic': 2.12.0
|
'@parcel/diagnostic': 2.12.0
|
||||||
'@parcel/graph': 3.2.0
|
'@parcel/graph': 3.2.0
|
||||||
'@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
'@parcel/rust': 2.12.0
|
'@parcel/rust': 2.12.0
|
||||||
'@parcel/utils': 2.12.0
|
'@parcel/utils': 2.12.0
|
||||||
nullthrows: 1.1.1
|
nullthrows: 1.1.1
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@parcel/core'
|
- '@parcel/core'
|
||||||
- '@swc/helpers'
|
|
||||||
|
|
||||||
'@parcel/cache@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)':
|
'@parcel/cache@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)':
|
||||||
dependencies:
|
dependencies:
|
||||||
|
@ -6373,47 +6405,46 @@ snapshots:
|
||||||
dependencies:
|
dependencies:
|
||||||
chalk: 4.1.2
|
chalk: 4.1.2
|
||||||
|
|
||||||
'@parcel/compressor-raw@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)':
|
'@parcel/compressor-raw@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@parcel/core'
|
- '@parcel/core'
|
||||||
- '@swc/helpers'
|
|
||||||
|
|
||||||
'@parcel/config-default@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)(postcss@8.4.41)(typescript@5.5.4)':
|
'@parcel/config-default@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)(postcss@8.4.41)(typescript@5.5.4)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@parcel/bundler-default': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/bundler-default': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
'@parcel/compressor-raw': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/compressor-raw': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
'@parcel/core': 2.12.0(@swc/helpers@0.5.12)
|
'@parcel/core': 2.12.0(@swc/helpers@0.5.12)
|
||||||
'@parcel/namer-default': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/namer-default': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
'@parcel/optimizer-css': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/optimizer-css': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
'@parcel/optimizer-htmlnano': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)(postcss@8.4.41)(typescript@5.5.4)
|
'@parcel/optimizer-htmlnano': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(postcss@8.4.41)(typescript@5.5.4)
|
||||||
'@parcel/optimizer-image': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/optimizer-image': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
'@parcel/optimizer-svgo': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/optimizer-svgo': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
'@parcel/optimizer-swc': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/optimizer-swc': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
||||||
'@parcel/packager-css': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/packager-css': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
'@parcel/packager-html': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/packager-html': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
'@parcel/packager-js': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/packager-js': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
'@parcel/packager-raw': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/packager-raw': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
'@parcel/packager-svg': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/packager-svg': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
'@parcel/packager-wasm': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/packager-wasm': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
'@parcel/reporter-dev-server': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/reporter-dev-server': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
'@parcel/resolver-default': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/resolver-default': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
'@parcel/runtime-browser-hmr': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/runtime-browser-hmr': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
'@parcel/runtime-js': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/runtime-js': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
'@parcel/runtime-react-refresh': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/runtime-react-refresh': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
'@parcel/runtime-service-worker': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/runtime-service-worker': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
'@parcel/transformer-babel': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/transformer-babel': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
'@parcel/transformer-css': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/transformer-css': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
'@parcel/transformer-html': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/transformer-html': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
'@parcel/transformer-image': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/transformer-image': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
'@parcel/transformer-js': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
'@parcel/transformer-js': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
'@parcel/transformer-json': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/transformer-json': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
'@parcel/transformer-postcss': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/transformer-postcss': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
'@parcel/transformer-posthtml': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/transformer-posthtml': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
'@parcel/transformer-raw': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/transformer-raw': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
'@parcel/transformer-react-refresh-wrap': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/transformer-react-refresh-wrap': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
'@parcel/transformer-svg': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/transformer-svg': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@swc/helpers'
|
- '@swc/helpers'
|
||||||
- cssnano
|
- cssnano
|
||||||
|
@ -6435,13 +6466,13 @@ snapshots:
|
||||||
'@parcel/graph': 3.2.0
|
'@parcel/graph': 3.2.0
|
||||||
'@parcel/logger': 2.12.0
|
'@parcel/logger': 2.12.0
|
||||||
'@parcel/package-manager': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/package-manager': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
||||||
'@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
'@parcel/profiler': 2.12.0
|
'@parcel/profiler': 2.12.0
|
||||||
'@parcel/rust': 2.12.0
|
'@parcel/rust': 2.12.0
|
||||||
'@parcel/source-map': 2.1.1
|
'@parcel/source-map': 2.1.1
|
||||||
'@parcel/types': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/types': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
||||||
'@parcel/utils': 2.12.0
|
'@parcel/utils': 2.12.0
|
||||||
'@parcel/workers': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/workers': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
abortcontroller-polyfill: 1.7.5
|
abortcontroller-polyfill: 1.7.5
|
||||||
base-x: 3.0.10
|
base-x: 3.0.10
|
||||||
browserslist: 4.23.3
|
browserslist: 4.23.3
|
||||||
|
@ -6469,7 +6500,7 @@ snapshots:
|
||||||
'@parcel/types': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/types': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
||||||
'@parcel/utils': 2.12.0
|
'@parcel/utils': 2.12.0
|
||||||
'@parcel/watcher': 2.4.1
|
'@parcel/watcher': 2.4.1
|
||||||
'@parcel/workers': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/workers': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@swc/helpers'
|
- '@swc/helpers'
|
||||||
|
|
||||||
|
@ -6486,14 +6517,13 @@ snapshots:
|
||||||
dependencies:
|
dependencies:
|
||||||
chalk: 4.1.2
|
chalk: 4.1.2
|
||||||
|
|
||||||
'@parcel/namer-default@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)':
|
'@parcel/namer-default@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@parcel/diagnostic': 2.12.0
|
'@parcel/diagnostic': 2.12.0
|
||||||
'@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
nullthrows: 1.1.1
|
nullthrows: 1.1.1
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@parcel/core'
|
- '@parcel/core'
|
||||||
- '@swc/helpers'
|
|
||||||
|
|
||||||
'@parcel/node-resolver-core@3.3.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))':
|
'@parcel/node-resolver-core@3.3.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))':
|
||||||
dependencies:
|
dependencies:
|
||||||
|
@ -6507,10 +6537,10 @@ snapshots:
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@parcel/core'
|
- '@parcel/core'
|
||||||
|
|
||||||
'@parcel/optimizer-css@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)':
|
'@parcel/optimizer-css@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@parcel/diagnostic': 2.12.0
|
'@parcel/diagnostic': 2.12.0
|
||||||
'@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
'@parcel/source-map': 2.1.1
|
'@parcel/source-map': 2.1.1
|
||||||
'@parcel/utils': 2.12.0
|
'@parcel/utils': 2.12.0
|
||||||
browserslist: 4.23.3
|
browserslist: 4.23.3
|
||||||
|
@ -6518,18 +6548,16 @@ snapshots:
|
||||||
nullthrows: 1.1.1
|
nullthrows: 1.1.1
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@parcel/core'
|
- '@parcel/core'
|
||||||
- '@swc/helpers'
|
|
||||||
|
|
||||||
'@parcel/optimizer-htmlnano@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)(postcss@8.4.41)(typescript@5.5.4)':
|
'@parcel/optimizer-htmlnano@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(postcss@8.4.41)(typescript@5.5.4)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
htmlnano: 2.1.1(postcss@8.4.41)(svgo@2.8.0)(typescript@5.5.4)
|
htmlnano: 2.1.1(postcss@8.4.41)(svgo@2.8.0)(typescript@5.5.4)
|
||||||
nullthrows: 1.1.1
|
nullthrows: 1.1.1
|
||||||
posthtml: 0.16.6
|
posthtml: 0.16.6
|
||||||
svgo: 2.8.0
|
svgo: 2.8.0
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@parcel/core'
|
- '@parcel/core'
|
||||||
- '@swc/helpers'
|
|
||||||
- cssnano
|
- cssnano
|
||||||
- postcss
|
- postcss
|
||||||
- purgecss
|
- purgecss
|
||||||
|
@ -6539,31 +6567,28 @@ snapshots:
|
||||||
- typescript
|
- typescript
|
||||||
- uncss
|
- uncss
|
||||||
|
|
||||||
'@parcel/optimizer-image@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)':
|
'@parcel/optimizer-image@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@parcel/core': 2.12.0(@swc/helpers@0.5.12)
|
'@parcel/core': 2.12.0(@swc/helpers@0.5.12)
|
||||||
'@parcel/diagnostic': 2.12.0
|
'@parcel/diagnostic': 2.12.0
|
||||||
'@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
'@parcel/rust': 2.12.0
|
'@parcel/rust': 2.12.0
|
||||||
'@parcel/utils': 2.12.0
|
'@parcel/utils': 2.12.0
|
||||||
'@parcel/workers': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/workers': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
transitivePeerDependencies:
|
|
||||||
- '@swc/helpers'
|
|
||||||
|
|
||||||
'@parcel/optimizer-svgo@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)':
|
'@parcel/optimizer-svgo@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@parcel/diagnostic': 2.12.0
|
'@parcel/diagnostic': 2.12.0
|
||||||
'@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
'@parcel/utils': 2.12.0
|
'@parcel/utils': 2.12.0
|
||||||
svgo: 2.8.0
|
svgo: 2.8.0
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@parcel/core'
|
- '@parcel/core'
|
||||||
- '@swc/helpers'
|
|
||||||
|
|
||||||
'@parcel/optimizer-swc@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)':
|
'@parcel/optimizer-swc@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@parcel/diagnostic': 2.12.0
|
'@parcel/diagnostic': 2.12.0
|
||||||
'@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
'@parcel/source-map': 2.1.1
|
'@parcel/source-map': 2.1.1
|
||||||
'@parcel/utils': 2.12.0
|
'@parcel/utils': 2.12.0
|
||||||
'@swc/core': 1.7.11(@swc/helpers@0.5.12)
|
'@swc/core': 1.7.11(@swc/helpers@0.5.12)
|
||||||
|
@ -6581,39 +6606,37 @@ snapshots:
|
||||||
'@parcel/node-resolver-core': 3.3.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
'@parcel/node-resolver-core': 3.3.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
'@parcel/types': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/types': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
||||||
'@parcel/utils': 2.12.0
|
'@parcel/utils': 2.12.0
|
||||||
'@parcel/workers': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/workers': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
'@swc/core': 1.7.11(@swc/helpers@0.5.12)
|
'@swc/core': 1.7.11(@swc/helpers@0.5.12)
|
||||||
semver: 7.6.3
|
semver: 7.6.3
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@swc/helpers'
|
- '@swc/helpers'
|
||||||
|
|
||||||
'@parcel/packager-css@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)':
|
'@parcel/packager-css@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@parcel/diagnostic': 2.12.0
|
'@parcel/diagnostic': 2.12.0
|
||||||
'@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
'@parcel/source-map': 2.1.1
|
'@parcel/source-map': 2.1.1
|
||||||
'@parcel/utils': 2.12.0
|
'@parcel/utils': 2.12.0
|
||||||
lightningcss: 1.26.0
|
lightningcss: 1.26.0
|
||||||
nullthrows: 1.1.1
|
nullthrows: 1.1.1
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@parcel/core'
|
- '@parcel/core'
|
||||||
- '@swc/helpers'
|
|
||||||
|
|
||||||
'@parcel/packager-html@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)':
|
'@parcel/packager-html@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
'@parcel/types': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/types': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
||||||
'@parcel/utils': 2.12.0
|
'@parcel/utils': 2.12.0
|
||||||
nullthrows: 1.1.1
|
nullthrows: 1.1.1
|
||||||
posthtml: 0.16.6
|
posthtml: 0.16.6
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@parcel/core'
|
- '@parcel/core'
|
||||||
- '@swc/helpers'
|
|
||||||
|
|
||||||
'@parcel/packager-js@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)':
|
'@parcel/packager-js@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@parcel/diagnostic': 2.12.0
|
'@parcel/diagnostic': 2.12.0
|
||||||
'@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
'@parcel/rust': 2.12.0
|
'@parcel/rust': 2.12.0
|
||||||
'@parcel/source-map': 2.1.1
|
'@parcel/source-map': 2.1.1
|
||||||
'@parcel/types': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/types': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
||||||
|
@ -6622,38 +6645,33 @@ snapshots:
|
||||||
nullthrows: 1.1.1
|
nullthrows: 1.1.1
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@parcel/core'
|
- '@parcel/core'
|
||||||
- '@swc/helpers'
|
|
||||||
|
|
||||||
'@parcel/packager-raw@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)':
|
'@parcel/packager-raw@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@parcel/core'
|
- '@parcel/core'
|
||||||
- '@swc/helpers'
|
|
||||||
|
|
||||||
'@parcel/packager-svg@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)':
|
'@parcel/packager-svg@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
'@parcel/types': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/types': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
||||||
'@parcel/utils': 2.12.0
|
'@parcel/utils': 2.12.0
|
||||||
posthtml: 0.16.6
|
posthtml: 0.16.6
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@parcel/core'
|
- '@parcel/core'
|
||||||
- '@swc/helpers'
|
|
||||||
|
|
||||||
'@parcel/packager-wasm@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)':
|
'@parcel/packager-wasm@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@parcel/core'
|
- '@parcel/core'
|
||||||
- '@swc/helpers'
|
|
||||||
|
|
||||||
'@parcel/plugin@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)':
|
'@parcel/plugin@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@parcel/types': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/types': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@parcel/core'
|
- '@parcel/core'
|
||||||
- '@swc/helpers'
|
|
||||||
|
|
||||||
'@parcel/profiler@2.12.0':
|
'@parcel/profiler@2.12.0':
|
||||||
dependencies:
|
dependencies:
|
||||||
|
@ -6661,79 +6679,71 @@ snapshots:
|
||||||
'@parcel/events': 2.12.0
|
'@parcel/events': 2.12.0
|
||||||
chrome-trace-event: 1.0.4
|
chrome-trace-event: 1.0.4
|
||||||
|
|
||||||
'@parcel/reporter-cli@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)':
|
'@parcel/reporter-cli@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
'@parcel/types': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/types': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
||||||
'@parcel/utils': 2.12.0
|
'@parcel/utils': 2.12.0
|
||||||
chalk: 4.1.2
|
chalk: 4.1.2
|
||||||
term-size: 2.2.1
|
term-size: 2.2.1
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@parcel/core'
|
- '@parcel/core'
|
||||||
- '@swc/helpers'
|
|
||||||
|
|
||||||
'@parcel/reporter-dev-server@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)':
|
'@parcel/reporter-dev-server@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
'@parcel/utils': 2.12.0
|
'@parcel/utils': 2.12.0
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@parcel/core'
|
- '@parcel/core'
|
||||||
- '@swc/helpers'
|
|
||||||
|
|
||||||
'@parcel/reporter-tracer@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)':
|
'@parcel/reporter-tracer@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
'@parcel/utils': 2.12.0
|
'@parcel/utils': 2.12.0
|
||||||
chrome-trace-event: 1.0.4
|
chrome-trace-event: 1.0.4
|
||||||
nullthrows: 1.1.1
|
nullthrows: 1.1.1
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@parcel/core'
|
- '@parcel/core'
|
||||||
- '@swc/helpers'
|
|
||||||
|
|
||||||
'@parcel/resolver-default@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)':
|
'@parcel/resolver-default@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@parcel/node-resolver-core': 3.3.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
'@parcel/node-resolver-core': 3.3.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
'@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@parcel/core'
|
- '@parcel/core'
|
||||||
- '@swc/helpers'
|
|
||||||
|
|
||||||
'@parcel/runtime-browser-hmr@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)':
|
'@parcel/runtime-browser-hmr@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
'@parcel/utils': 2.12.0
|
'@parcel/utils': 2.12.0
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@parcel/core'
|
- '@parcel/core'
|
||||||
- '@swc/helpers'
|
|
||||||
|
|
||||||
'@parcel/runtime-js@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)':
|
'@parcel/runtime-js@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@parcel/diagnostic': 2.12.0
|
'@parcel/diagnostic': 2.12.0
|
||||||
'@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
'@parcel/utils': 2.12.0
|
'@parcel/utils': 2.12.0
|
||||||
nullthrows: 1.1.1
|
nullthrows: 1.1.1
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@parcel/core'
|
- '@parcel/core'
|
||||||
- '@swc/helpers'
|
|
||||||
|
|
||||||
'@parcel/runtime-react-refresh@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)':
|
'@parcel/runtime-react-refresh@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
'@parcel/utils': 2.12.0
|
'@parcel/utils': 2.12.0
|
||||||
react-error-overlay: 6.0.9
|
react-error-overlay: 6.0.9
|
||||||
react-refresh: 0.9.0
|
react-refresh: 0.9.0
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@parcel/core'
|
- '@parcel/core'
|
||||||
- '@swc/helpers'
|
|
||||||
|
|
||||||
'@parcel/runtime-service-worker@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)':
|
'@parcel/runtime-service-worker@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
'@parcel/utils': 2.12.0
|
'@parcel/utils': 2.12.0
|
||||||
nullthrows: 1.1.1
|
nullthrows: 1.1.1
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@parcel/core'
|
- '@parcel/core'
|
||||||
- '@swc/helpers'
|
|
||||||
|
|
||||||
'@parcel/rust@2.12.0': {}
|
'@parcel/rust@2.12.0': {}
|
||||||
|
|
||||||
|
@ -6741,10 +6751,10 @@ snapshots:
|
||||||
dependencies:
|
dependencies:
|
||||||
detect-libc: 1.0.3
|
detect-libc: 1.0.3
|
||||||
|
|
||||||
'@parcel/transformer-babel@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)':
|
'@parcel/transformer-babel@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@parcel/diagnostic': 2.12.0
|
'@parcel/diagnostic': 2.12.0
|
||||||
'@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
'@parcel/source-map': 2.1.1
|
'@parcel/source-map': 2.1.1
|
||||||
'@parcel/utils': 2.12.0
|
'@parcel/utils': 2.12.0
|
||||||
browserslist: 4.23.3
|
browserslist: 4.23.3
|
||||||
|
@ -6753,12 +6763,11 @@ snapshots:
|
||||||
semver: 7.6.3
|
semver: 7.6.3
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@parcel/core'
|
- '@parcel/core'
|
||||||
- '@swc/helpers'
|
|
||||||
|
|
||||||
'@parcel/transformer-css@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)':
|
'@parcel/transformer-css@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@parcel/diagnostic': 2.12.0
|
'@parcel/diagnostic': 2.12.0
|
||||||
'@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
'@parcel/source-map': 2.1.1
|
'@parcel/source-map': 2.1.1
|
||||||
'@parcel/utils': 2.12.0
|
'@parcel/utils': 2.12.0
|
||||||
browserslist: 4.23.3
|
browserslist: 4.23.3
|
||||||
|
@ -6766,12 +6775,11 @@ snapshots:
|
||||||
nullthrows: 1.1.1
|
nullthrows: 1.1.1
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@parcel/core'
|
- '@parcel/core'
|
||||||
- '@swc/helpers'
|
|
||||||
|
|
||||||
'@parcel/transformer-html@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)':
|
'@parcel/transformer-html@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@parcel/diagnostic': 2.12.0
|
'@parcel/diagnostic': 2.12.0
|
||||||
'@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
'@parcel/rust': 2.12.0
|
'@parcel/rust': 2.12.0
|
||||||
nullthrows: 1.1.1
|
nullthrows: 1.1.1
|
||||||
posthtml: 0.16.6
|
posthtml: 0.16.6
|
||||||
|
@ -6781,45 +6789,41 @@ snapshots:
|
||||||
srcset: 4.0.0
|
srcset: 4.0.0
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@parcel/core'
|
- '@parcel/core'
|
||||||
- '@swc/helpers'
|
|
||||||
|
|
||||||
'@parcel/transformer-image@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)':
|
'@parcel/transformer-image@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@parcel/core': 2.12.0(@swc/helpers@0.5.12)
|
'@parcel/core': 2.12.0(@swc/helpers@0.5.12)
|
||||||
'@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
'@parcel/utils': 2.12.0
|
'@parcel/utils': 2.12.0
|
||||||
'@parcel/workers': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/workers': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
nullthrows: 1.1.1
|
nullthrows: 1.1.1
|
||||||
transitivePeerDependencies:
|
|
||||||
- '@swc/helpers'
|
|
||||||
|
|
||||||
'@parcel/transformer-js@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))':
|
'@parcel/transformer-js@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@parcel/core': 2.12.0(@swc/helpers@0.5.12)
|
'@parcel/core': 2.12.0(@swc/helpers@0.5.12)
|
||||||
'@parcel/diagnostic': 2.12.0
|
'@parcel/diagnostic': 2.12.0
|
||||||
'@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
'@parcel/rust': 2.12.0
|
'@parcel/rust': 2.12.0
|
||||||
'@parcel/source-map': 2.1.1
|
'@parcel/source-map': 2.1.1
|
||||||
'@parcel/utils': 2.12.0
|
'@parcel/utils': 2.12.0
|
||||||
'@parcel/workers': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/workers': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
'@swc/helpers': 0.5.12
|
'@swc/helpers': 0.5.12
|
||||||
browserslist: 4.23.3
|
browserslist: 4.23.3
|
||||||
nullthrows: 1.1.1
|
nullthrows: 1.1.1
|
||||||
regenerator-runtime: 0.13.11
|
regenerator-runtime: 0.13.11
|
||||||
semver: 7.6.3
|
semver: 7.6.3
|
||||||
|
|
||||||
'@parcel/transformer-json@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)':
|
'@parcel/transformer-json@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
json5: 2.2.3
|
json5: 2.2.3
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@parcel/core'
|
- '@parcel/core'
|
||||||
- '@swc/helpers'
|
|
||||||
|
|
||||||
'@parcel/transformer-postcss@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)':
|
'@parcel/transformer-postcss@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@parcel/diagnostic': 2.12.0
|
'@parcel/diagnostic': 2.12.0
|
||||||
'@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
'@parcel/rust': 2.12.0
|
'@parcel/rust': 2.12.0
|
||||||
'@parcel/utils': 2.12.0
|
'@parcel/utils': 2.12.0
|
||||||
clone: 2.1.2
|
clone: 2.1.2
|
||||||
|
@ -6828,11 +6832,10 @@ snapshots:
|
||||||
semver: 7.6.3
|
semver: 7.6.3
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@parcel/core'
|
- '@parcel/core'
|
||||||
- '@swc/helpers'
|
|
||||||
|
|
||||||
'@parcel/transformer-posthtml@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)':
|
'@parcel/transformer-posthtml@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
'@parcel/utils': 2.12.0
|
'@parcel/utils': 2.12.0
|
||||||
nullthrows: 1.1.1
|
nullthrows: 1.1.1
|
||||||
posthtml: 0.16.6
|
posthtml: 0.16.6
|
||||||
|
@ -6841,28 +6844,25 @@ snapshots:
|
||||||
semver: 7.6.3
|
semver: 7.6.3
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@parcel/core'
|
- '@parcel/core'
|
||||||
- '@swc/helpers'
|
|
||||||
|
|
||||||
'@parcel/transformer-raw@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)':
|
'@parcel/transformer-raw@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@parcel/core'
|
- '@parcel/core'
|
||||||
- '@swc/helpers'
|
|
||||||
|
|
||||||
'@parcel/transformer-react-refresh-wrap@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)':
|
'@parcel/transformer-react-refresh-wrap@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
'@parcel/utils': 2.12.0
|
'@parcel/utils': 2.12.0
|
||||||
react-refresh: 0.9.0
|
react-refresh: 0.9.0
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@parcel/core'
|
- '@parcel/core'
|
||||||
- '@swc/helpers'
|
|
||||||
|
|
||||||
'@parcel/transformer-svg@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)':
|
'@parcel/transformer-svg@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@parcel/diagnostic': 2.12.0
|
'@parcel/diagnostic': 2.12.0
|
||||||
'@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/plugin': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
'@parcel/rust': 2.12.0
|
'@parcel/rust': 2.12.0
|
||||||
nullthrows: 1.1.1
|
nullthrows: 1.1.1
|
||||||
posthtml: 0.16.6
|
posthtml: 0.16.6
|
||||||
|
@ -6871,7 +6871,6 @@ snapshots:
|
||||||
semver: 7.6.3
|
semver: 7.6.3
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@parcel/core'
|
- '@parcel/core'
|
||||||
- '@swc/helpers'
|
|
||||||
|
|
||||||
'@parcel/types@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)':
|
'@parcel/types@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)':
|
||||||
dependencies:
|
dependencies:
|
||||||
|
@ -6880,7 +6879,7 @@ snapshots:
|
||||||
'@parcel/fs': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/fs': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
||||||
'@parcel/package-manager': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/package-manager': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
||||||
'@parcel/source-map': 2.1.1
|
'@parcel/source-map': 2.1.1
|
||||||
'@parcel/workers': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/workers': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
utility-types: 3.11.0
|
utility-types: 3.11.0
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@parcel/core'
|
- '@parcel/core'
|
||||||
|
@ -6953,7 +6952,7 @@ snapshots:
|
||||||
'@parcel/watcher-win32-ia32': 2.4.1
|
'@parcel/watcher-win32-ia32': 2.4.1
|
||||||
'@parcel/watcher-win32-x64': 2.4.1
|
'@parcel/watcher-win32-x64': 2.4.1
|
||||||
|
|
||||||
'@parcel/workers@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)':
|
'@parcel/workers@2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@parcel/core': 2.12.0(@swc/helpers@0.5.12)
|
'@parcel/core': 2.12.0(@swc/helpers@0.5.12)
|
||||||
'@parcel/diagnostic': 2.12.0
|
'@parcel/diagnostic': 2.12.0
|
||||||
|
@ -6962,8 +6961,6 @@ snapshots:
|
||||||
'@parcel/types': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/types': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
||||||
'@parcel/utils': 2.12.0
|
'@parcel/utils': 2.12.0
|
||||||
nullthrows: 1.1.1
|
nullthrows: 1.1.1
|
||||||
transitivePeerDependencies:
|
|
||||||
- '@swc/helpers'
|
|
||||||
|
|
||||||
'@pkgr/core@0.1.1': {}
|
'@pkgr/core@0.1.1': {}
|
||||||
|
|
||||||
|
@ -10531,9 +10528,9 @@ snapshots:
|
||||||
'@parcel/fs': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/fs': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
||||||
'@parcel/logger': 2.12.0
|
'@parcel/logger': 2.12.0
|
||||||
'@parcel/package-manager': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/package-manager': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
||||||
'@parcel/reporter-cli': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/reporter-cli': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
'@parcel/reporter-dev-server': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/reporter-dev-server': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
'@parcel/reporter-tracer': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))(@swc/helpers@0.5.12)
|
'@parcel/reporter-tracer': 2.12.0(@parcel/core@2.12.0(@swc/helpers@0.5.12))
|
||||||
'@parcel/utils': 2.12.0
|
'@parcel/utils': 2.12.0
|
||||||
chalk: 4.1.2
|
chalk: 4.1.2
|
||||||
commander: 7.2.0
|
commander: 7.2.0
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import { execRootSync } from "admina"
|
import { execRootSync } from "admina"
|
||||||
|
import { addAptKeyViaDownload, installAptPack } from "setup-apt"
|
||||||
import { hasDnf } from "../utils/env/hasDnf.js"
|
import { hasDnf } from "../utils/env/hasDnf.js"
|
||||||
import { isArch } from "../utils/env/isArch.js"
|
import { isArch } from "../utils/env/isArch.js"
|
||||||
import { isUbuntu } from "../utils/env/isUbuntu.js"
|
import { isUbuntu } from "../utils/env/isUbuntu.js"
|
||||||
import { addAptKeyViaDownload, setupAptPack } from "../utils/setup/setupAptPack.js"
|
|
||||||
import { setupBrewPack } from "../utils/setup/setupBrewPack.js"
|
import { setupBrewPack } from "../utils/setup/setupBrewPack.js"
|
||||||
import { setupChocoPack } from "../utils/setup/setupChocoPack.js"
|
import { setupChocoPack } from "../utils/setup/setupChocoPack.js"
|
||||||
import { setupDnfPack } from "../utils/setup/setupDnfPack.js"
|
import { setupDnfPack } from "../utils/setup/setupDnfPack.js"
|
||||||
|
@ -36,7 +36,7 @@ export async function setupBazel(version: string, _setupDir: string, _arch: stri
|
||||||
"-c",
|
"-c",
|
||||||
`echo "deb [arch=amd64 signed-by=${keyFileName}] https://storage.googleapis.com/bazel-apt stable jdk1.8" | tee /etc/apt/sources.list.d/bazel.list`,
|
`echo "deb [arch=amd64 signed-by=${keyFileName}] https://storage.googleapis.com/bazel-apt stable jdk1.8" | tee /etc/apt/sources.list.d/bazel.list`,
|
||||||
])
|
])
|
||||||
return setupAptPack([{ name: "bazel", version }], true)
|
return installAptPack([{ name: "bazel", version }], true)
|
||||||
}
|
}
|
||||||
throw new Error("Unsupported linux distribution")
|
throw new Error("Unsupported linux distribution")
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
import { installAptPack } from "setup-apt"
|
||||||
import { hasDnf } from "../utils/env/hasDnf.js"
|
import { hasDnf } from "../utils/env/hasDnf.js"
|
||||||
import { isArch } from "../utils/env/isArch.js"
|
import { isArch } from "../utils/env/isArch.js"
|
||||||
import { isUbuntu } from "../utils/env/isUbuntu.js"
|
import { isUbuntu } from "../utils/env/isUbuntu.js"
|
||||||
import { setupAptPack } from "../utils/setup/setupAptPack.js"
|
|
||||||
import { setupBrewPack } from "../utils/setup/setupBrewPack.js"
|
import { setupBrewPack } from "../utils/setup/setupBrewPack.js"
|
||||||
import { setupChocoPack } from "../utils/setup/setupChocoPack.js"
|
import { setupChocoPack } from "../utils/setup/setupChocoPack.js"
|
||||||
import { setupDnfPack } from "../utils/setup/setupDnfPack.js"
|
import { setupDnfPack } from "../utils/setup/setupDnfPack.js"
|
||||||
|
@ -22,7 +22,7 @@ export function setupCcache(version: string, _setupDir: string, _arch: string) {
|
||||||
} else if (hasDnf()) {
|
} else if (hasDnf()) {
|
||||||
return setupDnfPack([{ name: "ccache", version }])
|
return setupDnfPack([{ name: "ccache", version }])
|
||||||
} else if (isUbuntu()) {
|
} else if (isUbuntu()) {
|
||||||
return setupAptPack([{ name: "ccache", version }])
|
return installAptPack([{ name: "ccache", version }])
|
||||||
}
|
}
|
||||||
throw new Error("Unsupported linux distribution")
|
throw new Error("Unsupported linux distribution")
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { addPath } from "os-env"
|
import { addPath } from "os-env"
|
||||||
|
import { installAptPack } from "setup-apt"
|
||||||
import { rcOptions } from "../cli-options.js"
|
import { rcOptions } from "../cli-options.js"
|
||||||
import { hasDnf } from "../utils/env/hasDnf.js"
|
import { hasDnf } from "../utils/env/hasDnf.js"
|
||||||
import { isArch } from "../utils/env/isArch.js"
|
import { isArch } from "../utils/env/isArch.js"
|
||||||
import { isUbuntu } from "../utils/env/isUbuntu.js"
|
import { isUbuntu } from "../utils/env/isUbuntu.js"
|
||||||
import { setupAptPack } from "../utils/setup/setupAptPack.js"
|
|
||||||
import { setupBrewPack } from "../utils/setup/setupBrewPack.js"
|
import { setupBrewPack } from "../utils/setup/setupBrewPack.js"
|
||||||
import { setupChocoPack } from "../utils/setup/setupChocoPack.js"
|
import { setupChocoPack } from "../utils/setup/setupChocoPack.js"
|
||||||
import { setupDnfPack } from "../utils/setup/setupDnfPack.js"
|
import { setupDnfPack } from "../utils/setup/setupDnfPack.js"
|
||||||
|
@ -26,7 +26,7 @@ export async function setupCppcheck(version: string | undefined, _setupDir: stri
|
||||||
} else if (hasDnf()) {
|
} else if (hasDnf()) {
|
||||||
return setupDnfPack([{ name: "ccache", version }])
|
return setupDnfPack([{ name: "ccache", version }])
|
||||||
} else if (isUbuntu()) {
|
} else if (isUbuntu()) {
|
||||||
return setupAptPack([{ name: "cppcheck", version }])
|
return installAptPack([{ name: "cppcheck", version }])
|
||||||
}
|
}
|
||||||
throw new Error("Unsupported linux distribution")
|
throw new Error("Unsupported linux distribution")
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { info, notice } from "ci-log"
|
import { info, notice } from "ci-log"
|
||||||
import { addPath } from "os-env"
|
import { addPath } from "os-env"
|
||||||
import { addExeExt, join } from "patha"
|
import { addExeExt, join } from "patha"
|
||||||
|
import { installAptPack } from "setup-apt"
|
||||||
import { setupGraphviz } from "../graphviz/graphviz.js"
|
import { setupGraphviz } from "../graphviz/graphviz.js"
|
||||||
import { extractTar, extractZip } from "../utils/setup/extract.js"
|
import { extractTar, extractZip } from "../utils/setup/extract.js"
|
||||||
import { setupAptPack } from "../utils/setup/setupAptPack.js"
|
|
||||||
import { type InstallationInfo, type PackageInfo, setupBin } from "../utils/setup/setupBin.js"
|
import { type InstallationInfo, type PackageInfo, setupBin } from "../utils/setup/setupBin.js"
|
||||||
import { setupBrewPack } from "../utils/setup/setupBrewPack.js"
|
import { setupBrewPack } from "../utils/setup/setupBrewPack.js"
|
||||||
import { setupChocoPack } from "../utils/setup/setupChocoPack.js"
|
import { setupChocoPack } from "../utils/setup/setupChocoPack.js"
|
||||||
|
@ -97,7 +97,7 @@ export async function setupDoxygen(version: string, setupDir: string, arch: stri
|
||||||
} else if (hasDnf()) {
|
} else if (hasDnf()) {
|
||||||
return setupDnfPack([{ name: "doxygen", version }])
|
return setupDnfPack([{ name: "doxygen", version }])
|
||||||
} else if (isUbuntu()) {
|
} else if (isUbuntu()) {
|
||||||
installationInfo = await setupAptPack([{ name: "doxygen", version }])
|
installationInfo = await installAptPack([{ name: "doxygen", version }])
|
||||||
} else {
|
} else {
|
||||||
throw new Error("Unsupported linux distributions")
|
throw new Error("Unsupported linux distributions")
|
||||||
}
|
}
|
||||||
|
@ -106,13 +106,13 @@ export async function setupDoxygen(version: string, setupDir: string, arch: stri
|
||||||
// doxygen on stable Ubuntu repositories is very old. So, we use get the binary from the website itself
|
// doxygen on stable Ubuntu repositories is very old. So, we use get the binary from the website itself
|
||||||
installationInfo = await setupBin("doxygen", version, getDoxygenPackageInfo, setupDir, arch)
|
installationInfo = await setupBin("doxygen", version, getDoxygenPackageInfo, setupDir, arch)
|
||||||
try {
|
try {
|
||||||
await setupAptPack([{ name: "libclang-cpp9" }])
|
await installAptPack([{ name: "libclang-cpp9" }])
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
info(`Failed to download libclang-cpp9 that might be needed for running doxygen. ${err}`)
|
info(`Failed to download libclang-cpp9 that might be needed for running doxygen. ${err}`)
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
notice(`Failed to download doxygen binary. ${err}. Falling back to apt-get.`)
|
notice(`Failed to download doxygen binary. ${err}. Falling back to apt-get.`)
|
||||||
installationInfo = await setupAptPack([{ name: "doxygen" }])
|
installationInfo = await installAptPack([{ name: "doxygen" }])
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new Error("Unsupported linux distributions")
|
throw new Error("Unsupported linux distributions")
|
||||||
|
|
|
@ -7,13 +7,13 @@ import { pathExists } from "path-exists"
|
||||||
import { addExeExt, join } from "patha"
|
import { addExeExt, join } from "patha"
|
||||||
import semverCoerce from "semver/functions/coerce"
|
import semverCoerce from "semver/functions/coerce"
|
||||||
import semverMajor from "semver/functions/major"
|
import semverMajor from "semver/functions/major"
|
||||||
|
import { installAptPack, updateAptAlternatives } from "setup-apt"
|
||||||
import { rcOptions } from "../cli-options.js"
|
import { rcOptions } from "../cli-options.js"
|
||||||
import { setupMacOSSDK } from "../macos-sdk/macos-sdk.js"
|
import { setupMacOSSDK } from "../macos-sdk/macos-sdk.js"
|
||||||
import { hasDnf } from "../utils/env/hasDnf.js"
|
import { hasDnf } from "../utils/env/hasDnf.js"
|
||||||
import { isArch } from "../utils/env/isArch.js"
|
import { isArch } from "../utils/env/isArch.js"
|
||||||
import { isUbuntu } from "../utils/env/isUbuntu.js"
|
import { isUbuntu } from "../utils/env/isUbuntu.js"
|
||||||
import { extract7Zip } from "../utils/setup/extract.js"
|
import { extract7Zip } from "../utils/setup/extract.js"
|
||||||
import { setupAptPack, updateAptAlternatives } from "../utils/setup/setupAptPack.js"
|
|
||||||
import { type InstallationInfo, type PackageInfo, setupBin } from "../utils/setup/setupBin.js"
|
import { type InstallationInfo, type PackageInfo, setupBin } from "../utils/setup/setupBin.js"
|
||||||
import { setupBrewPack } from "../utils/setup/setupBrewPack.js"
|
import { setupBrewPack } from "../utils/setup/setupBrewPack.js"
|
||||||
import { setupChocoPack } from "../utils/setup/setupChocoPack.js"
|
import { setupChocoPack } from "../utils/setup/setupChocoPack.js"
|
||||||
|
@ -110,7 +110,7 @@ export async function setupGcc(version: string, setupDir: string, arch: string,
|
||||||
{ name: "libstdc++-devel" },
|
{ name: "libstdc++-devel" },
|
||||||
])
|
])
|
||||||
} else if (isUbuntu()) {
|
} else if (isUbuntu()) {
|
||||||
installationInfo = await setupAptPack([
|
installationInfo = await installAptPack([
|
||||||
{ name: "gcc", version, repositories: ["ppa:ubuntu-toolchain-r/test"] },
|
{ name: "gcc", version, repositories: ["ppa:ubuntu-toolchain-r/test"] },
|
||||||
{ name: "g++", version, repositories: ["ppa:ubuntu-toolchain-r/test"] },
|
{ name: "g++", version, repositories: ["ppa:ubuntu-toolchain-r/test"] },
|
||||||
])
|
])
|
||||||
|
@ -120,7 +120,7 @@ export async function setupGcc(version: string, setupDir: string, arch: string,
|
||||||
if (isArch()) {
|
if (isArch()) {
|
||||||
await setupPacmanPack("gcc-multilib", version)
|
await setupPacmanPack("gcc-multilib", version)
|
||||||
} else if (isUbuntu()) {
|
} else if (isUbuntu()) {
|
||||||
await setupAptPack([{ name: "gcc-multilib", version, repositories: ["ppa:ubuntu-toolchain-r/test"] }])
|
await installAptPack([{ name: "gcc-multilib", version, repositories: ["ppa:ubuntu-toolchain-r/test"] }])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
|
@ -129,7 +129,7 @@ export async function setupGcc(version: string, setupDir: string, arch: string,
|
||||||
// TODO support abi
|
// TODO support abi
|
||||||
// case "none": {
|
// case "none": {
|
||||||
// if (arch === "arm" || arch === "arm64") {
|
// if (arch === "arm" || arch === "arm64") {
|
||||||
// return setupAptPack("gcc-arm-none-eabi", version, [
|
// return installAptPack("gcc-arm-none-eabi", version, [
|
||||||
// "ppa:ubuntu-toolchain-r/test",
|
// "ppa:ubuntu-toolchain-r/test",
|
||||||
// ])
|
// ])
|
||||||
// } else {
|
// } else {
|
||||||
|
@ -161,7 +161,7 @@ export async function setupMingw(version: string, setupDir: string, arch: string
|
||||||
} else if (hasDnf()) {
|
} else if (hasDnf()) {
|
||||||
installationInfo = await setupDnfPack([{ name: "mingw64-gcc", version }])
|
installationInfo = await setupDnfPack([{ name: "mingw64-gcc", version }])
|
||||||
} else if (isUbuntu()) {
|
} else if (isUbuntu()) {
|
||||||
installationInfo = await setupAptPack([
|
installationInfo = await installAptPack([
|
||||||
{ name: "mingw-w64", version, repositories: ["ppa:ubuntu-toolchain-r/test"] },
|
{ name: "mingw-w64", version, repositories: ["ppa:ubuntu-toolchain-r/test"] },
|
||||||
])
|
])
|
||||||
}
|
}
|
||||||
|
@ -231,10 +231,10 @@ async function activateGcc(version: string, binDir: string, priority: number = 4
|
||||||
|
|
||||||
if (isUbuntu()) {
|
if (isUbuntu()) {
|
||||||
promises.push(
|
promises.push(
|
||||||
updateAptAlternatives("cc", `${binDir}/gcc-${majorVersion}`, rcOptions.rcPath, priority),
|
updateAptAlternatives("cc", `${binDir}/gcc-${majorVersion}`, rcOptions, priority),
|
||||||
updateAptAlternatives("cxx", `${binDir}/g++-${majorVersion}`, rcOptions.rcPath, priority),
|
updateAptAlternatives("cxx", `${binDir}/g++-${majorVersion}`, rcOptions, priority),
|
||||||
updateAptAlternatives("gcc", `${binDir}/gcc-${majorVersion}`, rcOptions.rcPath, priority),
|
updateAptAlternatives("gcc", `${binDir}/gcc-${majorVersion}`, rcOptions, priority),
|
||||||
updateAptAlternatives("g++", `${binDir}/g++-${majorVersion}`, rcOptions.rcPath, priority),
|
updateAptAlternatives("g++", `${binDir}/g++-${majorVersion}`, rcOptions, priority),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -245,10 +245,10 @@ async function activateGcc(version: string, binDir: string, priority: number = 4
|
||||||
|
|
||||||
if (isUbuntu()) {
|
if (isUbuntu()) {
|
||||||
promises.push(
|
promises.push(
|
||||||
updateAptAlternatives("cc", `${binDir}/gcc-${version}`, rcOptions.rcPath, priority),
|
updateAptAlternatives("cc", `${binDir}/gcc-${version}`, rcOptions, priority),
|
||||||
updateAptAlternatives("cxx", `${binDir}/g++-${version}`, rcOptions.rcPath, priority),
|
updateAptAlternatives("cxx", `${binDir}/g++-${version}`, rcOptions, priority),
|
||||||
updateAptAlternatives("gcc", `${binDir}/gcc-${version}`, rcOptions.rcPath, priority),
|
updateAptAlternatives("gcc", `${binDir}/gcc-${version}`, rcOptions, priority),
|
||||||
updateAptAlternatives("g++", `${binDir}/g++-${version}`, rcOptions.rcPath, priority),
|
updateAptAlternatives("g++", `${binDir}/g++-${version}`, rcOptions, priority),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { addPath } from "os-env"
|
import { addPath } from "os-env"
|
||||||
|
import { installAptPack } from "setup-apt"
|
||||||
import { rcOptions } from "../cli-options.js"
|
import { rcOptions } from "../cli-options.js"
|
||||||
import { hasDnf } from "../utils/env/hasDnf.js"
|
import { hasDnf } from "../utils/env/hasDnf.js"
|
||||||
import { isArch } from "../utils/env/isArch.js"
|
import { isArch } from "../utils/env/isArch.js"
|
||||||
import { isUbuntu } from "../utils/env/isUbuntu.js"
|
import { isUbuntu } from "../utils/env/isUbuntu.js"
|
||||||
import { setupAptPack } from "../utils/setup/setupAptPack.js"
|
|
||||||
import type { InstallationInfo } from "../utils/setup/setupBin.js"
|
import type { InstallationInfo } from "../utils/setup/setupBin.js"
|
||||||
import { setupBrewPack } from "../utils/setup/setupBrewPack.js"
|
import { setupBrewPack } from "../utils/setup/setupBrewPack.js"
|
||||||
import { setupChocoPack } from "../utils/setup/setupChocoPack.js"
|
import { setupChocoPack } from "../utils/setup/setupChocoPack.js"
|
||||||
|
@ -26,7 +26,7 @@ export async function setupGraphviz(version: string, _setupDir: string, _arch: s
|
||||||
} else if (hasDnf()) {
|
} else if (hasDnf()) {
|
||||||
return setupDnfPack([{ name: "graphviz", version }])
|
return setupDnfPack([{ name: "graphviz", version }])
|
||||||
} else if (isUbuntu()) {
|
} else if (isUbuntu()) {
|
||||||
return setupAptPack([{ name: "graphviz", version }])
|
return installAptPack([{ name: "graphviz", version }])
|
||||||
}
|
}
|
||||||
throw new Error("Unsupported linux distribution")
|
throw new Error("Unsupported linux distribution")
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import { info } from "ci-log"
|
import { info } from "ci-log"
|
||||||
import { execa } from "execa"
|
import { execa } from "execa"
|
||||||
import { addExeExt, join } from "patha"
|
import { addExeExt, join } from "patha"
|
||||||
|
import { installAptPack } from "setup-apt"
|
||||||
import { untildifyUser } from "untildify-user"
|
import { untildifyUser } from "untildify-user"
|
||||||
import which from "which"
|
import which from "which"
|
||||||
import { setupCmake } from "../cmake/cmake.js"
|
import { setupCmake } from "../cmake/cmake.js"
|
||||||
|
@ -10,7 +11,6 @@ import { isArch } from "../utils/env/isArch.js"
|
||||||
import { isUbuntu } from "../utils/env/isUbuntu.js"
|
import { isUbuntu } from "../utils/env/isUbuntu.js"
|
||||||
import { ubuntuVersion } from "../utils/env/ubuntu_version.js"
|
import { ubuntuVersion } from "../utils/env/ubuntu_version.js"
|
||||||
import { extractTarByExe } from "../utils/setup/extract.js"
|
import { extractTarByExe } from "../utils/setup/extract.js"
|
||||||
import { setupAptPack } from "../utils/setup/setupAptPack.js"
|
|
||||||
import { type InstallationInfo, type PackageInfo, setupBin } from "../utils/setup/setupBin.js"
|
import { type InstallationInfo, type PackageInfo, setupBin } from "../utils/setup/setupBin.js"
|
||||||
import { setupDnfPack } from "../utils/setup/setupDnfPack.js"
|
import { setupDnfPack } from "../utils/setup/setupDnfPack.js"
|
||||||
import { setupPacmanPack } from "../utils/setup/setupPacmanPack.js"
|
import { setupPacmanPack } from "../utils/setup/setupPacmanPack.js"
|
||||||
|
@ -49,7 +49,7 @@ async function buildKcov(file: string, dest: string) {
|
||||||
} else if (hasDnf()) {
|
} else if (hasDnf()) {
|
||||||
await setupDnfPack([{ name: "libdwarf-devel" }, { name: "libcurl-devel" }])
|
await setupDnfPack([{ name: "libdwarf-devel" }, { name: "libcurl-devel" }])
|
||||||
} else if (isUbuntu()) {
|
} else if (isUbuntu()) {
|
||||||
await setupAptPack([{ name: "libdw-dev" }, { name: "libcurl4-openssl-dev" }])
|
await installAptPack([{ name: "libdw-dev" }, { name: "libcurl4-openssl-dev" }])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -117,7 +117,7 @@ export async function setupKcov(versionGiven: string, setupDir: string, arch: st
|
||||||
} else if (hasDnf()) {
|
} else if (hasDnf()) {
|
||||||
await setupDnfPack([{ name: "binutils" }])
|
await setupDnfPack([{ name: "binutils" }])
|
||||||
} else if (isUbuntu()) {
|
} else if (isUbuntu()) {
|
||||||
await setupAptPack([{ name: "libbinutils" }])
|
await installAptPack([{ name: "libbinutils" }])
|
||||||
}
|
}
|
||||||
return installationInfo
|
return installationInfo
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -5,12 +5,12 @@ import memoize from "micro-memoize"
|
||||||
import { addEnv } from "os-env"
|
import { addEnv } from "os-env"
|
||||||
import { pathExists } from "path-exists"
|
import { pathExists } from "path-exists"
|
||||||
import { addExeExt, join } from "patha"
|
import { addExeExt, join } from "patha"
|
||||||
|
import { installAptPack, updateAptAlternatives } from "setup-apt"
|
||||||
import { rcOptions } from "../cli-options.js"
|
import { rcOptions } from "../cli-options.js"
|
||||||
import { setupGcc } from "../gcc/gcc.js"
|
import { setupGcc } from "../gcc/gcc.js"
|
||||||
import { setupMacOSSDK } from "../macos-sdk/macos-sdk.js"
|
import { setupMacOSSDK } from "../macos-sdk/macos-sdk.js"
|
||||||
import { isUbuntu } from "../utils/env/isUbuntu.js"
|
import { isUbuntu } from "../utils/env/isUbuntu.js"
|
||||||
import { ubuntuVersion } from "../utils/env/ubuntu_version.js"
|
import { ubuntuVersion } from "../utils/env/ubuntu_version.js"
|
||||||
import { setupAptPack, updateAptAlternatives } from "../utils/setup/setupAptPack.js"
|
|
||||||
import { type InstallationInfo, setupBin } from "../utils/setup/setupBin.js"
|
import { type InstallationInfo, setupBin } from "../utils/setup/setupBin.js"
|
||||||
import { semverCoerceIfInvalid } from "../utils/setup/version.js"
|
import { semverCoerceIfInvalid } from "../utils/setup/version.js"
|
||||||
import { getVersion } from "../versions/versions.js"
|
import { getVersion } from "../versions/versions.js"
|
||||||
|
@ -75,9 +75,9 @@ async function setupLLVMOnly(
|
||||||
async function llvmBinaryDeps_raw(majorVersion: number) {
|
async function llvmBinaryDeps_raw(majorVersion: number) {
|
||||||
if (isUbuntu()) {
|
if (isUbuntu()) {
|
||||||
if (majorVersion <= 10) {
|
if (majorVersion <= 10) {
|
||||||
await setupAptPack([{ name: "libtinfo5" }])
|
await installAptPack([{ name: "libtinfo5" }])
|
||||||
} else {
|
} else {
|
||||||
await setupAptPack([{ name: "libtinfo-dev" }])
|
await installAptPack([{ name: "libtinfo-dev" }])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -131,13 +131,13 @@ export async function activateLLVM(directory: string) {
|
||||||
if (isUbuntu()) {
|
if (isUbuntu()) {
|
||||||
const priority = 60
|
const priority = 60
|
||||||
actPromises.push(
|
actPromises.push(
|
||||||
updateAptAlternatives("cc", `${directory}/bin/clang`, rcOptions.rcPath, priority),
|
updateAptAlternatives("cc", `${directory}/bin/clang`, rcOptions, priority),
|
||||||
updateAptAlternatives("cxx", `${directory}/bin/clang++`, rcOptions.rcPath, priority),
|
updateAptAlternatives("cxx", `${directory}/bin/clang++`, rcOptions, priority),
|
||||||
updateAptAlternatives("clang", `${directory}/bin/clang`, rcOptions.rcPath),
|
updateAptAlternatives("clang", `${directory}/bin/clang`, rcOptions),
|
||||||
updateAptAlternatives("clang++", `${directory}/bin/clang++`, rcOptions.rcPath),
|
updateAptAlternatives("clang++", `${directory}/bin/clang++`, rcOptions),
|
||||||
updateAptAlternatives("lld", `${directory}/bin/lld`, rcOptions.rcPath),
|
updateAptAlternatives("lld", `${directory}/bin/lld`, rcOptions),
|
||||||
updateAptAlternatives("ld.lld", `${directory}/bin/ld.lld`, rcOptions.rcPath),
|
updateAptAlternatives("ld.lld", `${directory}/bin/ld.lld`, rcOptions),
|
||||||
updateAptAlternatives("llvm-ar", `${directory}/bin/llvm-ar`, rcOptions.rcPath),
|
updateAptAlternatives("llvm-ar", `${directory}/bin/llvm-ar`, rcOptions),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,9 +3,9 @@ import { execRoot } from "admina"
|
||||||
import { execa } from "execa"
|
import { execa } from "execa"
|
||||||
import { chmod, readFile, writeFile } from "fs/promises"
|
import { chmod, readFile, writeFile } from "fs/promises"
|
||||||
import { addPath } from "os-env"
|
import { addPath } from "os-env"
|
||||||
|
import { aptTimeout, hasNala, installAptPack, isAptPackRegexInstalled } from "setup-apt"
|
||||||
import { rcOptions } from "../cli-options.js"
|
import { rcOptions } from "../cli-options.js"
|
||||||
import { DEFAULT_TIMEOUT } from "../installTool.js"
|
import { DEFAULT_TIMEOUT } from "../installTool.js"
|
||||||
import { aptTimeout, hasNala, isPackageRegexInstalled, setupAptPack } from "../utils/setup/setupAptPack.js"
|
|
||||||
import type { InstallationInfo } from "../utils/setup/setupBin.js"
|
import type { InstallationInfo } from "../utils/setup/setupBin.js"
|
||||||
|
|
||||||
export enum LLVMPackages {
|
export enum LLVMPackages {
|
||||||
|
@ -21,10 +21,10 @@ export async function setupLLVMApt(
|
||||||
// TODO for older versions, this also includes the minor version
|
// TODO for older versions, this also includes the minor version
|
||||||
const installationFolder = `/usr/lib/llvm-${majorVersion}`
|
const installationFolder = `/usr/lib/llvm-${majorVersion}`
|
||||||
|
|
||||||
await setupAptPack([{ name: "curl" }])
|
await installAptPack([{ name: "curl" }])
|
||||||
await execa("curl", ["-LJO", "https://apt.llvm.org/llvm.sh"], { cwd: "/tmp" })
|
await execa("curl", ["-LJO", "https://apt.llvm.org/llvm.sh"], { cwd: "/tmp" })
|
||||||
const neededPackages = await patchAptLLVMScript("/tmp/llvm.sh", "/tmp/llvm-setup-cpp.sh", majorVersion, packages)
|
const neededPackages = await patchAptLLVMScript("/tmp/llvm.sh", "/tmp/llvm-setup-cpp.sh", majorVersion, packages)
|
||||||
await setupAptPack(neededPackages)
|
await installAptPack(neededPackages)
|
||||||
await chmod("/tmp/llvm-setup-cpp.sh", "755")
|
await chmod("/tmp/llvm-setup-cpp.sh", "755")
|
||||||
await execRoot(
|
await execRoot(
|
||||||
"bash",
|
"bash",
|
||||||
|
@ -88,7 +88,7 @@ async function removeConflictingPackages(givenScript: string) {
|
||||||
await Promise.all(
|
await Promise.all(
|
||||||
conflictingPackages.map(async (pack) => {
|
conflictingPackages.map(async (pack) => {
|
||||||
const installingPack = pack.replace("$LLVM_VERSION", "*")
|
const installingPack = pack.replace("$LLVM_VERSION", "*")
|
||||||
if (await isPackageRegexInstalled(installingPack)) {
|
if (await isAptPackRegexInstalled(installingPack)) {
|
||||||
info(`Removing conflicting package ${installingPack}`)
|
info(`Removing conflicting package ${installingPack}`)
|
||||||
script = script.replace(pack, "")
|
script = script.replace(pack, "")
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { addPath } from "os-env"
|
import { addPath } from "os-env"
|
||||||
|
import { installAptPack } from "setup-apt"
|
||||||
import { rcOptions } from "../cli-options.js"
|
import { rcOptions } from "../cli-options.js"
|
||||||
import { hasDnf } from "../utils/env/hasDnf.js"
|
import { hasDnf } from "../utils/env/hasDnf.js"
|
||||||
import { isArch } from "../utils/env/isArch.js"
|
import { isArch } from "../utils/env/isArch.js"
|
||||||
import { isUbuntu } from "../utils/env/isUbuntu.js"
|
import { isUbuntu } from "../utils/env/isUbuntu.js"
|
||||||
import { setupAptPack } from "../utils/setup/setupAptPack.js"
|
|
||||||
import { setupBrewPack } from "../utils/setup/setupBrewPack.js"
|
import { setupBrewPack } from "../utils/setup/setupBrewPack.js"
|
||||||
import { setupChocoPack } from "../utils/setup/setupChocoPack.js"
|
import { setupChocoPack } from "../utils/setup/setupChocoPack.js"
|
||||||
import { setupDnfPack } from "../utils/setup/setupDnfPack.js"
|
import { setupDnfPack } from "../utils/setup/setupDnfPack.js"
|
||||||
|
@ -26,7 +26,7 @@ export async function setupMake(version: string, _setupDir: string, _arch: strin
|
||||||
} else if (hasDnf()) {
|
} else if (hasDnf()) {
|
||||||
return setupDnfPack([{ name: "make", version }])
|
return setupDnfPack([{ name: "make", version }])
|
||||||
} else if (isUbuntu()) {
|
} else if (isUbuntu()) {
|
||||||
return setupAptPack([{ name: "make", version }])
|
return installAptPack([{ name: "make", version }])
|
||||||
}
|
}
|
||||||
throw new Error("Unsupported linux distribution")
|
throw new Error("Unsupported linux distribution")
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import { execRootSync } from "admina"
|
import { execRootSync } from "admina"
|
||||||
import { dirname } from "patha"
|
import { dirname } from "patha"
|
||||||
|
import { addAptKeyViaDownload, hasNala, installAptPack } from "setup-apt"
|
||||||
import which from "which"
|
import which from "which"
|
||||||
import { isUbuntu } from "../utils/env/isUbuntu.js"
|
import { isUbuntu } from "../utils/env/isUbuntu.js"
|
||||||
import { addAptKeyViaDownload, hasNala, setupAptPack } from "../utils/setup/setupAptPack.js"
|
|
||||||
|
|
||||||
let binDir: string | undefined
|
let binDir: string | undefined
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ export async function setupNala(version: string, _setupDir: string, _arch: strin
|
||||||
return { binDir }
|
return { binDir }
|
||||||
}
|
}
|
||||||
|
|
||||||
await setupAptPack([{ name: "python3-apt" }])
|
await installAptPack([{ name: "python3-apt" }])
|
||||||
|
|
||||||
// https://gitlab.com/volian/nala/-/wikis/Installation
|
// https://gitlab.com/volian/nala/-/wikis/Installation
|
||||||
const keyFileName = await addAptKeyViaDownload(
|
const keyFileName = await addAptKeyViaDownload(
|
||||||
|
@ -35,12 +35,12 @@ export async function setupNala(version: string, _setupDir: string, _arch: strin
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (version !== "legacy") {
|
if (version !== "legacy") {
|
||||||
await setupAptPack([{ name: "nala" }], true)
|
await installAptPack([{ name: "nala" }], true)
|
||||||
} else {
|
} else {
|
||||||
await setupAptPack([{ name: "nala-legacy" }], true)
|
await installAptPack([{ name: "nala-legacy" }], true)
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
await setupAptPack([{ name: "nala-legacy" }], true)
|
await installAptPack([{ name: "nala-legacy" }], true)
|
||||||
}
|
}
|
||||||
|
|
||||||
binDir = "/usr/bin" // eslint-disable-line require-atomic-updates
|
binDir = "/usr/bin" // eslint-disable-line require-atomic-updates
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
import { execRootSync } from "admina"
|
import { execRootSync } from "admina"
|
||||||
import { addPath } from "os-env"
|
import { addPath } from "os-env"
|
||||||
|
import { installAptPack } from "setup-apt"
|
||||||
import { rcOptions } from "../cli-options.js"
|
import { rcOptions } from "../cli-options.js"
|
||||||
import { hasDnf } from "../utils/env/hasDnf.js"
|
import { hasDnf } from "../utils/env/hasDnf.js"
|
||||||
import { isArch } from "../utils/env/isArch.js"
|
import { isArch } from "../utils/env/isArch.js"
|
||||||
import { isUbuntu } from "../utils/env/isUbuntu.js"
|
import { isUbuntu } from "../utils/env/isUbuntu.js"
|
||||||
import { ubuntuVersion } from "../utils/env/ubuntu_version.js"
|
import { ubuntuVersion } from "../utils/env/ubuntu_version.js"
|
||||||
import { setupAptPack } from "../utils/setup/setupAptPack.js"
|
|
||||||
import { setupBrewPack } from "../utils/setup/setupBrewPack.js"
|
import { setupBrewPack } from "../utils/setup/setupBrewPack.js"
|
||||||
import { setupChocoPack } from "../utils/setup/setupChocoPack.js"
|
import { setupChocoPack } from "../utils/setup/setupChocoPack.js"
|
||||||
import { setupDnfPack } from "../utils/setup/setupDnfPack.js"
|
import { setupDnfPack } from "../utils/setup/setupDnfPack.js"
|
||||||
|
@ -34,7 +34,7 @@ export async function setupPowershell(version: string | undefined, _setupDir: st
|
||||||
])
|
])
|
||||||
return setupDnfPack([{ name: "powershell", version }])
|
return setupDnfPack([{ name: "powershell", version }])
|
||||||
} else if (isUbuntu()) {
|
} else if (isUbuntu()) {
|
||||||
await setupAptPack([{ name: "curl" }])
|
await installAptPack([{ name: "curl" }])
|
||||||
const ubuntuVerSplitted = (await ubuntuVersion())!
|
const ubuntuVerSplitted = (await ubuntuVersion())!
|
||||||
const ubuntuVersionString = `${ubuntuVerSplitted[0]}.0${ubuntuVerSplitted[1]}`
|
const ubuntuVersionString = `${ubuntuVerSplitted[0]}.0${ubuntuVerSplitted[1]}`
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ export async function setupPowershell(version: string | undefined, _setupDir: st
|
||||||
// `echo "deb [arch=amd64 signed-by=${keyFileName}] https://packages.microsoft.com/repos/microsoft-debian-bullseye-prod bullseye main" > /etc/apt/sources.list.d/microsoft.list`,
|
// `echo "deb [arch=amd64 signed-by=${keyFileName}] https://packages.microsoft.com/repos/microsoft-debian-bullseye-prod bullseye main" > /etc/apt/sources.list.d/microsoft.list`,
|
||||||
// ])
|
// ])
|
||||||
|
|
||||||
return setupAptPack([{ name: "powershell", version }], true)
|
return installAptPack([{ name: "powershell", version }], true)
|
||||||
}
|
}
|
||||||
throw new Error("Unsupported linux distribution")
|
throw new Error("Unsupported linux distribution")
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,12 +10,12 @@ import memoize from "micro-memoize"
|
||||||
import { addPath } from "os-env"
|
import { addPath } from "os-env"
|
||||||
import { pathExists } from "path-exists"
|
import { pathExists } from "path-exists"
|
||||||
import { addExeExt, dirname, join } from "patha"
|
import { addExeExt, dirname, join } from "patha"
|
||||||
|
import { installAptPack } from "setup-apt"
|
||||||
import which from "which"
|
import which from "which"
|
||||||
import { rcOptions } from "../cli-options.js"
|
import { rcOptions } from "../cli-options.js"
|
||||||
import { hasDnf } from "../utils/env/hasDnf.js"
|
import { hasDnf } from "../utils/env/hasDnf.js"
|
||||||
import { isArch } from "../utils/env/isArch.js"
|
import { isArch } from "../utils/env/isArch.js"
|
||||||
import { isUbuntu } from "../utils/env/isUbuntu.js"
|
import { isUbuntu } from "../utils/env/isUbuntu.js"
|
||||||
import { setupAptPack } from "../utils/setup/setupAptPack.js"
|
|
||||||
import type { InstallationInfo } from "../utils/setup/setupBin.js"
|
import type { InstallationInfo } from "../utils/setup/setupBin.js"
|
||||||
import { setupBrewPack } from "../utils/setup/setupBrewPack.js"
|
import { setupBrewPack } from "../utils/setup/setupBrewPack.js"
|
||||||
import { setupChocoPack } from "../utils/setup/setupChocoPack.js"
|
import { setupChocoPack } from "../utils/setup/setupChocoPack.js"
|
||||||
|
@ -157,7 +157,7 @@ async function setupPythonSystem(setupDir: string, version: string) {
|
||||||
} else if (hasDnf()) {
|
} else if (hasDnf()) {
|
||||||
installInfo = await setupDnfPack([{ name: "python3", version }])
|
installInfo = await setupDnfPack([{ name: "python3", version }])
|
||||||
} else if (isUbuntu()) {
|
} else if (isUbuntu()) {
|
||||||
installInfo = await setupAptPack([{ name: "python3", version }, { name: "python-is-python3" }])
|
installInfo = await installAptPack([{ name: "python3", version }, { name: "python-is-python3" }])
|
||||||
} else {
|
} else {
|
||||||
throw new Error("Unsupported linux distributions")
|
throw new Error("Unsupported linux distributions")
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
import { installAptPack } from "setup-apt"
|
||||||
import { hasDnf } from "../utils/env/hasDnf.js"
|
import { hasDnf } from "../utils/env/hasDnf.js"
|
||||||
import { isArch } from "../utils/env/isArch.js"
|
import { isArch } from "../utils/env/isArch.js"
|
||||||
import { isUbuntu } from "../utils/env/isUbuntu.js"
|
import { isUbuntu } from "../utils/env/isUbuntu.js"
|
||||||
import { setupAptPack } from "../utils/setup/setupAptPack.js"
|
|
||||||
import { setupBrewPack } from "../utils/setup/setupBrewPack.js"
|
import { setupBrewPack } from "../utils/setup/setupBrewPack.js"
|
||||||
import { setupChocoPack } from "../utils/setup/setupChocoPack.js"
|
import { setupChocoPack } from "../utils/setup/setupChocoPack.js"
|
||||||
import { setupDnfPack } from "../utils/setup/setupDnfPack.js"
|
import { setupDnfPack } from "../utils/setup/setupDnfPack.js"
|
||||||
|
@ -25,7 +25,7 @@ export function setupSevenZip(version: string, _setupDir: string, _arch: string)
|
||||||
{ name: "p7zip-plugins", version },
|
{ name: "p7zip-plugins", version },
|
||||||
])
|
])
|
||||||
} else if (isUbuntu()) {
|
} else if (isUbuntu()) {
|
||||||
return setupAptPack([{ name: "p7zip-full", version }])
|
return installAptPack([{ name: "p7zip-full", version }])
|
||||||
}
|
}
|
||||||
throw new Error("Unsupported linux distribution")
|
throw new Error("Unsupported linux distribution")
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import os from "os"
|
import os from "os"
|
||||||
import { warning } from "ci-log"
|
import { warning } from "ci-log"
|
||||||
import memoize from "micro-memoize"
|
import memoize from "micro-memoize"
|
||||||
|
import { installAptPack } from "setup-apt"
|
||||||
import { getUbuntuVersion } from "ubuntu-version"
|
import { getUbuntuVersion } from "ubuntu-version"
|
||||||
import which from "which"
|
import which from "which"
|
||||||
import { setupAptPack } from "../setup/setupAptPack.js"
|
|
||||||
import { isUbuntu } from "./isUbuntu.js"
|
import { isUbuntu } from "./isUbuntu.js"
|
||||||
|
|
||||||
async function ubuntuVersion_raw(): Promise<number[] | null> {
|
async function ubuntuVersion_raw(): Promise<number[] | null> {
|
||||||
|
@ -11,7 +11,7 @@ async function ubuntuVersion_raw(): Promise<number[] | null> {
|
||||||
if (isUbuntu()) {
|
if (isUbuntu()) {
|
||||||
try {
|
try {
|
||||||
if (which.sync("lsb_release", { nothrow: true }) === null) {
|
if (which.sync("lsb_release", { nothrow: true }) === null) {
|
||||||
await setupAptPack([{ name: "lsb-release" }])
|
await installAptPack([{ name: "lsb-release" }])
|
||||||
}
|
}
|
||||||
} catch {
|
} catch {
|
||||||
return detectUsingOsVersion()
|
return detectUsingOsVersion()
|
||||||
|
|
|
@ -1,346 +0,0 @@
|
||||||
import { defaultExecOptions, execRoot, execRootSync } from "admina"
|
|
||||||
import { GITHUB_ACTIONS } from "ci-info"
|
|
||||||
import { info, warning } from "ci-log"
|
|
||||||
import escapeRegex from "escape-string-regexp"
|
|
||||||
import { type ExecaError, execa } from "execa"
|
|
||||||
import { appendFile } from "fs/promises"
|
|
||||||
import { sourceRC } from "os-env"
|
|
||||||
import { pathExists } from "path-exists"
|
|
||||||
import which from "which"
|
|
||||||
import { rcOptions } from "../../cli-options.js"
|
|
||||||
import type { InstallationInfo } from "./setupBin.js"
|
|
||||||
|
|
||||||
/* eslint-disable require-atomic-updates */
|
|
||||||
let didUpdate: boolean = false
|
|
||||||
let didInit: boolean = false
|
|
||||||
|
|
||||||
// wait up to 300 seconds if the apt-get lock is held
|
|
||||||
export const aptTimeout = "Dpkg::Lock::Timeout=300"
|
|
||||||
|
|
||||||
export type AptPackage = {
|
|
||||||
name: string
|
|
||||||
version?: string
|
|
||||||
repositories?: string[]
|
|
||||||
}
|
|
||||||
|
|
||||||
const retryErrors = [
|
|
||||||
"E: Could not get lock",
|
|
||||||
"dpkg: error processing archive",
|
|
||||||
"dpkg: error: dpkg status database is locked by another process",
|
|
||||||
]
|
|
||||||
|
|
||||||
/** A function that installs a package using apt */
|
|
||||||
export async function setupAptPack(packages: AptPackage[], update = false): Promise<InstallationInfo> {
|
|
||||||
const apt: string = getApt()
|
|
||||||
|
|
||||||
for (const { name, version } of packages) {
|
|
||||||
info(`Installing ${name} ${version ?? ""} via ${apt}`)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update the repos if needed
|
|
||||||
if (update) {
|
|
||||||
updateRepos(apt)
|
|
||||||
didUpdate = true
|
|
||||||
}
|
|
||||||
|
|
||||||
// Add the repos if needed
|
|
||||||
await addRepositories(apt, packages)
|
|
||||||
|
|
||||||
const needToInstall = await filterAndQualifyAptPackages(apt, packages)
|
|
||||||
|
|
||||||
if (needToInstall.length === 0) {
|
|
||||||
info("All packages are already installed")
|
|
||||||
return { binDir: "/usr/bin/" }
|
|
||||||
}
|
|
||||||
|
|
||||||
// Initialize apt if needed
|
|
||||||
if (!didInit) {
|
|
||||||
await initApt(apt)
|
|
||||||
didInit = true
|
|
||||||
}
|
|
||||||
|
|
||||||
// Install
|
|
||||||
try {
|
|
||||||
execRootSync(apt, ["install", "--fix-broken", "-y", ...needToInstall], { ...defaultExecOptions, env: getEnv(apt) })
|
|
||||||
} catch (err) {
|
|
||||||
if (isExecaError(err)) {
|
|
||||||
if (retryErrors.some((error) => err.stderr.includes(error))) {
|
|
||||||
warning(`Failed to install packages ${needToInstall}. Retrying...`)
|
|
||||||
execRootSync(
|
|
||||||
apt,
|
|
||||||
["install", "--fix-broken", "-y", "-o", aptTimeout, ...needToInstall],
|
|
||||||
{ ...defaultExecOptions, env: getEnv(apt) },
|
|
||||||
)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
throw err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return { binDir: "/usr/bin/" }
|
|
||||||
}
|
|
||||||
|
|
||||||
function isExecaError(err: unknown): err is ExecaError {
|
|
||||||
return typeof (err as ExecaError).stderr === "string"
|
|
||||||
}
|
|
||||||
|
|
||||||
export function hasNala() {
|
|
||||||
return which.sync("nala", { nothrow: true }) !== null
|
|
||||||
}
|
|
||||||
|
|
||||||
export function getApt() {
|
|
||||||
let apt: string
|
|
||||||
if (hasNala()) {
|
|
||||||
apt = "nala"
|
|
||||||
} else {
|
|
||||||
apt = "apt-get"
|
|
||||||
}
|
|
||||||
return apt
|
|
||||||
}
|
|
||||||
|
|
||||||
function getEnv(apt: string) {
|
|
||||||
const env: NodeJS.ProcessEnv = { ...process.env, DEBIAN_FRONTEND: "noninteractive" }
|
|
||||||
|
|
||||||
if (apt === "nala") {
|
|
||||||
// if LANG/LC_ALL is not set, enable utf8 otherwise nala fails because of ASCII encoding
|
|
||||||
if (env.LANG === undefined) {
|
|
||||||
env.LANG = "C.UTF-8"
|
|
||||||
}
|
|
||||||
if (env.LC_ALL === undefined) {
|
|
||||||
env.LC_ALL = "C.UTF-8"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return env
|
|
||||||
}
|
|
||||||
|
|
||||||
export enum AptPackageType {
|
|
||||||
NameDashVersion = 0,
|
|
||||||
NameEqualsVersion = 1,
|
|
||||||
Name = 2,
|
|
||||||
None = 3,
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Filter out the packages that are already installed and qualify the packages into a full package name/version
|
|
||||||
*/
|
|
||||||
async function filterAndQualifyAptPackages(apt: string, packages: AptPackage[]) {
|
|
||||||
return (await Promise.all(packages.map((pack) => qualifiedNeededAptPackage(apt, pack))))
|
|
||||||
.filter((pack) => pack !== undefined)
|
|
||||||
}
|
|
||||||
|
|
||||||
async function qualifiedNeededAptPackage(apt: string, pack: AptPackage) {
|
|
||||||
// Qualify the packages into full package name/version
|
|
||||||
const qualified = await getAptArg(apt, pack.name, pack.version)
|
|
||||||
// filter out the packages that are already installed
|
|
||||||
return (await isPackageInstalled(qualified)) ? undefined : qualified
|
|
||||||
}
|
|
||||||
|
|
||||||
async function addRepositories(apt: string, packages: AptPackage[]) {
|
|
||||||
const allRepositories = [...new Set(packages.flatMap((pack) => pack.repositories ?? []))]
|
|
||||||
if (allRepositories.length !== 0) {
|
|
||||||
if (!didInit) {
|
|
||||||
await initApt(apt)
|
|
||||||
didInit = true
|
|
||||||
}
|
|
||||||
await installAddAptRepo(apt)
|
|
||||||
for (const repo of allRepositories) {
|
|
||||||
// eslint-disable-next-line no-await-in-loop
|
|
||||||
execRootSync("add-apt-repository", ["-y", "--no-update", repo], { ...defaultExecOptions, env: getEnv(apt) })
|
|
||||||
}
|
|
||||||
updateRepos(apt)
|
|
||||||
didUpdate = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async function aptPackageType(apt: string, name: string, version: string | undefined): Promise<AptPackageType> {
|
|
||||||
if (version !== undefined && version !== "") {
|
|
||||||
const { stdout } = await execa("apt-cache", [
|
|
||||||
"search",
|
|
||||||
"--names-only",
|
|
||||||
`^${escapeRegex(name)}-${escapeRegex(version)}$`,
|
|
||||||
], { env: getEnv(apt), stdio: "pipe" })
|
|
||||||
if (stdout.trim() !== "") {
|
|
||||||
return AptPackageType.NameDashVersion
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
// check if apt-get show can find the version
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-shadow
|
|
||||||
const { stdout } = await execa("apt-cache", ["show", `${name}=${version}`], { env: getEnv(apt) })
|
|
||||||
if (stdout.trim() === "") {
|
|
||||||
return AptPackageType.NameEqualsVersion
|
|
||||||
}
|
|
||||||
} catch {
|
|
||||||
// ignore
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
const { stdout: showStdout } = await execa("apt-cache", ["show", name], { env: getEnv(apt), stdio: "pipe" })
|
|
||||||
if (showStdout.trim() !== "") {
|
|
||||||
return AptPackageType.Name
|
|
||||||
}
|
|
||||||
} catch {
|
|
||||||
// ignore
|
|
||||||
}
|
|
||||||
|
|
||||||
// If apt-cache fails, update the repos and try again
|
|
||||||
if (!didUpdate) {
|
|
||||||
updateRepos(getApt())
|
|
||||||
didUpdate = true
|
|
||||||
return aptPackageType(apt, name, version)
|
|
||||||
}
|
|
||||||
|
|
||||||
return AptPackageType.None
|
|
||||||
}
|
|
||||||
|
|
||||||
async function getAptArg(apt: string, name: string, version: string | undefined) {
|
|
||||||
const package_type = await aptPackageType(apt, name, version)
|
|
||||||
switch (package_type) {
|
|
||||||
case AptPackageType.NameDashVersion:
|
|
||||||
return `${name}-${version}`
|
|
||||||
case AptPackageType.NameEqualsVersion:
|
|
||||||
return `${name}=${version}`
|
|
||||||
case AptPackageType.Name:
|
|
||||||
if (version !== undefined && version !== "") {
|
|
||||||
warning(`Could not find package ${name} with version ${version}. Installing the latest version.`)
|
|
||||||
}
|
|
||||||
return name
|
|
||||||
default:
|
|
||||||
throw new Error(`Could not find package ${name} ${version ?? ""}`)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function updateRepos(apt: string) {
|
|
||||||
execRootSync(
|
|
||||||
apt,
|
|
||||||
apt !== "nala" ? ["update", "-y", "-o", aptTimeout] : ["update", "-o", aptTimeout],
|
|
||||||
{ ...defaultExecOptions, env: getEnv(apt) },
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
async function installAddAptRepo(apt: string) {
|
|
||||||
if (await isPackageInstalled("software-properties-common")) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
execRootSync(
|
|
||||||
apt,
|
|
||||||
["install", "-y", "--fix-broken", "-o", aptTimeout, "software-properties-common"],
|
|
||||||
{ ...defaultExecOptions, env: getEnv(apt) },
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Install gnupg and certificates (usually missing from docker containers) */
|
|
||||||
async function initApt(apt: string) {
|
|
||||||
// Update the repos if needed
|
|
||||||
if (!didUpdate) {
|
|
||||||
updateRepos(apt)
|
|
||||||
didUpdate = true
|
|
||||||
}
|
|
||||||
|
|
||||||
const toInstall = await filterAndQualifyAptPackages(apt, [
|
|
||||||
{ name: "ca-certificates" },
|
|
||||||
{ name: "gnupg" },
|
|
||||||
{ name: "apt-utils" },
|
|
||||||
])
|
|
||||||
|
|
||||||
if (toInstall.length !== 0) {
|
|
||||||
execRootSync(apt, ["install", "-y", "--fix-broken", "-o", aptTimeout, ...toInstall], {
|
|
||||||
...defaultExecOptions,
|
|
||||||
env: getEnv(apt),
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
const promises: Promise<string | void>[] = [
|
|
||||||
addAptKeyViaServer(["3B4FE6ACC0B21F32", "40976EAF437D05B5"], "setup-cpp-ubuntu-archive.gpg"),
|
|
||||||
addAptKeyViaServer(["1E9377A2BA9EF27F"], "launchpad-toolchain.gpg"),
|
|
||||||
]
|
|
||||||
await Promise.all(promises)
|
|
||||||
}
|
|
||||||
|
|
||||||
function initGpg() {
|
|
||||||
execRootSync("gpg", ["-k"])
|
|
||||||
}
|
|
||||||
|
|
||||||
export async function addAptKeyViaServer(keys: string[], name: string, server = "keyserver.ubuntu.com") {
|
|
||||||
try {
|
|
||||||
const fileName = `/etc/apt/trusted.gpg.d/${name}`
|
|
||||||
if (!(await pathExists(fileName))) {
|
|
||||||
initGpg()
|
|
||||||
|
|
||||||
await Promise.all(
|
|
||||||
keys.map(async (key) => {
|
|
||||||
await execRoot("gpg", [
|
|
||||||
"--no-default-keyring",
|
|
||||||
"--keyring",
|
|
||||||
`gnupg-ring:${fileName}`,
|
|
||||||
"--keyserver",
|
|
||||||
server,
|
|
||||||
"--recv-keys",
|
|
||||||
key,
|
|
||||||
])
|
|
||||||
await execRoot("chmod", ["644", fileName])
|
|
||||||
}),
|
|
||||||
)
|
|
||||||
}
|
|
||||||
return fileName
|
|
||||||
} catch (err) {
|
|
||||||
warning(`Failed to add apt key via server ${server}: ${err}`)
|
|
||||||
return undefined
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export async function addAptKeyViaDownload(name: string, url: string) {
|
|
||||||
const fileName = `/etc/apt/trusted.gpg.d/${name}`
|
|
||||||
if (!(await pathExists(fileName))) {
|
|
||||||
initGpg()
|
|
||||||
await setupAptPack([{ name: "curl" }, { name: "ca-certificates" }], undefined)
|
|
||||||
await execa("curl", ["-s", url, "-o", `/tmp/${name}`])
|
|
||||||
execRootSync("gpg", ["--no-default-keyring", "--keyring", `gnupg-ring:${fileName}`, "--import", `/tmp/${name}`])
|
|
||||||
execRootSync("chmod", ["644", fileName])
|
|
||||||
}
|
|
||||||
return fileName
|
|
||||||
}
|
|
||||||
|
|
||||||
export async function updateAptAlternatives(name: string, path: string, rcPath: string, priority: number = 40) {
|
|
||||||
if (GITHUB_ACTIONS) {
|
|
||||||
await execRoot("update-alternatives", ["--install", `/usr/bin/${name}`, name, path, priority.toString()])
|
|
||||||
} else {
|
|
||||||
await sourceRC(rcOptions)
|
|
||||||
await appendFile(
|
|
||||||
rcPath,
|
|
||||||
`\nif [ $UID -eq 0 ]; then update-alternatives --install /usr/bin/${name} ${name} ${path} ${priority}; fi\n`,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export async function isPackageInstalled(pack: string) {
|
|
||||||
try {
|
|
||||||
// check if a package is installed
|
|
||||||
const { stdout } = await execa("dpkg", ["-s", pack], { env: getEnv("apt-get"), stdio: "pipe" })
|
|
||||||
if (typeof stdout !== "string") {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
const lines = stdout.split("\n")
|
|
||||||
// check if the output contains a line that starts with "Status: install ok installed"
|
|
||||||
return lines.some((line) => line.startsWith("Status: install ok installed"))
|
|
||||||
} catch {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export async function isPackageRegexInstalled(regexp: string) {
|
|
||||||
try {
|
|
||||||
// check if a package matching the regexp is installed
|
|
||||||
const { stdout } = await execa("dpkg", ["-l", regexp], { env: getEnv("apt-get"), stdio: "pipe" })
|
|
||||||
if (typeof stdout !== "string") {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
const lines = stdout.split("\n")
|
|
||||||
// check if the output contains any lines that start with "ii"
|
|
||||||
return lines.some((line) => line.startsWith("ii"))
|
|
||||||
} catch {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -7,11 +7,11 @@ import { tmpdir } from "os"
|
||||||
import { GITHUB_ACTIONS } from "ci-info"
|
import { GITHUB_ACTIONS } from "ci-info"
|
||||||
import { pathExists } from "path-exists"
|
import { pathExists } from "path-exists"
|
||||||
import retry from "retry-as-promised"
|
import retry from "retry-as-promised"
|
||||||
|
import { installAptPack } from "setup-apt"
|
||||||
import { maybeGetInput, rcOptions } from "../../cli-options.js"
|
import { maybeGetInput, rcOptions } from "../../cli-options.js"
|
||||||
import { hasDnf } from "../env/hasDnf.js"
|
import { hasDnf } from "../env/hasDnf.js"
|
||||||
import { isArch } from "../env/isArch.js"
|
import { isArch } from "../env/isArch.js"
|
||||||
import { isUbuntu } from "../env/isUbuntu.js"
|
import { isUbuntu } from "../env/isUbuntu.js"
|
||||||
import { setupAptPack } from "./setupAptPack.js"
|
|
||||||
import { setupDnfPack } from "./setupDnfPack.js"
|
import { setupDnfPack } from "./setupDnfPack.js"
|
||||||
import { setupPacmanPack } from "./setupPacmanPack.js"
|
import { setupPacmanPack } from "./setupPacmanPack.js"
|
||||||
|
|
||||||
|
@ -108,7 +108,7 @@ export async function setupBin(
|
||||||
} else if (hasDnf()) {
|
} else if (hasDnf()) {
|
||||||
await setupDnfPack([{ name: "unzip" }, { name: "tar" }, { name: "xz" }])
|
await setupDnfPack([{ name: "unzip" }, { name: "tar" }, { name: "xz" }])
|
||||||
} else if (isUbuntu()) {
|
} else if (isUbuntu()) {
|
||||||
await setupAptPack([{ name: "unzip" }, { name: "tar" }, { name: "xz-utils" }])
|
await installAptPack([{ name: "unzip" }, { name: "tar" }, { name: "xz-utils" }])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// eslint-disable-next-line require-atomic-updates
|
// eslint-disable-next-line require-atomic-updates
|
||||||
|
|
|
@ -5,6 +5,7 @@ import { mkdirp } from "mkdirp"
|
||||||
import { addPath } from "os-env"
|
import { addPath } from "os-env"
|
||||||
import { pathExists } from "path-exists"
|
import { pathExists } from "path-exists"
|
||||||
import { addExeExt, dirname, join } from "patha"
|
import { addExeExt, dirname, join } from "patha"
|
||||||
|
import { installAptPack } from "setup-apt"
|
||||||
import { untildifyUser } from "untildify-user"
|
import { untildifyUser } from "untildify-user"
|
||||||
import which from "which"
|
import which from "which"
|
||||||
import { rcOptions } from "../../cli-options.js"
|
import { rcOptions } from "../../cli-options.js"
|
||||||
|
@ -14,7 +15,6 @@ import { hasDnf } from "../env/hasDnf.js"
|
||||||
import { isArch } from "../env/isArch.js"
|
import { isArch } from "../env/isArch.js"
|
||||||
import { isUbuntu } from "../env/isUbuntu.js"
|
import { isUbuntu } from "../env/isUbuntu.js"
|
||||||
import { ubuntuVersion } from "../env/ubuntu_version.js"
|
import { ubuntuVersion } from "../env/ubuntu_version.js"
|
||||||
import { setupAptPack } from "./setupAptPack.js"
|
|
||||||
import type { InstallationInfo } from "./setupBin.js"
|
import type { InstallationInfo } from "./setupBin.js"
|
||||||
import { setupDnfPack } from "./setupDnfPack.js"
|
import { setupDnfPack } from "./setupDnfPack.js"
|
||||||
import { setupPacmanPack } from "./setupPacmanPack.js"
|
import { setupPacmanPack } from "./setupPacmanPack.js"
|
||||||
|
@ -183,7 +183,7 @@ export function setupPipPackSystem(name: string, addPythonPrefix = true) {
|
||||||
} else if (hasDnf()) {
|
} else if (hasDnf()) {
|
||||||
return setupDnfPack([{ name: addPythonPrefix ? `python3-${name}` : name }])
|
return setupDnfPack([{ name: addPythonPrefix ? `python3-${name}` : name }])
|
||||||
} else if (isUbuntu()) {
|
} else if (isUbuntu()) {
|
||||||
return setupAptPack([{ name: addPythonPrefix ? `python3-${name}` : name }])
|
return installAptPack([{ name: addPythonPrefix ? `python3-${name}` : name }])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null
|
return null
|
||||||
|
|
|
@ -4,12 +4,12 @@ import { execaSync } from "execa"
|
||||||
import { addPath } from "os-env"
|
import { addPath } from "os-env"
|
||||||
import { pathExists } from "path-exists"
|
import { pathExists } from "path-exists"
|
||||||
import { addShExt, addShRelativePrefix, dirname, join } from "patha"
|
import { addShExt, addShRelativePrefix, dirname, join } from "patha"
|
||||||
|
import { installAptPack } from "setup-apt"
|
||||||
import which from "which"
|
import which from "which"
|
||||||
import { rcOptions } from "../cli-options.js"
|
import { rcOptions } from "../cli-options.js"
|
||||||
import { hasDnf } from "../utils/env/hasDnf.js"
|
import { hasDnf } from "../utils/env/hasDnf.js"
|
||||||
import { isArch } from "../utils/env/isArch.js"
|
import { isArch } from "../utils/env/isArch.js"
|
||||||
import { isUbuntu } from "../utils/env/isUbuntu.js"
|
import { isUbuntu } from "../utils/env/isUbuntu.js"
|
||||||
import { setupAptPack } from "../utils/setup/setupAptPack.js"
|
|
||||||
import type { InstallationInfo } from "../utils/setup/setupBin.js"
|
import type { InstallationInfo } from "../utils/setup/setupBin.js"
|
||||||
import { setupDnfPack } from "../utils/setup/setupDnfPack.js"
|
import { setupDnfPack } from "../utils/setup/setupDnfPack.js"
|
||||||
import { setupPacmanPack } from "../utils/setup/setupPacmanPack.js"
|
import { setupPacmanPack } from "../utils/setup/setupPacmanPack.js"
|
||||||
|
@ -40,7 +40,7 @@ export async function setupVcpkg(version: string, setupDir: string, _arch: strin
|
||||||
{ name: "pkg-config" },
|
{ name: "pkg-config" },
|
||||||
])
|
])
|
||||||
} else if (isUbuntu()) {
|
} else if (isUbuntu()) {
|
||||||
await setupAptPack([
|
await installAptPack([
|
||||||
{ name: "curl" },
|
{ name: "curl" },
|
||||||
{ name: "zip" },
|
{ name: "zip" },
|
||||||
{ name: "unzip" },
|
{ name: "unzip" },
|
||||||
|
|
|
@ -4,16 +4,13 @@
|
||||||
"tasks": {
|
"tasks": {
|
||||||
"build": {
|
"build": {
|
||||||
"dependsOn": ["^build"],
|
"dependsOn": ["^build"],
|
||||||
"inputs": ["$TURBO_DEFAULT$", ".env*"],
|
"outputs": ["dist/"]
|
||||||
"outputs": ["dist/**"]
|
|
||||||
},
|
},
|
||||||
"lint.tsc": {
|
"lint.tsc": {
|
||||||
"dependsOn": ["build", "^lint.tsc"],
|
"dependsOn": ["build", "^lint.tsc"]
|
||||||
"inputs": ["$TURBO_DEFAULT$", ".env*"]
|
|
||||||
},
|
},
|
||||||
"lint.eslint": {
|
"lint.eslint": {
|
||||||
"dependsOn": ["build", "^lint.eslint"],
|
"dependsOn": ["build", "^lint.eslint"]
|
||||||
"inputs": ["$TURBO_DEFAULT$", ".env*"]
|
|
||||||
},
|
},
|
||||||
"lint": {
|
"lint": {
|
||||||
"dependsOn": ["lint.tsc", "lint.eslint"]
|
"dependsOn": ["lint.tsc", "lint.eslint"]
|
||||||
|
|
Loading…
Reference in New Issue