"use strict";Object.defineProperty(exports,"__esModule",{value:true});constnode_module_engine_host_1=require("./node-module-engine-host");/** * An EngineHost that uses a registry to super seed locations of collection.json files, but * revert back to using node modules resolution. This is done for testing. */classNodeModulesTestEngineHostextendsnode_module_engine_host_1.NodeModulesEngineHost{constructor(){super(...arguments);this._collections=newMap();this._tasks=[];}gettasks(){returnthis._tasks;}clearTasks(){this._tasks=[];}registerCollection(name,path){this._collections.set(name,path);}transformContext(context){constoldAddTask=context.addTask;context.addTask=(task,dependencies)=>{this._tasks.push(task.toConfiguration());returnoldAddTask.call(context,task,dependencies);};returncontext;}_resolveCollectionPath(name){constmaybePath=this._collections.get(name);if(maybePath){returnmaybePath;}returnsuper._resolveCollectionPath(name);}}exports.NodeModulesTestEngineHost=NodeModulesTestEngineHost;