How to use the @angular/cli/models/schematic-command.SchematicCommand function in @angular/cli

To help you get started, we’ve selected a few @angular/cli examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github JetBrains / intellij-plugins / AngularJS / gen / ngCli / schematicsProvider80.js View on Github external
"use strict";
const schematic_command_1 = require("@angular/cli/models/schematic-command");
const config_1 = require("@angular/cli/utilities/config");
let workspace = config_1.getWorkspace();
if (!workspace || !workspace.root)
    throw new Error("Try 9.0 provider");
let command = new schematic_command_1.SchematicCommand({ workspace }, null, null);
let engineHost = command.createWorkflow({ interactive: false }).engineHost;
const schematicsProvider = Promise.resolve({
    getCollection(collectionName) {
        return command.getCollection(collectionName);
    },
    listSchematics(collection) {
        return engineHost.listSchematics(collection);
    },
    getSchematic(collection, schematicName, allowPrivate) {
        return command.getSchematic(collection, schematicName, allowPrivate);
    },
    getDefaultSchematicCollection() {
        return command.getDefaultSchematicCollection();
    }
});
module.exports = schematicsProvider;
github JetBrains / intellij-plugins / AngularJS / gen / ngCli / schematicsProvider62.js View on Github external
"use strict";
const schematic_command_1 = require("@angular/cli/models/schematic-command");
let command = new schematic_command_1.SchematicCommand({}, null);
let defaultCollectionName;
try {
    defaultCollectionName = require('@angular/cli/utilities/config').getDefaultSchematicCollection();
}
catch (e) {
    defaultCollectionName = require('@angular/cli/models/config').CliConfig.getValue('defaults.schematics.collection');
}
let engineHost = command.getEngineHost();
const schematicsProvider = Promise.resolve({
    getCollection(collectionName) {
        return command.getCollection(collectionName);
    },
    listSchematics(collection) {
        return engineHost.listSchematics(collection);
    },
    getSchematic(collection, schematicName, allowPrivate) {
github JetBrains / intellij-plugins / AngularJS / gen / ngCli / schematicsProvider90.js View on Github external
const schematicsProvider = (async function () {
    let workspace = await config_1.getWorkspace('local');
    let command = new schematic_command_1.SchematicCommand({ workspace: workspace }, null, null);
    let { listSchematicNames } = (await command.createWorkflow({ interactive: false })).engineHost;
    let defaultSchematicCollection = await command.getDefaultSchematicCollection();
    return {
        getCollection(collectionName) {
            return command.getCollection(collectionName);
        },
        listSchematics(collection) {
            return listSchematicNames(collection.description);
        },
        getSchematic(collection, schematicName, allowPrivate) {
            return command.getSchematic(collection, schematicName, allowPrivate);
        },
        getDefaultSchematicCollection() {
            return defaultSchematicCollection;
        }
    };
github JetBrains / intellij-plugins / AngularJS / gen / ngCli / schematicsProvider70.js View on Github external
"use strict";
const schematic_command_1 = require("@angular/cli/models/schematic-command");
let command = new schematic_command_1.SchematicCommand({}, null);
let engineHost = command.getEngineHost();
const schematicsProvider = Promise.resolve({
    getCollection(collectionName) {
        return command.getCollection(collectionName);
    },
    listSchematics(collection) {
        return engineHost.listSchematics(collection);
    },
    getSchematic(collection, schematicName, allowPrivate) {
        return command.getSchematic(collection, schematicName, allowPrivate);
    },
    getDefaultSchematicCollection() {
        return command.getDefaultSchematicCollection();
    }
});
module.exports = schematicsProvider;