UNPKG

781 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.CollectionFactory = void 0;
4const runners_1 = require("../runners");
5const collection_1 = require("./collection");
6const custom_collection_1 = require("./custom.collection");
7const nest_collection_1 = require("./nest.collection");
8class CollectionFactory {
9 static create(collection) {
10 const schematicRunner = runners_1.RunnerFactory.create(runners_1.Runner.SCHEMATIC);
11 if (collection === collection_1.Collection.NESTJS) {
12 return new nest_collection_1.NestCollection(schematicRunner);
13 }
14 else {
15 return new custom_collection_1.CustomCollection(collection, schematicRunner);
16 }
17 }
18}
19exports.CollectionFactory = CollectionFactory;