alwaysai
Version:
The alwaysAI command-line interface (CLI)
22 lines • 960 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ChildSpawner = void 0;
const spawner_base_1 = require("./spawner-base");
const gnu_spawner_1 = require("./gnu-spawner");
const resolve_posix_path_1 = require("../resolve-posix-path");
// This ChildSpawner isn't really used anywhere in the CLI, but it provides a
// convenient way to test the GNU spawner which is used extensively by the SSH
// and Docker spawners
function ChildSpawner(context) {
const resolvePath = (0, resolve_posix_path_1.ResolvePosixPath)(context.path);
return (0, gnu_spawner_1.GnuSpawner)(Object.assign({ resolvePath }, (0, spawner_base_1.SpawnerBase)(translate)));
function translate(cmd) {
const translated = Object.assign({}, cmd);
if (cmd.cwd) {
translated.cwd = resolvePath(cmd.cwd);
}
return translated;
}
}
exports.ChildSpawner = ChildSpawner;
//# sourceMappingURL=child-spawner.js.map