aboutsummaryrefslogtreecommitdiffstats
path: root/node_modules/concurrently/dist/src/flow-control
diff options
context:
space:
mode:
authorPinapelz <yukais@pinapelz.com>2025-06-29 11:49:28 -0700
committerPinapelz <yukais@pinapelz.com>2025-06-29 11:49:28 -0700
commitd55b767039605256c736166a942a9138e3eacfd7 (patch)
tree947063b634c50d438a794325f13275e134aa5993 /node_modules/concurrently/dist/src/flow-control
parent864ce67d89c77d8ef9c3361f80d619853abcf91c (diff)
remove dev node_modules (oops)
Diffstat (limited to 'node_modules/concurrently/dist/src/flow-control')
-rw-r--r--node_modules/concurrently/dist/src/flow-control/flow-controller.d.ts13
-rw-r--r--node_modules/concurrently/dist/src/flow-control/flow-controller.js2
-rw-r--r--node_modules/concurrently/dist/src/flow-control/input-handler.d.ts30
-rw-r--r--node_modules/concurrently/dist/src/flow-control/input-handler.js90
-rw-r--r--node_modules/concurrently/dist/src/flow-control/kill-on-signal.d.ts17
-rw-r--r--node_modules/concurrently/dist/src/flow-control/kill-on-signal.js36
-rw-r--r--node_modules/concurrently/dist/src/flow-control/kill-others.d.ts20
-rw-r--r--node_modules/concurrently/dist/src/flow-control/kill-others.js35
-rw-r--r--node_modules/concurrently/dist/src/flow-control/log-error.d.ts15
-rw-r--r--node_modules/concurrently/dist/src/flow-control/log-error.js20
-rw-r--r--node_modules/concurrently/dist/src/flow-control/log-exit.d.ts15
-rw-r--r--node_modules/concurrently/dist/src/flow-control/log-exit.js18
-rw-r--r--node_modules/concurrently/dist/src/flow-control/log-output.d.ts15
-rw-r--r--node_modules/concurrently/dist/src/flow-control/log-output.js19
-rw-r--r--node_modules/concurrently/dist/src/flow-control/log-timings.d.ts31
-rw-r--r--node_modules/concurrently/dist/src/flow-control/log-timings.js92
-rw-r--r--node_modules/concurrently/dist/src/flow-control/restart-process.d.ts22
-rw-r--r--node_modules/concurrently/dist/src/flow-control/restart-process.js76
18 files changed, 0 insertions, 566 deletions
diff --git a/node_modules/concurrently/dist/src/flow-control/flow-controller.d.ts b/node_modules/concurrently/dist/src/flow-control/flow-controller.d.ts
deleted file mode 100644
index b518aad..0000000
--- a/node_modules/concurrently/dist/src/flow-control/flow-controller.d.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-import { Command } from '../command';
-/**
- * Interface for a class that controls and/or watches the behavior of commands.
- *
- * This may include logging their output, creating interactions between them, or changing when they
- * actually finish.
- */
-export interface FlowController {
- handle(commands: Command[]): {
- commands: Command[];
- onFinish?: () => void;
- };
-}
diff --git a/node_modules/concurrently/dist/src/flow-control/flow-controller.js b/node_modules/concurrently/dist/src/flow-control/flow-controller.js
deleted file mode 100644
index c8ad2e5..0000000
--- a/node_modules/concurrently/dist/src/flow-control/flow-controller.js
+++ /dev/null
@@ -1,2 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
diff --git a/node_modules/concurrently/dist/src/flow-control/input-handler.d.ts b/node_modules/concurrently/dist/src/flow-control/input-handler.d.ts
deleted file mode 100644
index 3a7ee5a..0000000
--- a/node_modules/concurrently/dist/src/flow-control/input-handler.d.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-/// <reference types="node" />
-import { Readable } from 'stream';
-import { Command, CommandIdentifier } from '../command';
-import { Logger } from '../logger';
-import { FlowController } from './flow-controller';
-/**
- * Sends input from concurrently through to commands.
- *
- * Input can start with a command identifier, in which case it will be sent to that specific command.
- * For instance, `0:bla` will send `bla` to command at index `0`, and `server:stop` will send `stop`
- * to command with name `server`.
- *
- * If the input doesn't start with a command identifier, it is then always sent to the default target.
- */
-export declare class InputHandler implements FlowController {
- private readonly logger;
- private readonly defaultInputTarget;
- private readonly inputStream?;
- private readonly pauseInputStreamOnFinish;
- constructor({ defaultInputTarget, inputStream, pauseInputStreamOnFinish, logger, }: {
- inputStream?: Readable;
- logger: Logger;
- defaultInputTarget?: CommandIdentifier;
- pauseInputStreamOnFinish?: boolean;
- });
- handle(commands: Command[]): {
- commands: Command[];
- onFinish?: () => void | undefined;
- };
-}
diff --git a/node_modules/concurrently/dist/src/flow-control/input-handler.js b/node_modules/concurrently/dist/src/flow-control/input-handler.js
deleted file mode 100644
index 76c552f..0000000
--- a/node_modules/concurrently/dist/src/flow-control/input-handler.js
+++ /dev/null
@@ -1,90 +0,0 @@
-"use strict";
-var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- var desc = Object.getOwnPropertyDescriptor(m, k);
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
- desc = { enumerable: true, get: function() { return m[k]; } };
- }
- Object.defineProperty(o, k2, desc);
-}) : (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- o[k2] = m[k];
-}));
-var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
- Object.defineProperty(o, "default", { enumerable: true, value: v });
-}) : function(o, v) {
- o["default"] = v;
-});
-var __importStar = (this && this.__importStar) || function (mod) {
- if (mod && mod.__esModule) return mod;
- var result = {};
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
- __setModuleDefault(result, mod);
- return result;
-};
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.InputHandler = void 0;
-const Rx = __importStar(require("rxjs"));
-const operators_1 = require("rxjs/operators");
-const defaults = __importStar(require("../defaults"));
-/**
- * Sends input from concurrently through to commands.
- *
- * Input can start with a command identifier, in which case it will be sent to that specific command.
- * For instance, `0:bla` will send `bla` to command at index `0`, and `server:stop` will send `stop`
- * to command with name `server`.
- *
- * If the input doesn't start with a command identifier, it is then always sent to the default target.
- */
-class InputHandler {
- constructor({ defaultInputTarget, inputStream, pauseInputStreamOnFinish, logger, }) {
- this.logger = logger;
- this.defaultInputTarget = defaultInputTarget || defaults.defaultInputTarget;
- this.inputStream = inputStream;
- this.pauseInputStreamOnFinish = pauseInputStreamOnFinish !== false;
- }
- handle(commands) {
- const { inputStream } = this;
- if (!inputStream) {
- return { commands };
- }
- const commandsMap = new Map();
- for (const command of commands) {
- commandsMap.set(command.index.toString(), command);
- commandsMap.set(command.name, command);
- }
- Rx.fromEvent(inputStream, 'data')
- .pipe((0, operators_1.map)((data) => String(data)))
- .subscribe((data) => {
- let command, input;
- const dataParts = data.split(/:(.+)/s);
- let target = dataParts[0];
- if (dataParts.length > 1 && (command = commandsMap.get(target))) {
- input = dataParts[1];
- }
- else {
- // If `target` does not match a registered command,
- // fallback to `defaultInputTarget` and forward the whole input data
- target = this.defaultInputTarget.toString();
- command = commandsMap.get(target);
- input = data;
- }
- if (command && command.stdin) {
- command.stdin.write(input);
- }
- else {
- this.logger.logGlobalEvent(`Unable to find command "${target}", or it has no stdin open\n`);
- }
- });
- return {
- commands,
- onFinish: () => {
- if (this.pauseInputStreamOnFinish) {
- // https://github.com/kimmobrunfeldt/concurrently/issues/252
- inputStream.pause();
- }
- },
- };
- }
-}
-exports.InputHandler = InputHandler;
diff --git a/node_modules/concurrently/dist/src/flow-control/kill-on-signal.d.ts b/node_modules/concurrently/dist/src/flow-control/kill-on-signal.d.ts
deleted file mode 100644
index d706694..0000000
--- a/node_modules/concurrently/dist/src/flow-control/kill-on-signal.d.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/// <reference types="node" />
-import EventEmitter from 'events';
-import { Command } from '../command';
-import { FlowController } from './flow-controller';
-/**
- * Watches the main concurrently process for signals and sends the same signal down to each spawned
- * command.
- */
-export declare class KillOnSignal implements FlowController {
- private readonly process;
- constructor({ process }: {
- process: EventEmitter;
- });
- handle(commands: Command[]): {
- commands: Command[];
- };
-}
diff --git a/node_modules/concurrently/dist/src/flow-control/kill-on-signal.js b/node_modules/concurrently/dist/src/flow-control/kill-on-signal.js
deleted file mode 100644
index 716a9bf..0000000
--- a/node_modules/concurrently/dist/src/flow-control/kill-on-signal.js
+++ /dev/null
@@ -1,36 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.KillOnSignal = void 0;
-const operators_1 = require("rxjs/operators");
-/**
- * Watches the main concurrently process for signals and sends the same signal down to each spawned
- * command.
- */
-class KillOnSignal {
- constructor({ process }) {
- this.process = process;
- }
- handle(commands) {
- let caughtSignal;
- ['SIGINT', 'SIGTERM', 'SIGHUP'].forEach((signal) => {
- this.process.on(signal, () => {
- caughtSignal = signal;
- commands.forEach((command) => command.kill(signal));
- });
- });
- return {
- commands: commands.map((command) => {
- const closeStream = command.close.pipe((0, operators_1.map)((exitInfo) => {
- const exitCode = caughtSignal === 'SIGINT' ? 0 : exitInfo.exitCode;
- return { ...exitInfo, exitCode };
- }));
- return new Proxy(command, {
- get(target, prop) {
- return prop === 'close' ? closeStream : target[prop];
- },
- });
- }),
- };
- }
-}
-exports.KillOnSignal = KillOnSignal;
diff --git a/node_modules/concurrently/dist/src/flow-control/kill-others.d.ts b/node_modules/concurrently/dist/src/flow-control/kill-others.d.ts
deleted file mode 100644
index f10b7bb..0000000
--- a/node_modules/concurrently/dist/src/flow-control/kill-others.d.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-import { Command } from '../command';
-import { Logger } from '../logger';
-import { FlowController } from './flow-controller';
-export type ProcessCloseCondition = 'failure' | 'success';
-/**
- * Sends a SIGTERM signal to all commands when one of the commands exits with a matching condition.
- */
-export declare class KillOthers implements FlowController {
- private readonly logger;
- private readonly conditions;
- private readonly killSignal;
- constructor({ logger, conditions, killSignal, }: {
- logger: Logger;
- conditions: ProcessCloseCondition | ProcessCloseCondition[];
- killSignal: string | undefined;
- });
- handle(commands: Command[]): {
- commands: Command[];
- };
-}
diff --git a/node_modules/concurrently/dist/src/flow-control/kill-others.js b/node_modules/concurrently/dist/src/flow-control/kill-others.js
deleted file mode 100644
index 1751677..0000000
--- a/node_modules/concurrently/dist/src/flow-control/kill-others.js
+++ /dev/null
@@ -1,35 +0,0 @@
-"use strict";
-var __importDefault = (this && this.__importDefault) || function (mod) {
- return (mod && mod.__esModule) ? mod : { "default": mod };
-};
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.KillOthers = void 0;
-const lodash_1 = __importDefault(require("lodash"));
-const operators_1 = require("rxjs/operators");
-const command_1 = require("../command");
-/**
- * Sends a SIGTERM signal to all commands when one of the commands exits with a matching condition.
- */
-class KillOthers {
- constructor({ logger, conditions, killSignal, }) {
- this.logger = logger;
- this.conditions = lodash_1.default.castArray(conditions);
- this.killSignal = killSignal;
- }
- handle(commands) {
- const conditions = this.conditions.filter((condition) => condition === 'failure' || condition === 'success');
- if (!conditions.length) {
- return { commands };
- }
- const closeStates = commands.map((command) => command.close.pipe((0, operators_1.map)(({ exitCode }) => exitCode === 0 ? 'success' : 'failure'), (0, operators_1.filter)((state) => conditions.includes(state))));
- closeStates.forEach((closeState) => closeState.subscribe(() => {
- const killableCommands = commands.filter((command) => command_1.Command.canKill(command));
- if (killableCommands.length) {
- this.logger.logGlobalEvent(`Sending ${this.killSignal || 'SIGTERM'} to other processes..`);
- killableCommands.forEach((command) => command.kill(this.killSignal));
- }
- }));
- return { commands };
- }
-}
-exports.KillOthers = KillOthers;
diff --git a/node_modules/concurrently/dist/src/flow-control/log-error.d.ts b/node_modules/concurrently/dist/src/flow-control/log-error.d.ts
deleted file mode 100644
index 8eac6dd..0000000
--- a/node_modules/concurrently/dist/src/flow-control/log-error.d.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import { Command } from '../command';
-import { Logger } from '../logger';
-import { FlowController } from './flow-controller';
-/**
- * Logs when commands failed executing, e.g. due to the executable not existing in the system.
- */
-export declare class LogError implements FlowController {
- private readonly logger;
- constructor({ logger }: {
- logger: Logger;
- });
- handle(commands: Command[]): {
- commands: Command[];
- };
-}
diff --git a/node_modules/concurrently/dist/src/flow-control/log-error.js b/node_modules/concurrently/dist/src/flow-control/log-error.js
deleted file mode 100644
index 8fc7210..0000000
--- a/node_modules/concurrently/dist/src/flow-control/log-error.js
+++ /dev/null
@@ -1,20 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.LogError = void 0;
-/**
- * Logs when commands failed executing, e.g. due to the executable not existing in the system.
- */
-class LogError {
- constructor({ logger }) {
- this.logger = logger;
- }
- handle(commands) {
- commands.forEach((command) => command.error.subscribe((event) => {
- this.logger.logCommandEvent(`Error occurred when executing command: ${command.command}`, command);
- const errorText = String(event instanceof Error ? event.stack || event : event);
- this.logger.logCommandEvent(errorText, command);
- }));
- return { commands };
- }
-}
-exports.LogError = LogError;
diff --git a/node_modules/concurrently/dist/src/flow-control/log-exit.d.ts b/node_modules/concurrently/dist/src/flow-control/log-exit.d.ts
deleted file mode 100644
index 47b8718..0000000
--- a/node_modules/concurrently/dist/src/flow-control/log-exit.d.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import { Command } from '../command';
-import { Logger } from '../logger';
-import { FlowController } from './flow-controller';
-/**
- * Logs the exit code/signal of commands.
- */
-export declare class LogExit implements FlowController {
- private readonly logger;
- constructor({ logger }: {
- logger: Logger;
- });
- handle(commands: Command[]): {
- commands: Command[];
- };
-}
diff --git a/node_modules/concurrently/dist/src/flow-control/log-exit.js b/node_modules/concurrently/dist/src/flow-control/log-exit.js
deleted file mode 100644
index 6fe396d..0000000
--- a/node_modules/concurrently/dist/src/flow-control/log-exit.js
+++ /dev/null
@@ -1,18 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.LogExit = void 0;
-/**
- * Logs the exit code/signal of commands.
- */
-class LogExit {
- constructor({ logger }) {
- this.logger = logger;
- }
- handle(commands) {
- commands.forEach((command) => command.close.subscribe(({ exitCode }) => {
- this.logger.logCommandEvent(`${command.command} exited with code ${exitCode}`, command);
- }));
- return { commands };
- }
-}
-exports.LogExit = LogExit;
diff --git a/node_modules/concurrently/dist/src/flow-control/log-output.d.ts b/node_modules/concurrently/dist/src/flow-control/log-output.d.ts
deleted file mode 100644
index 6c916de..0000000
--- a/node_modules/concurrently/dist/src/flow-control/log-output.d.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import { Command } from '../command';
-import { Logger } from '../logger';
-import { FlowController } from './flow-controller';
-/**
- * Logs the stdout and stderr output of commands.
- */
-export declare class LogOutput implements FlowController {
- private readonly logger;
- constructor({ logger }: {
- logger: Logger;
- });
- handle(commands: Command[]): {
- commands: Command[];
- };
-}
diff --git a/node_modules/concurrently/dist/src/flow-control/log-output.js b/node_modules/concurrently/dist/src/flow-control/log-output.js
deleted file mode 100644
index 486a25b..0000000
--- a/node_modules/concurrently/dist/src/flow-control/log-output.js
+++ /dev/null
@@ -1,19 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.LogOutput = void 0;
-/**
- * Logs the stdout and stderr output of commands.
- */
-class LogOutput {
- constructor({ logger }) {
- this.logger = logger;
- }
- handle(commands) {
- commands.forEach((command) => {
- command.stdout.subscribe((text) => this.logger.logCommandText(text.toString(), command));
- command.stderr.subscribe((text) => this.logger.logCommandText(text.toString(), command));
- });
- return { commands };
- }
-}
-exports.LogOutput = LogOutput;
diff --git a/node_modules/concurrently/dist/src/flow-control/log-timings.d.ts b/node_modules/concurrently/dist/src/flow-control/log-timings.d.ts
deleted file mode 100644
index a847707..0000000
--- a/node_modules/concurrently/dist/src/flow-control/log-timings.d.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-import { CloseEvent, Command } from '../command';
-import { Logger } from '../logger';
-import { FlowController } from './flow-controller';
-type TimingInfo = {
- name: string;
- duration: string;
- 'exit code': string | number;
- killed: boolean;
- command: string;
-};
-/**
- * Logs timing information about commands as they start/stop and then a summary when all commands finish.
- */
-export declare class LogTimings implements FlowController {
- static mapCloseEventToTimingInfo({ command, timings, killed, exitCode, }: CloseEvent): TimingInfo;
- private readonly logger?;
- private readonly timestampFormat;
- constructor({ logger, timestampFormat, }: {
- logger?: Logger;
- timestampFormat?: string;
- });
- private printExitInfoTimingTable;
- handle(commands: Command[]): {
- commands: Command[];
- onFinish?: undefined;
- } | {
- commands: Command[];
- onFinish: () => void;
- };
-}
-export {};
diff --git a/node_modules/concurrently/dist/src/flow-control/log-timings.js b/node_modules/concurrently/dist/src/flow-control/log-timings.js
deleted file mode 100644
index 9c8879d..0000000
--- a/node_modules/concurrently/dist/src/flow-control/log-timings.js
+++ /dev/null
@@ -1,92 +0,0 @@
-"use strict";
-var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- var desc = Object.getOwnPropertyDescriptor(m, k);
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
- desc = { enumerable: true, get: function() { return m[k]; } };
- }
- Object.defineProperty(o, k2, desc);
-}) : (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- o[k2] = m[k];
-}));
-var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
- Object.defineProperty(o, "default", { enumerable: true, value: v });
-}) : function(o, v) {
- o["default"] = v;
-});
-var __importStar = (this && this.__importStar) || function (mod) {
- if (mod && mod.__esModule) return mod;
- var result = {};
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
- __setModuleDefault(result, mod);
- return result;
-};
-var __importDefault = (this && this.__importDefault) || function (mod) {
- return (mod && mod.__esModule) ? mod : { "default": mod };
-};
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.LogTimings = void 0;
-const assert = __importStar(require("assert"));
-const format_1 = __importDefault(require("date-fns/format"));
-const lodash_1 = __importDefault(require("lodash"));
-const Rx = __importStar(require("rxjs"));
-const operators_1 = require("rxjs/operators");
-const defaults = __importStar(require("../defaults"));
-/**
- * Logs timing information about commands as they start/stop and then a summary when all commands finish.
- */
-class LogTimings {
- static mapCloseEventToTimingInfo({ command, timings, killed, exitCode, }) {
- const readableDurationMs = (timings.endDate.getTime() - timings.startDate.getTime()).toLocaleString();
- return {
- name: command.name,
- duration: readableDurationMs,
- 'exit code': exitCode,
- killed,
- command: command.command,
- };
- }
- constructor({ logger, timestampFormat = defaults.timestampFormat, }) {
- this.logger = logger;
- this.timestampFormat = timestampFormat;
- }
- printExitInfoTimingTable(exitInfos) {
- assert.ok(this.logger);
- const exitInfoTable = (0, lodash_1.default)(exitInfos)
- .sortBy(({ timings }) => timings.durationSeconds)
- .reverse()
- .map(LogTimings.mapCloseEventToTimingInfo)
- .value();
- this.logger.logGlobalEvent('Timings:');
- this.logger.logTable(exitInfoTable);
- return exitInfos;
- }
- handle(commands) {
- const { logger } = this;
- if (!logger) {
- return { commands };
- }
- // individual process timings
- commands.forEach((command) => {
- command.timer.subscribe(({ startDate, endDate }) => {
- if (!endDate) {
- const formattedStartDate = (0, format_1.default)(startDate, this.timestampFormat);
- logger.logCommandEvent(`${command.command} started at ${formattedStartDate}`, command);
- }
- else {
- const durationMs = endDate.getTime() - startDate.getTime();
- const formattedEndDate = (0, format_1.default)(endDate, this.timestampFormat);
- logger.logCommandEvent(`${command.command} stopped at ${formattedEndDate} after ${durationMs.toLocaleString()}ms`, command);
- }
- });
- });
- // overall summary timings
- const closeStreams = commands.map((command) => command.close);
- const finished = new Rx.Subject();
- const allProcessesClosed = Rx.merge(...closeStreams).pipe((0, operators_1.bufferCount)(closeStreams.length), (0, operators_1.take)(1), (0, operators_1.combineLatestWith)(finished));
- allProcessesClosed.subscribe(([exitInfos]) => this.printExitInfoTimingTable(exitInfos));
- return { commands, onFinish: () => finished.next() };
- }
-}
-exports.LogTimings = LogTimings;
diff --git a/node_modules/concurrently/dist/src/flow-control/restart-process.d.ts b/node_modules/concurrently/dist/src/flow-control/restart-process.d.ts
deleted file mode 100644
index 735d8d5..0000000
--- a/node_modules/concurrently/dist/src/flow-control/restart-process.d.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-import * as Rx from 'rxjs';
-import { Command } from '../command';
-import { Logger } from '../logger';
-import { FlowController } from './flow-controller';
-/**
- * Restarts commands that fail up to a defined number of times.
- */
-export declare class RestartProcess implements FlowController {
- private readonly logger;
- private readonly scheduler?;
- readonly delay: number;
- readonly tries: number;
- constructor({ delay, tries, logger, scheduler, }: {
- delay?: number;
- tries?: number;
- logger: Logger;
- scheduler?: Rx.SchedulerLike;
- });
- handle(commands: Command[]): {
- commands: Command[];
- };
-}
diff --git a/node_modules/concurrently/dist/src/flow-control/restart-process.js b/node_modules/concurrently/dist/src/flow-control/restart-process.js
deleted file mode 100644
index 79131ce..0000000
--- a/node_modules/concurrently/dist/src/flow-control/restart-process.js
+++ /dev/null
@@ -1,76 +0,0 @@
-"use strict";
-var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- var desc = Object.getOwnPropertyDescriptor(m, k);
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
- desc = { enumerable: true, get: function() { return m[k]; } };
- }
- Object.defineProperty(o, k2, desc);
-}) : (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- o[k2] = m[k];
-}));
-var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
- Object.defineProperty(o, "default", { enumerable: true, value: v });
-}) : function(o, v) {
- o["default"] = v;
-});
-var __importStar = (this && this.__importStar) || function (mod) {
- if (mod && mod.__esModule) return mod;
- var result = {};
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
- __setModuleDefault(result, mod);
- return result;
-};
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.RestartProcess = void 0;
-const Rx = __importStar(require("rxjs"));
-const operators_1 = require("rxjs/operators");
-const defaults = __importStar(require("../defaults"));
-/**
- * Restarts commands that fail up to a defined number of times.
- */
-class RestartProcess {
- constructor({ delay, tries, logger, scheduler, }) {
- this.logger = logger;
- this.delay = delay != null ? +delay : defaults.restartDelay;
- this.tries = tries != null ? +tries : defaults.restartTries;
- this.tries = this.tries < 0 ? Infinity : this.tries;
- this.scheduler = scheduler;
- }
- handle(commands) {
- if (this.tries === 0) {
- return { commands };
- }
- commands
- .map((command) => command.close.pipe((0, operators_1.take)(this.tries), (0, operators_1.takeWhile)(({ exitCode }) => exitCode !== 0)))
- .map((failure, index) => Rx.merge(
- // Delay the emission (so that the restarts happen on time),
- // explicitly telling the subscriber that a restart is needed
- failure.pipe((0, operators_1.delay)(this.delay, this.scheduler), (0, operators_1.map)(() => true)),
- // Skip the first N emissions (as these would be duplicates of the above),
- // meaning it will be empty because of success, or failed all N times,
- // and no more restarts should be attempted.
- failure.pipe((0, operators_1.skip)(this.tries), (0, operators_1.map)(() => false), (0, operators_1.defaultIfEmpty)(false))).subscribe((restart) => {
- const command = commands[index];
- if (restart) {
- this.logger.logCommandEvent(`${command.command} restarted`, command);
- command.start();
- }
- }));
- return {
- commands: commands.map((command) => {
- const closeStream = command.close.pipe((0, operators_1.filter)(({ exitCode }, emission) => {
- // We let all success codes pass, and failures only after restarting won't happen again
- return exitCode === 0 || emission >= this.tries;
- }));
- return new Proxy(command, {
- get(target, prop) {
- return prop === 'close' ? closeStream : target[prop];
- },
- });
- }),
- };
- }
-}
-exports.RestartProcess = RestartProcess;
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage