@nestjs/cli
Version:
Nest - modern, fast, powerful node.js web framework (@cli)
16 lines (15 loc) • 575 B
JavaScript
import { Runner, RunnerFactory } from '../runners/index.js';
import { Collection } from './collection.js';
import { CustomCollection } from './custom.collection.js';
import { NestCollection } from './nest.collection.js';
export class CollectionFactory {
static create(collection) {
const schematicRunner = RunnerFactory.create(Runner.SCHEMATIC);
if (collection === Collection.NESTJS) {
return new NestCollection(schematicRunner);
}
else {
return new CustomCollection(collection, schematicRunner);
}
}
}