7e7bb427854c9baa23a86afede4f9989364d6338
[idea/contrib.git] / AngularJS / gen / ngCli / schematicsProvider90.js
1 "use strict";
2 const schematic_command_1 = require("@angular/cli/models/schematic-command");
3 const config_1 = require("@angular/cli/utilities/config");
4 const schematicsProvider = (async function () {
5     let workspace = await config_1.getWorkspace('local');
6     let command = new schematic_command_1.SchematicCommand({ workspace: workspace }, null, null);
7     let { listSchematicNames } = (await command.createWorkflow({ interactive: false })).engineHost;
8     let defaultSchematicCollection = await command.getDefaultSchematicCollection();
9     return {
10         getCollection(collectionName) {
11             return command.getCollection(collectionName);
12         },
13         listSchematics(collection) {
14             return listSchematicNames(collection.description);
15         },
16         getSchematic(collection, schematicName, allowPrivate) {
17             return command.getSchematic(collection, schematicName, allowPrivate);
18         },
19         getDefaultSchematicCollection() {
20             return defaultSchematicCollection;
21         }
22     };
23 })();
24 module.exports = schematicsProvider;