@pipelab/cli 2.0.0-beta.26 → 2.0.0-beta.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -8,7 +8,7 @@ import fs$1, { mkdir, readdir, stat, writeFile } from "node:fs/promises";
|
|
|
8
8
|
import { ChildProcess, execFile, spawn, spawnSync } from "node:child_process";
|
|
9
9
|
import { StringDecoder } from "node:string_decoder";
|
|
10
10
|
import { aborted, callbackify, debuglog, inspect, promisify, stripVTControlCharacters } from "node:util";
|
|
11
|
-
import
|
|
11
|
+
import P, { execArgv, execPath, hrtime, platform as platform$1 } from "node:process";
|
|
12
12
|
import tty from "node:tty";
|
|
13
13
|
import { scheduler, setImmediate as setImmediate$1, setTimeout as setTimeout$1 } from "node:timers/promises";
|
|
14
14
|
import { EventEmitter, addAbortListener, on, once, setMaxListeners } from "node:events";
|
|
@@ -180,9 +180,9 @@ const getSubprocessResult = ({ stdout }) => {
|
|
|
180
180
|
//#region ../../packages/core-node/node_modules/execa/lib/utils/standard-stream.js
|
|
181
181
|
const isStandardStream = (stream) => STANDARD_STREAMS.includes(stream);
|
|
182
182
|
const STANDARD_STREAMS = [
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
183
|
+
P.stdin,
|
|
184
|
+
P.stdout,
|
|
185
|
+
P.stderr
|
|
186
186
|
];
|
|
187
187
|
const STANDARD_STREAMS_ALIASES = [
|
|
188
188
|
"stdin",
|
|
@@ -303,9 +303,9 @@ const NO_ESCAPE_REGEXP = /^[\w./-]+$/;
|
|
|
303
303
|
//#endregion
|
|
304
304
|
//#region ../../node_modules/figures/node_modules/is-unicode-supported/index.js
|
|
305
305
|
function isUnicodeSupported() {
|
|
306
|
-
const { env } =
|
|
306
|
+
const { env } = P;
|
|
307
307
|
const { TERM, TERM_PROGRAM } = env;
|
|
308
|
-
if (
|
|
308
|
+
if (P.platform !== "win32") return TERM !== "linux";
|
|
309
309
|
return Boolean(env.WT_SESSION) || Boolean(env.TERMINUS_SUBLIME) || env.ConEmuTask === "{cmd::Cmder}" || TERM_PROGRAM === "Terminus-Sublime" || TERM_PROGRAM === "vscode" || TERM === "xterm-256color" || TERM === "alacritty" || TERM === "rxvt-unicode" || TERM === "rxvt-unicode-256color" || env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
310
310
|
}
|
|
311
311
|
//#endregion
|
|
@@ -1201,7 +1201,7 @@ function traversePathUp(startPath) {
|
|
|
1201
1201
|
}
|
|
1202
1202
|
//#endregion
|
|
1203
1203
|
//#region ../../node_modules/npm-run-path/index.js
|
|
1204
|
-
const npmRunPath = ({ cwd =
|
|
1204
|
+
const npmRunPath = ({ cwd = P.cwd(), path: pathOption = P.env[pathKey()], preferLocal = true, execPath = P.execPath, addExecPath = true } = {}) => {
|
|
1205
1205
|
const cwdPath = path.resolve(toPath(cwd));
|
|
1206
1206
|
const result = [];
|
|
1207
1207
|
const pathParts = pathOption.split(path.delimiter);
|
|
@@ -1219,7 +1219,7 @@ const applyExecPath = (result, pathParts, execPath, cwdPath) => {
|
|
|
1219
1219
|
const pathPart = path.resolve(cwdPath, toPath(execPath), "..");
|
|
1220
1220
|
if (!pathParts.includes(pathPart)) result.push(pathPart);
|
|
1221
1221
|
};
|
|
1222
|
-
const npmRunPathEnv = ({ env =
|
|
1222
|
+
const npmRunPathEnv = ({ env = P.env, ...options } = {}) => {
|
|
1223
1223
|
env = { ...env };
|
|
1224
1224
|
const pathName = pathKey({ env });
|
|
1225
1225
|
options.path = env[pathName];
|
|
@@ -2326,7 +2326,7 @@ const normalizeCwd = (cwd = getDefaultCwd()) => {
|
|
|
2326
2326
|
};
|
|
2327
2327
|
const getDefaultCwd = () => {
|
|
2328
2328
|
try {
|
|
2329
|
-
return
|
|
2329
|
+
return P.cwd();
|
|
2330
2330
|
} catch (error) {
|
|
2331
2331
|
error.message = `The current directory does not exist.\n${error.message}`;
|
|
2332
2332
|
throw error;
|
|
@@ -2361,7 +2361,7 @@ const normalizeOptions = (filePath, rawArguments, rawOptions) => {
|
|
|
2361
2361
|
options.killSignal = normalizeKillSignal(options.killSignal);
|
|
2362
2362
|
options.forceKillAfterDelay = normalizeForceKillAfterDelay(options.forceKillAfterDelay);
|
|
2363
2363
|
options.lines = options.lines.map((lines, fdNumber) => lines && !BINARY_ENCODINGS.has(options.encoding) && options.buffer[fdNumber]);
|
|
2364
|
-
if (
|
|
2364
|
+
if (P.platform === "win32" && path.basename(file, ".exe") === "cmd") commandArguments.unshift("/q");
|
|
2365
2365
|
return {
|
|
2366
2366
|
file,
|
|
2367
2367
|
commandArguments,
|
|
@@ -2388,7 +2388,7 @@ const addDefaultOptions = ({ extendEnv = true, preferLocal = false, cwd, localDi
|
|
|
2388
2388
|
});
|
|
2389
2389
|
const getEnv = ({ env: envOption, extendEnv, preferLocal, node, localDirectory, nodePath }) => {
|
|
2390
2390
|
const env = extendEnv ? {
|
|
2391
|
-
...
|
|
2391
|
+
...P.env,
|
|
2392
2392
|
...envOption
|
|
2393
2393
|
} : envOption;
|
|
2394
2394
|
if (preferLocal || node) return npmRunPathEnv({
|
|
@@ -3355,12 +3355,12 @@ const guessStreamDirection = {
|
|
|
3355
3355
|
}
|
|
3356
3356
|
};
|
|
3357
3357
|
const getStandardStreamDirection = (value) => {
|
|
3358
|
-
if ([0,
|
|
3358
|
+
if ([0, P.stdin].includes(value)) return "input";
|
|
3359
3359
|
if ([
|
|
3360
3360
|
1,
|
|
3361
3361
|
2,
|
|
3362
|
-
|
|
3363
|
-
|
|
3362
|
+
P.stdout,
|
|
3363
|
+
P.stderr
|
|
3364
3364
|
].includes(value)) return "output";
|
|
3365
3365
|
};
|
|
3366
3366
|
const DEFAULT_DIRECTION = "output";
|
|
@@ -4400,9 +4400,9 @@ const addIpcMethods = (subprocess, { ipc }) => {
|
|
|
4400
4400
|
Object.assign(subprocess, getIpcMethods(subprocess, false, ipc));
|
|
4401
4401
|
};
|
|
4402
4402
|
const getIpcExport = () => {
|
|
4403
|
-
const anyProcess =
|
|
4403
|
+
const anyProcess = P;
|
|
4404
4404
|
const isSubprocess = true;
|
|
4405
|
-
const ipc =
|
|
4405
|
+
const ipc = P.channel !== void 0;
|
|
4406
4406
|
return {
|
|
4407
4407
|
...getIpcMethods(anyProcess, isSubprocess, ipc),
|
|
4408
4408
|
getCancelSignal: getCancelSignal$1.bind(void 0, {
|
|
@@ -4872,7 +4872,7 @@ var SignalExitFallback = class extends SignalExitBase {
|
|
|
4872
4872
|
};
|
|
4873
4873
|
var SignalExit = class extends SignalExitBase {
|
|
4874
4874
|
/* c8 ignore start */
|
|
4875
|
-
#hupSig = process$
|
|
4875
|
+
#hupSig = process$1.platform === "win32" ? "SIGINT" : "SIGHUP";
|
|
4876
4876
|
/* c8 ignore stop */
|
|
4877
4877
|
#emitter = new Emitter();
|
|
4878
4878
|
#process;
|
|
@@ -4967,8 +4967,8 @@ var SignalExit = class extends SignalExitBase {
|
|
|
4967
4967
|
} else return og.call(this.#process, ev, ...args);
|
|
4968
4968
|
}
|
|
4969
4969
|
};
|
|
4970
|
-
const process$
|
|
4971
|
-
const { onExit, load, unload } = signalExitWrap(processOk(process$
|
|
4970
|
+
const process$1 = globalThis.process;
|
|
4971
|
+
const { onExit, load, unload } = signalExitWrap(processOk(process$1) ? new SignalExit(process$1) : new SignalExitFallback());
|
|
4972
4972
|
//#endregion
|
|
4973
4973
|
//#region ../../packages/core-node/node_modules/execa/lib/terminate/cleanup.js
|
|
4974
4974
|
const cleanupOnExit = (subprocess, { cleanup, detached }, { signal }) => {
|
package/index.mjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { a as __require, n as __esmMin, s as __toESM, t as __commonJSMin } from "./chunk-M2dkpuaD.mjs";
|
|
3
3
|
import { a as WebSocketError, c as transformUrl, d as SubscriptionRequiredError, f as usePlugins, i as savedFileMigrator, l as isSupabaseAvailable, n as connectionsMigrator, o as isWebSocketRequestMessage, r as fileRepoMigrations, s as isRequired, t as appSettingsMigrator, u as supabase, v as processGraph, w as useLogger } from "./src-PqA91tjF.mjs";
|
|
4
4
|
import "./dist-BC_B45iu.mjs";
|
|
5
|
-
import { a as setupPipelineConfigFileByName, c as setupSettingsConfigFile, d as extractTarGz, f as extractZip, g as execa, h as require_balanced_match, i as setupConnectionsConfigFile, l as downloadFile, m as require_commonjs$8, n as deletePipelineConfigFileByPath, o as setupPipelineConfigFileByPath, p as getFolderSize, s as setupProjectsConfigFile, t as deletePipelineConfigFileByName } from "./config-
|
|
5
|
+
import { a as setupPipelineConfigFileByName, c as setupSettingsConfigFile, d as extractTarGz, f as extractZip, g as execa, h as require_balanced_match, i as setupConnectionsConfigFile, l as downloadFile, m as require_commonjs$8, n as deletePipelineConfigFileByPath, o as setupPipelineConfigFileByPath, p as getFolderSize, s as setupProjectsConfigFile, t as deletePipelineConfigFileByName } from "./config-DJaqZVxZ.mjs";
|
|
6
6
|
import path, { delimiter, dirname, isAbsolute, join, normalize, resolve, sep } from "node:path";
|
|
7
7
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
8
8
|
import { homedir, platform, release } from "node:os";
|
|
@@ -14,12 +14,12 @@ import { webcrypto } from "node:crypto";
|
|
|
14
14
|
import { dirname as dirname$1, isAbsolute as isAbsolute$1, posix, relative, sep as sep$1 } from "path";
|
|
15
15
|
import { execFile } from "node:child_process";
|
|
16
16
|
import { promisify, stripVTControlCharacters, styleText } from "node:util";
|
|
17
|
-
import
|
|
17
|
+
import P, { platform as platform$1, stdin, stdout } from "node:process";
|
|
18
18
|
import { ReadStream } from "node:tty";
|
|
19
19
|
import { setTimeout as setTimeout$1 } from "node:timers/promises";
|
|
20
20
|
import dns from "node:dns/promises";
|
|
21
21
|
import * as _ from "node:readline";
|
|
22
|
-
import P, { createInterface } from "node:readline";
|
|
22
|
+
import P$1, { createInterface } from "node:readline";
|
|
23
23
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
24
24
|
//#region ../../node_modules/tsdown/esm-shims.js
|
|
25
25
|
var getFilename, getDirname, __dirname$1;
|
|
@@ -14144,17 +14144,17 @@ var require_npa = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
14144
14144
|
//#endregion
|
|
14145
14145
|
//#region ../../node_modules/npm-install-checks/lib/current-env.js
|
|
14146
14146
|
var require_current_env = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
14147
|
-
const process$
|
|
14147
|
+
const process$2 = __require("node:process");
|
|
14148
14148
|
const nodeOs = __require("node:os");
|
|
14149
14149
|
const fs$19 = __require("node:fs");
|
|
14150
14150
|
function isMusl(file) {
|
|
14151
14151
|
return file.includes("libc.musl-") || file.includes("ld-musl-");
|
|
14152
14152
|
}
|
|
14153
14153
|
function os() {
|
|
14154
|
-
return process$
|
|
14154
|
+
return process$2.platform;
|
|
14155
14155
|
}
|
|
14156
14156
|
function cpu() {
|
|
14157
|
-
return process$
|
|
14157
|
+
return process$2.arch;
|
|
14158
14158
|
}
|
|
14159
14159
|
const LDD_PATH = "/usr/bin/ldd";
|
|
14160
14160
|
function getFamilyFromFilesystem() {
|
|
@@ -14168,10 +14168,10 @@ var require_current_env = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
14168
14168
|
}
|
|
14169
14169
|
}
|
|
14170
14170
|
function getFamilyFromReport() {
|
|
14171
|
-
const originalExclude = process$
|
|
14172
|
-
process$
|
|
14173
|
-
const report = process$
|
|
14174
|
-
process$
|
|
14171
|
+
const originalExclude = process$2.report.excludeNetwork;
|
|
14172
|
+
process$2.report.excludeNetwork = true;
|
|
14173
|
+
const report = process$2.report.getReport();
|
|
14174
|
+
process$2.report.excludeNetwork = originalExclude;
|
|
14175
14175
|
if (report.header?.glibcVersionRuntime) family = "glibc";
|
|
14176
14176
|
else if (Array.isArray(report.sharedObjects) && report.sharedObjects.some(isMusl)) family = "musl";
|
|
14177
14177
|
else family = null;
|
|
@@ -14201,7 +14201,7 @@ var require_current_env = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
14201
14201
|
},
|
|
14202
14202
|
runtime: {
|
|
14203
14203
|
name: "node",
|
|
14204
|
-
version: env.nodeVersion || process$
|
|
14204
|
+
version: env.nodeVersion || process$2.version
|
|
14205
14205
|
}
|
|
14206
14206
|
};
|
|
14207
14207
|
}
|
|
@@ -67003,6 +67003,17 @@ async function isOnline() {
|
|
|
67003
67003
|
lastCheckTime = now;
|
|
67004
67004
|
return isOnlineCached;
|
|
67005
67005
|
}
|
|
67006
|
+
function allowPrereleaseInRange(rangeStr) {
|
|
67007
|
+
try {
|
|
67008
|
+
return new import_semver.default.Range(rangeStr).set.map((conj) => conj.map((c) => {
|
|
67009
|
+
const v = c.semver;
|
|
67010
|
+
if (v.prerelease && v.prerelease.length) return c.operator + v.format();
|
|
67011
|
+
return c.operator + v.major + "." + v.minor + "." + v.patch + "-0";
|
|
67012
|
+
}).join(" ")).join(" || ");
|
|
67013
|
+
} catch {
|
|
67014
|
+
return rangeStr;
|
|
67015
|
+
}
|
|
67016
|
+
}
|
|
67006
67017
|
/**
|
|
67007
67018
|
* Robust utility to fetch, cache, and resolve an NPM package.
|
|
67008
67019
|
* Centralized in core-node to avoid circular dependencies.
|
|
@@ -67012,6 +67023,7 @@ async function fetchPackage(packageName, versionOrRange, options) {
|
|
|
67012
67023
|
const ctx = options.context;
|
|
67013
67024
|
const baseDir = ctx.getPackagesPath(packageName);
|
|
67014
67025
|
let resolvedVersion;
|
|
67026
|
+
const includePrerelease = !!(ctx.releaseTag && ctx.releaseTag !== "latest");
|
|
67015
67027
|
let resolvedVersionOrRange = versionOrRange;
|
|
67016
67028
|
if (resolvedVersionOrRange === "local") resolvedVersionOrRange = "latest";
|
|
67017
67029
|
console.log(`[Fetcher] Resolving ${packageName}@${resolvedVersionOrRange || "latest"}...`);
|
|
@@ -67019,7 +67031,7 @@ async function fetchPackage(packageName, versionOrRange, options) {
|
|
|
67019
67031
|
if (!await isOnline()) {
|
|
67020
67032
|
console.warn(`[Fetcher] ${packageName}: offline mode detected (${Date.now() - resolveStart}ms), trying local fallback...`);
|
|
67021
67033
|
const fallbackStart = Date.now();
|
|
67022
|
-
const fallbackVersion = await tryLocalFallback(resolvedVersionOrRange, /* @__PURE__ */ new Error("Offline"), baseDir, packageName);
|
|
67034
|
+
const fallbackVersion = await tryLocalFallback(resolvedVersionOrRange, /* @__PURE__ */ new Error("Offline"), baseDir, packageName, includePrerelease);
|
|
67023
67035
|
if (fallbackVersion) {
|
|
67024
67036
|
resolvedVersion = fallbackVersion;
|
|
67025
67037
|
console.log(`[Fetcher] ${packageName}: Resolved to local fallback ${resolvedVersion} (${Date.now() - fallbackStart}ms)`);
|
|
@@ -67034,7 +67046,27 @@ async function fetchPackage(packageName, versionOrRange, options) {
|
|
|
67034
67046
|
const packument = await packumentPromise;
|
|
67035
67047
|
const versions = Object.keys(packument.versions);
|
|
67036
67048
|
const range = resolvedVersionOrRange || "latest";
|
|
67037
|
-
let foundVersion = packument["dist-tags"]?.[range] || import_semver.default.maxSatisfying(versions, range);
|
|
67049
|
+
let foundVersion = packument["dist-tags"]?.[range] || import_semver.default.maxSatisfying(versions, range, { includePrerelease });
|
|
67050
|
+
if (!foundVersion && ctx.releaseTag && ctx.releaseTag !== "latest") {
|
|
67051
|
+
const releaseTagVersion = packument["dist-tags"]?.[ctx.releaseTag];
|
|
67052
|
+
if (releaseTagVersion && import_semver.default.valid(releaseTagVersion)) {
|
|
67053
|
+
const rewrittenRangeForCheck = allowPrereleaseInRange(range);
|
|
67054
|
+
if (import_semver.default.satisfies(releaseTagVersion, rewrittenRangeForCheck, { includePrerelease: true })) {
|
|
67055
|
+
console.log(`[Fetcher] Using release tag "${ctx.releaseTag}" (${releaseTagVersion}) for ${packageName}@${range} because it satisfies the range`);
|
|
67056
|
+
foundVersion = releaseTagVersion;
|
|
67057
|
+
}
|
|
67058
|
+
}
|
|
67059
|
+
}
|
|
67060
|
+
if (!foundVersion && includePrerelease) {
|
|
67061
|
+
const rewrittenRange = allowPrereleaseInRange(range);
|
|
67062
|
+
if (rewrittenRange !== range) {
|
|
67063
|
+
const matched = import_semver.default.maxSatisfying(versions, rewrittenRange, { includePrerelease });
|
|
67064
|
+
if (matched) {
|
|
67065
|
+
console.log(`[Fetcher] Resolved ${packageName}@${range} to ${matched} via rewritten range ${rewrittenRange}`);
|
|
67066
|
+
foundVersion = matched;
|
|
67067
|
+
}
|
|
67068
|
+
}
|
|
67069
|
+
}
|
|
67038
67070
|
if (range === "latest" && ctx.releaseTag && ctx.releaseTag !== "latest") {
|
|
67039
67071
|
const releaseTagVersion = packument["dist-tags"]?.[ctx.releaseTag];
|
|
67040
67072
|
if (releaseTagVersion && import_semver.default.valid(releaseTagVersion)) {
|
|
@@ -67050,7 +67082,7 @@ async function fetchPackage(packageName, versionOrRange, options) {
|
|
|
67050
67082
|
} catch (error) {
|
|
67051
67083
|
console.warn(`[Fetcher] ${packageName}: remote resolution failed (${Date.now() - resolveStart}ms), trying local fallback...`);
|
|
67052
67084
|
const fallbackStart = Date.now();
|
|
67053
|
-
const fallbackVersion = await tryLocalFallback(resolvedVersionOrRange, error, baseDir, packageName);
|
|
67085
|
+
const fallbackVersion = await tryLocalFallback(resolvedVersionOrRange, error, baseDir, packageName, includePrerelease);
|
|
67054
67086
|
if (fallbackVersion) {
|
|
67055
67087
|
resolvedVersion = fallbackVersion;
|
|
67056
67088
|
console.log(`[Fetcher] ${packageName}: Resolved to local fallback ${resolvedVersion} (${Date.now() - fallbackStart}ms)`);
|
|
@@ -67232,35 +67264,24 @@ async function installDependencies(packageDir, packageName, options) {
|
|
|
67232
67264
|
console.log(`[Fetcher] ${packageName}: Dependencies already installed, skipping.`);
|
|
67233
67265
|
return;
|
|
67234
67266
|
}
|
|
67235
|
-
const tempDir = `${packageDir}.tmp-deps-${Math.random().toString(36).slice(2)}`;
|
|
67236
|
-
await mkdir(tempDir, { recursive: true });
|
|
67237
67267
|
try {
|
|
67238
|
-
await cp(join(packageDir, "package.json"), join(tempDir, "package.json"));
|
|
67239
67268
|
console.log(`[Fetcher] ${packageName}: Ensuring dependencies are installed...`);
|
|
67240
67269
|
const pnpmStart = Date.now();
|
|
67241
|
-
const { all } = await runPnpm(
|
|
67270
|
+
const { all } = await runPnpm(packageDir, {
|
|
67242
67271
|
signal: options.signal,
|
|
67243
67272
|
context: options.context
|
|
67244
67273
|
});
|
|
67245
67274
|
console.log(`[Fetcher] ${packageName}: pnpm install command took ${Date.now() - pnpmStart}ms`);
|
|
67246
67275
|
if (all) console.log(`[Fetcher] ${packageName}: Installation trace:\n${all}`);
|
|
67247
|
-
|
|
67248
|
-
if (existsSync(nodeModulesPath)) await rm(nodeModulesPath, {
|
|
67249
|
-
recursive: true,
|
|
67250
|
-
force: true
|
|
67251
|
-
}).catch(() => {});
|
|
67252
|
-
const renameStart = Date.now();
|
|
67253
|
-
await rename(tempNodeModules, nodeModulesPath);
|
|
67254
|
-
console.log(`[Fetcher] ${packageName}: Dependencies installed successfully (rename took ${Date.now() - renameStart}ms, total installDependencies took ${Date.now() - start}ms).`);
|
|
67276
|
+
console.log(`[Fetcher] ${packageName}: Dependencies installed successfully (total installDependencies took ${Date.now() - start}ms).`);
|
|
67255
67277
|
} catch (err) {
|
|
67256
67278
|
console.error(`[Fetcher] ${packageName}: CRITICAL ERROR during dependency installation: ${err.message}`);
|
|
67257
67279
|
if (err.all) console.error(`[Fetcher] ${packageName}: Error details:\n${err.all}`);
|
|
67258
|
-
|
|
67259
|
-
} finally {
|
|
67260
|
-
await rm(tempDir, {
|
|
67280
|
+
await rm(nodeModulesPath, {
|
|
67261
67281
|
recursive: true,
|
|
67262
67282
|
force: true
|
|
67263
67283
|
}).catch(() => {});
|
|
67284
|
+
throw new Error(`Failed to install dependencies for ${packageName}. See logs for details.`);
|
|
67264
67285
|
}
|
|
67265
67286
|
}
|
|
67266
67287
|
async function fetchPipelabAsset(packageName, versionOrRange, options) {
|
|
@@ -67283,7 +67304,7 @@ async function fetchPipelabPlugin(pluginName, versionOrRange, options) {
|
|
|
67283
67304
|
isLocal: !!isLocal
|
|
67284
67305
|
};
|
|
67285
67306
|
}
|
|
67286
|
-
async function tryLocalFallback(versionOrRange, _error, baseDir, logPrefix) {
|
|
67307
|
+
async function tryLocalFallback(versionOrRange, _error, baseDir, logPrefix, includePrerelease = false) {
|
|
67287
67308
|
if (!existsSync(baseDir)) return null;
|
|
67288
67309
|
try {
|
|
67289
67310
|
const localVersions = (await readdir(baseDir, { withFileTypes: true })).filter((e) => e.isDirectory() || e.isSymbolicLink()).map((e) => e.name).filter((name) => !!import_semver.default.valid(name));
|
|
@@ -67296,7 +67317,7 @@ async function tryLocalFallback(versionOrRange, _error, baseDir, logPrefix) {
|
|
|
67296
67317
|
return latestLocal;
|
|
67297
67318
|
}
|
|
67298
67319
|
} else {
|
|
67299
|
-
const matched = import_semver.default.maxSatisfying(localVersions, range);
|
|
67320
|
+
const matched = import_semver.default.maxSatisfying(localVersions, range, { includePrerelease });
|
|
67300
67321
|
if (matched) {
|
|
67301
67322
|
console.info(`[Fetcher] ${logPrefix}: Using locally cached matching version: ${matched} for range ${range}`);
|
|
67302
67323
|
return matched;
|
|
@@ -67563,7 +67584,7 @@ const builtInPlugins = async (options) => {
|
|
|
67563
67584
|
console.log(`[Plugins] Environment preparation took ${Date.now() - envStart}ms`);
|
|
67564
67585
|
const { usePlugins } = await import("./src-BiFlFfFL.mjs");
|
|
67565
67586
|
const { registerPlugins } = usePlugins();
|
|
67566
|
-
const { webSocketServer } = await import("./src-
|
|
67587
|
+
const { webSocketServer } = await import("./src-B_k6ITjY.mjs");
|
|
67567
67588
|
webSocketServer.broadcast("startup:progress", { type: "ready" });
|
|
67568
67589
|
(async () => {
|
|
67569
67590
|
const totalStart = Date.now();
|
|
@@ -67583,7 +67604,7 @@ const builtInPlugins = async (options) => {
|
|
|
67583
67604
|
"@pipelab/plugin-netlify"
|
|
67584
67605
|
]) pluginsToLoad.set(name, "latest");
|
|
67585
67606
|
try {
|
|
67586
|
-
const { setupSettingsConfigFile } = await import("./config-
|
|
67607
|
+
const { setupSettingsConfigFile } = await import("./config-CzJC4vJj.mjs");
|
|
67587
67608
|
const settingsPlugins = (await (await setupSettingsConfigFile(options.context)).getConfig())?.plugins || [];
|
|
67588
67609
|
for (const plugin of settingsPlugins) if (plugin.name) if (plugin.enabled) {
|
|
67589
67610
|
if (!pluginsToLoad.has(plugin.name)) pluginsToLoad.set(plugin.name, "latest");
|
|
@@ -68514,6 +68535,32 @@ const registerSystemHandlers = (options) => {
|
|
|
68514
68535
|
}
|
|
68515
68536
|
});
|
|
68516
68537
|
});
|
|
68538
|
+
handle("system:packages:cleanup", async (_, { send }) => {
|
|
68539
|
+
try {
|
|
68540
|
+
const packagesDir = options.context.getPackagesPath();
|
|
68541
|
+
const { existsSync } = await import("fs");
|
|
68542
|
+
const { rm } = await import("fs/promises");
|
|
68543
|
+
if (existsSync(packagesDir)) await rm(packagesDir, {
|
|
68544
|
+
recursive: true,
|
|
68545
|
+
force: true
|
|
68546
|
+
});
|
|
68547
|
+
send({
|
|
68548
|
+
type: "end",
|
|
68549
|
+
data: {
|
|
68550
|
+
type: "success",
|
|
68551
|
+
result: true
|
|
68552
|
+
}
|
|
68553
|
+
});
|
|
68554
|
+
} catch (e) {
|
|
68555
|
+
send({
|
|
68556
|
+
type: "end",
|
|
68557
|
+
data: {
|
|
68558
|
+
type: "error",
|
|
68559
|
+
ipcError: e.message
|
|
68560
|
+
}
|
|
68561
|
+
});
|
|
68562
|
+
}
|
|
68563
|
+
});
|
|
68517
68564
|
};
|
|
68518
68565
|
/**
|
|
68519
68566
|
* Resolves a requested plugin version.
|
|
@@ -69316,7 +69363,7 @@ async function runPipelineCommand(file, options, version) {
|
|
|
69316
69363
|
}
|
|
69317
69364
|
//#endregion
|
|
69318
69365
|
//#region package.json
|
|
69319
|
-
var version$2 = "2.0.0-beta.
|
|
69366
|
+
var version$2 = "2.0.0-beta.30";
|
|
69320
69367
|
//#endregion
|
|
69321
69368
|
//#region src/paths.ts
|
|
69322
69369
|
const getDefaultUserDataPath = () => {
|
|
@@ -70082,7 +70129,7 @@ let p = class {
|
|
|
70082
70129
|
this.state = "cancel", this.close();
|
|
70083
70130
|
}, { once: !0 });
|
|
70084
70131
|
}
|
|
70085
|
-
this.rl = P.createInterface({
|
|
70132
|
+
this.rl = P$1.createInterface({
|
|
70086
70133
|
input: this.input,
|
|
70087
70134
|
tabSize: 2,
|
|
70088
70135
|
prompt: "",
|
|
@@ -70279,7 +70326,7 @@ var nt = class extends p {
|
|
|
70279
70326
|
//#endregion
|
|
70280
70327
|
//#region ../../node_modules/@clack/prompts/dist/index.mjs
|
|
70281
70328
|
function Ze() {
|
|
70282
|
-
return
|
|
70329
|
+
return P.platform !== "win32" ? P.env.TERM !== "linux" : !!P.env.CI || !!P.env.WT_SESSION || !!P.env.TERMINUS_SUBLIME || P.env.ConEmuTask === "{cmd::Cmder}" || P.env.TERM_PROGRAM === "Terminus-Sublime" || P.env.TERM_PROGRAM === "vscode" || P.env.TERM === "xterm-256color" || P.env.TERM === "alacritty" || P.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
70283
70330
|
}
|
|
70284
70331
|
const ee = Ze(), ae = () => process.env.CI === "true", w = (e, i) => ee ? e : i, _e = w("◆", "*"), oe = w("■", "x"), ue = w("▲", "x"), F = w("◇", "o"), le = w("┌", "T"), d = w("│", "|"), E = w("└", "—");
|
|
70285
70332
|
w("┐", "T");
|
|
@@ -70503,7 +70550,7 @@ ${r ? styleText("cyan", E) : ""}
|
|
|
70503
70550
|
`), n = u.reduce((a, l) => Math.max(fastStringWidth(l), a), 0);
|
|
70504
70551
|
return wrapAnsi(e, i - (u.map(s).reduce((a, l) => Math.max(fastStringWidth(l), a), 0) - n), r);
|
|
70505
70552
|
}, wt = (e = "", i = "", s) => {
|
|
70506
|
-
const r = s?.output ??
|
|
70553
|
+
const r = s?.output ?? P.stdout, u$9 = s?.withGuide ?? u.withGuide, n = s?.format ?? ft, o = [
|
|
70507
70554
|
"",
|
|
70508
70555
|
...vt(e, O$1(r) - 6, n).split(`
|
|
70509
70556
|
`).map(n),
|
|
@@ -75460,7 +75507,7 @@ var require_command = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
75460
75507
|
const childProcess = __require("node:child_process");
|
|
75461
75508
|
const path$1 = __require("node:path");
|
|
75462
75509
|
const fs$2 = __require("node:fs");
|
|
75463
|
-
const process$
|
|
75510
|
+
const process$1 = __require("node:process");
|
|
75464
75511
|
const { Argument, humanReadableArgName } = require_argument();
|
|
75465
75512
|
const { CommanderError } = require_error();
|
|
75466
75513
|
const { Help } = require_help();
|
|
@@ -75511,10 +75558,10 @@ var require_command = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
75511
75558
|
this._showHelpAfterError = false;
|
|
75512
75559
|
this._showSuggestionAfterError = true;
|
|
75513
75560
|
this._outputConfiguration = {
|
|
75514
|
-
writeOut: (str) => process$
|
|
75515
|
-
writeErr: (str) => process$
|
|
75516
|
-
getOutHelpWidth: () => process$
|
|
75517
|
-
getErrHelpWidth: () => process$
|
|
75561
|
+
writeOut: (str) => process$1.stdout.write(str),
|
|
75562
|
+
writeErr: (str) => process$1.stderr.write(str),
|
|
75563
|
+
getOutHelpWidth: () => process$1.stdout.isTTY ? process$1.stdout.columns : void 0,
|
|
75564
|
+
getErrHelpWidth: () => process$1.stderr.isTTY ? process$1.stderr.columns : void 0,
|
|
75518
75565
|
outputError: (str, write) => write(str)
|
|
75519
75566
|
};
|
|
75520
75567
|
this._hidden = false;
|
|
@@ -75868,7 +75915,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
75868
75915
|
*/
|
|
75869
75916
|
_exit(exitCode, code, message) {
|
|
75870
75917
|
if (this._exitCallback) this._exitCallback(new CommanderError(exitCode, code, message));
|
|
75871
|
-
process$
|
|
75918
|
+
process$1.exit(exitCode);
|
|
75872
75919
|
}
|
|
75873
75920
|
/**
|
|
75874
75921
|
* Register callback `fn` for the command.
|
|
@@ -76207,11 +76254,11 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
76207
76254
|
if (argv !== void 0 && !Array.isArray(argv)) throw new Error("first parameter to parse must be array or undefined");
|
|
76208
76255
|
parseOptions = parseOptions || {};
|
|
76209
76256
|
if (argv === void 0 && parseOptions.from === void 0) {
|
|
76210
|
-
if (process$
|
|
76211
|
-
const execArgv = process$
|
|
76257
|
+
if (process$1.versions?.electron) parseOptions.from = "electron";
|
|
76258
|
+
const execArgv = process$1.execArgv ?? [];
|
|
76212
76259
|
if (execArgv.includes("-e") || execArgv.includes("--eval") || execArgv.includes("-p") || execArgv.includes("--print")) parseOptions.from = "eval";
|
|
76213
76260
|
}
|
|
76214
|
-
if (argv === void 0) argv = process$
|
|
76261
|
+
if (argv === void 0) argv = process$1.argv;
|
|
76215
76262
|
this.rawArgs = argv.slice();
|
|
76216
76263
|
let userArgs;
|
|
76217
76264
|
switch (parseOptions.from) {
|
|
@@ -76221,7 +76268,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
76221
76268
|
userArgs = argv.slice(2);
|
|
76222
76269
|
break;
|
|
76223
76270
|
case "electron":
|
|
76224
|
-
if (process$
|
|
76271
|
+
if (process$1.defaultApp) {
|
|
76225
76272
|
this._scriptPath = argv[1];
|
|
76226
76273
|
userArgs = argv.slice(2);
|
|
76227
76274
|
} else userArgs = argv.slice(1);
|
|
@@ -76335,15 +76382,15 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
76335
76382
|
}
|
|
76336
76383
|
launchWithNode = sourceExt.includes(path$1.extname(executableFile));
|
|
76337
76384
|
let proc;
|
|
76338
|
-
if (process$
|
|
76385
|
+
if (process$1.platform !== "win32") if (launchWithNode) {
|
|
76339
76386
|
args.unshift(executableFile);
|
|
76340
|
-
args = incrementNodeInspectorPort(process$
|
|
76341
|
-
proc = childProcess.spawn(process$
|
|
76387
|
+
args = incrementNodeInspectorPort(process$1.execArgv).concat(args);
|
|
76388
|
+
proc = childProcess.spawn(process$1.argv[0], args, { stdio: "inherit" });
|
|
76342
76389
|
} else proc = childProcess.spawn(executableFile, args, { stdio: "inherit" });
|
|
76343
76390
|
else {
|
|
76344
76391
|
args.unshift(executableFile);
|
|
76345
|
-
args = incrementNodeInspectorPort(process$
|
|
76346
|
-
proc = childProcess.spawn(process$
|
|
76392
|
+
args = incrementNodeInspectorPort(process$1.execArgv).concat(args);
|
|
76393
|
+
proc = childProcess.spawn(process$1.execPath, args, { stdio: "inherit" });
|
|
76347
76394
|
}
|
|
76348
76395
|
if (!proc.killed) [
|
|
76349
76396
|
"SIGUSR1",
|
|
@@ -76352,14 +76399,14 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
76352
76399
|
"SIGINT",
|
|
76353
76400
|
"SIGHUP"
|
|
76354
76401
|
].forEach((signal) => {
|
|
76355
|
-
process$
|
|
76402
|
+
process$1.on(signal, () => {
|
|
76356
76403
|
if (proc.killed === false && proc.exitCode === null) proc.kill(signal);
|
|
76357
76404
|
});
|
|
76358
76405
|
});
|
|
76359
76406
|
const exitCallback = this._exitCallback;
|
|
76360
76407
|
proc.on("close", (code) => {
|
|
76361
76408
|
code = code ?? 1;
|
|
76362
|
-
if (!exitCallback) process$
|
|
76409
|
+
if (!exitCallback) process$1.exit(code);
|
|
76363
76410
|
else exitCallback(new CommanderError(code, "commander.executeSubCommandAsync", "(close)"));
|
|
76364
76411
|
});
|
|
76365
76412
|
proc.on("error", (err) => {
|
|
@@ -76371,7 +76418,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
76371
76418
|
- ${executableDirMessage}`;
|
|
76372
76419
|
throw new Error(executableMissing);
|
|
76373
76420
|
} else if (err.code === "EACCES") throw new Error(`'${executableFile}' not executable`);
|
|
76374
|
-
if (!exitCallback) process$
|
|
76421
|
+
if (!exitCallback) process$1.exit(1);
|
|
76375
76422
|
else {
|
|
76376
76423
|
const wrappedError = new CommanderError(1, "commander.executeSubCommandAsync", "(error)");
|
|
76377
76424
|
wrappedError.nestedError = err;
|
|
@@ -76777,13 +76824,13 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
76777
76824
|
*/
|
|
76778
76825
|
_parseOptionsEnv() {
|
|
76779
76826
|
this.options.forEach((option) => {
|
|
76780
|
-
if (option.envVar && option.envVar in process$
|
|
76827
|
+
if (option.envVar && option.envVar in process$1.env) {
|
|
76781
76828
|
const optionKey = option.attributeName();
|
|
76782
76829
|
if (this.getOptionValue(optionKey) === void 0 || [
|
|
76783
76830
|
"default",
|
|
76784
76831
|
"config",
|
|
76785
76832
|
"env"
|
|
76786
|
-
].includes(this.getOptionValueSource(optionKey))) if (option.required || option.optional) this.emit(`optionEnv:${option.name()}`, process$
|
|
76833
|
+
].includes(this.getOptionValueSource(optionKey))) if (option.required || option.optional) this.emit(`optionEnv:${option.name()}`, process$1.env[option.envVar]);
|
|
76787
76834
|
else this.emit(`optionEnv:${option.name()}`);
|
|
76788
76835
|
}
|
|
76789
76836
|
});
|
|
@@ -77162,7 +77209,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
77162
77209
|
*/
|
|
77163
77210
|
help(contextOptions) {
|
|
77164
77211
|
this.outputHelp(contextOptions);
|
|
77165
|
-
let exitCode = process$
|
|
77212
|
+
let exitCode = process$1.exitCode || 0;
|
|
77166
77213
|
if (exitCode === 0 && contextOptions && typeof contextOptions !== "function" && contextOptions.error) exitCode = 1;
|
|
77167
77214
|
this._exit(exitCode, "commander.help", "(outputHelp)");
|
|
77168
77215
|
}
|
package/package.json
CHANGED