@applitools/utils
Version:
38 lines (37 loc) • 1.41 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.sampleProcessTreeMemory = exports.sh = exports.executeProcess = exports.executeAndControlProcess = exports.execute = void 0;
const executionOutput = {
stdout: '',
stderr: 'process execution is not supported in browser environment',
code: 1,
};
async function execute(command, options) {
console.log('execute', { command, options });
return executionOutput;
}
exports.execute = execute;
async function executeAndControlProcess(command, args = [], options) {
console.log('executeAndControlProcess', { command, args, options });
return {
subProcess: undefined,
exitPromise: Promise.resolve(executionOutput),
};
}
exports.executeAndControlProcess = executeAndControlProcess;
async function executeProcess(command, args = [], options) {
console.log('executeProcess', { command, args, options });
return executionOutput;
}
exports.executeProcess = executeProcess;
async function sh(command, options) {
console.log('sh', { command, options });
return executionOutput;
}
exports.sh = sh;
// A browser cannot read OS process trees — always resolves "unknown".
// eslint-disable-next-line @typescript-eslint/no-unused-vars
async function sampleProcessTreeMemory(_rootPid, _options = {}) {
return null;
}
exports.sampleProcessTreeMemory = sampleProcessTreeMemory;