mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
build: update cross-repo angular dependencies (#58457)
See associated pull request for more information. PR Close #58457
This commit is contained in:
committed by
Pawel Kozlowski
parent
f994539f6b
commit
5eb3db8686
@@ -10151,7 +10151,7 @@ var supportsColor2 = {
|
||||
var supports_color_default2 = supportsColor2;
|
||||
|
||||
//
|
||||
import { spawn as _spawn, spawnSync as _spawnSync } from "child_process";
|
||||
import { spawn as _spawn, spawnSync as _spawnSync, exec as _exec } from "child_process";
|
||||
var ChildProcess = class {
|
||||
static spawnInteractive(command, args, options = {}) {
|
||||
return new Promise((resolve, reject) => {
|
||||
@@ -10161,52 +10161,9 @@ var ChildProcess = class {
|
||||
childProcess.on("close", (status) => status === 0 ? resolve() : reject(status));
|
||||
});
|
||||
}
|
||||
static spawn(command, args, options = {}) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const commandText = `${command} ${args.join(" ")}`;
|
||||
const outputMode = options.mode;
|
||||
const env3 = getEnvironmentForNonInteractiveSpawn(options.env);
|
||||
Log.debug(`Executing command: ${commandText}`);
|
||||
const childProcess = _spawn(command, args, { ...options, env: env3, shell: true, stdio: "pipe" });
|
||||
let logOutput = "";
|
||||
let stdout = "";
|
||||
let stderr = "";
|
||||
if (options.input !== void 0) {
|
||||
childProcess.stdin.write(options.input);
|
||||
childProcess.stdin.end();
|
||||
}
|
||||
childProcess.stderr.on("data", (message) => {
|
||||
stderr += message;
|
||||
logOutput += message;
|
||||
if (outputMode === void 0 || outputMode === "enabled") {
|
||||
process.stderr.write(message);
|
||||
}
|
||||
});
|
||||
childProcess.stdout.on("data", (message) => {
|
||||
stdout += message;
|
||||
logOutput += message;
|
||||
if (outputMode === void 0 || outputMode === "enabled") {
|
||||
process.stderr.write(message);
|
||||
}
|
||||
});
|
||||
childProcess.on("close", (exitCode, signal) => {
|
||||
const exitDescription = exitCode !== null ? `exit code "${exitCode}"` : `signal "${signal}"`;
|
||||
const printFn = outputMode === "on-error" ? Log.error : Log.debug;
|
||||
const status = statusFromExitCodeAndSignal(exitCode, signal);
|
||||
printFn(`Command "${commandText}" completed with ${exitDescription}.`);
|
||||
printFn(`Process output:
|
||||
${logOutput}`);
|
||||
if (status === 0 || options.suppressErrorOnFailingExitCode) {
|
||||
resolve({ stdout, stderr, status });
|
||||
} else {
|
||||
reject(outputMode === "silent" ? logOutput : void 0);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
static spawnSync(command, args, options = {}) {
|
||||
const commandText = `${command} ${args.join(" ")}`;
|
||||
const env3 = getEnvironmentForNonInteractiveSpawn(options.env);
|
||||
const env3 = getEnvironmentForNonInteractiveCommand(options.env);
|
||||
Log.debug(`Executing command: ${commandText}`);
|
||||
const { status: exitCode, signal, stdout, stderr } = _spawnSync(command, args, { ...options, env: env3, encoding: "utf8", shell: true, stdio: "pipe" });
|
||||
const status = statusFromExitCodeAndSignal(exitCode, signal);
|
||||
@@ -10215,14 +10172,59 @@ ${logOutput}`);
|
||||
}
|
||||
throw new Error(stderr);
|
||||
}
|
||||
static spawn(command, args, options = {}) {
|
||||
const commandText = `${command} ${args.join(" ")}`;
|
||||
const env3 = getEnvironmentForNonInteractiveCommand(options.env);
|
||||
return processAsyncCmd(commandText, options, _spawn(command, args, { ...options, env: env3, shell: true, stdio: "pipe" }));
|
||||
}
|
||||
static exec(command, options = {}) {
|
||||
const env3 = getEnvironmentForNonInteractiveCommand(options.env);
|
||||
return processAsyncCmd(command, options, _exec(command, { ...options, env: env3 }));
|
||||
}
|
||||
};
|
||||
function statusFromExitCodeAndSignal(exitCode, signal) {
|
||||
return exitCode ?? signal ?? -1;
|
||||
}
|
||||
function getEnvironmentForNonInteractiveSpawn(userProvidedEnv) {
|
||||
function getEnvironmentForNonInteractiveCommand(userProvidedEnv) {
|
||||
const forceColorValue = supports_color_default2.stdout !== false ? supports_color_default2.stdout.level.toString() : void 0;
|
||||
return { FORCE_COLOR: forceColorValue, ...userProvidedEnv ?? process.env };
|
||||
}
|
||||
function processAsyncCmd(command, options, childProcess) {
|
||||
return new Promise((resolve, reject) => {
|
||||
var _a, _b;
|
||||
let logOutput = "";
|
||||
let stdout = "";
|
||||
let stderr = "";
|
||||
Log.debug(`Executing command: ${command}`);
|
||||
(_a = childProcess.stderr) == null ? void 0 : _a.on("data", (message) => {
|
||||
stderr += message;
|
||||
logOutput += message;
|
||||
if (options.mode === void 0 || options.mode === "enabled") {
|
||||
process.stderr.write(message);
|
||||
}
|
||||
});
|
||||
(_b = childProcess.stdout) == null ? void 0 : _b.on("data", (message) => {
|
||||
stdout += message;
|
||||
logOutput += message;
|
||||
if (options.mode === void 0 || options.mode === "enabled") {
|
||||
process.stderr.write(message);
|
||||
}
|
||||
});
|
||||
childProcess.on("close", (exitCode, signal) => {
|
||||
const exitDescription = exitCode !== null ? `exit code "${exitCode}"` : `signal "${signal}"`;
|
||||
const printFn = options.mode === "on-error" ? Log.error : Log.debug;
|
||||
const status = statusFromExitCodeAndSignal(exitCode, signal);
|
||||
printFn(`Command "${command}" completed with ${exitDescription}.`);
|
||||
printFn(`Process output:
|
||||
${logOutput}`);
|
||||
if (status === 0 || options.suppressErrorOnFailingExitCode) {
|
||||
resolve({ stdout, stderr, status });
|
||||
} else {
|
||||
reject(options.mode === "silent" ? logOutput : void 0);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
//
|
||||
function determineRepoBaseDirFromCwd() {
|
||||
|
||||
@@ -5,9 +5,9 @@ runs:
|
||||
using: 'composite'
|
||||
steps:
|
||||
- name: Setup Bazel
|
||||
uses: angular/dev-infra/github-actions/bazel/setup@2137a36261ceb2e74dc5ddafdb171ac9fc62a6ea
|
||||
uses: angular/dev-infra/github-actions/bazel/setup@933dcd42f8837d6d6ce3a28419a760edb94f10e6
|
||||
- name: Setup Saucelabs Variables
|
||||
uses: angular/dev-infra/github-actions/saucelabs@2137a36261ceb2e74dc5ddafdb171ac9fc62a6ea
|
||||
uses: angular/dev-infra/github-actions/saucelabs@933dcd42f8837d6d6ce3a28419a760edb94f10e6
|
||||
- name: Starting Saucelabs tunnel service
|
||||
shell: bash
|
||||
run: ./tools/saucelabs/sauce-service.sh run &
|
||||
|
||||
Reference in New Issue
Block a user