Lines 1-27javascript
1// Copyright 2026 Pipeline Builder Contributors
2// SPDX-License-Identifier: Apache-2.0
4 * On-demand fetch of single-binary prerequisites (e.g. `yq`) so provision can
5 * satisfy a missing host tool WITHOUT a system install (no brew/apt). The binary
6 * is downloaded into a per-user cache dir; the caller prepends that dir to PATH
7 * so both the prereq checks (`has()` → `command -v`) and the deploy (`bash -lc`,
8 * which inherits process.env.PATH) find it.
10import { execSync } from 'child_process';
11import { existsSync, mkdirSync } from 'fs';
12import * as os from 'os';
13import * as path from 'path';
14/** Cache dir for fetched tool binaries (kept across runs so we fetch once). */
15export const TOOLS_DIR = path.join(os.homedir(), '.pipeline-manager', 'tools');
16/**
HighSandbox Evasion Gated Capability
Source gates dangerous network, credential, or execution behavior behind CI, host, platform, time, or geo fingerprint checks.
dist/agent/tools.jsView on unpkg · L7 17 * Tools that are a single self-contained binary we can fetch on demand, keyed by
18 * the prereq-check name. Each entry builds the release-asset URL for the host's
19 * OS + arch (assets use darwin|linux and arm64|amd64). Builders may resolve a
20 * version first (kubectl) — failures throw and fetchTool() reports them.
22 * NOT fetchable here (they aren't relocatable single binaries — keep the
23 * system/external install + the prereq block's instruction):
24 * - git → Xcode Command Line Tools (`xcode-select --install`) or `brew install git`
25 * - docker / docker compose → Docker Desktop (external host requirement)
26 * - aws → AWS CLI v2 is a pkg/zip installer, not a drop-in binary
27 * - openssl → ships with macOS/Linux; install via the system package manager